public static function addErrors($array) { self::$errors = array_merge(self::$errors, $array); if (count($array) > 0) { throw new Error_Critic($id, $text, self::getErrorsList()); } }
public function loadFromFile($path) { if (Website::fileExists($path)) { $content = Website::getFileContents($path); $this->loadedFromPath = $path; $lines = explode("\n", $content); unset($lines[0]); // remove <?php unset($lines[count($lines)]); // remove ? > $this->loadFromString(implode("\n", $lines)); } else { WebsiteErrors::addError('#C-4', 'ERROR: <b>#C-4</b> : Class::ConfigPHP - PHP config file doesn\'t exist. Path: <b>' . $path . '</b>'); } }