| 1234567891011121314151617181920212223 |
- <?php
- class ErrorHandler {
- private $errors = array();
- public static $eh;
- public function __construct() {
- }
- public function addError($errorString) {
- $this->errors[] = $errorString;
- //error_log($errorString);
- }
- public function getErrors() {
- if(sizeof($this->errors) > 0) {
- return "<script type=\"text/javascript\">console.log(\"" . implode('\n', $this->errors) . "\");</script>" . PHP_EOL;
- }
- }
- }
|