function __construct($type, $header, $message) { parent::__construct(); if (!file_exists($this->config->logfolder)) { mkdir($this->config->logfolder, 0777, true); } $type = strtolower($type); parent::__construct(); if ($type !== "notice" || $type === "notice" && $this->config->save_notice) { file_put_contents($this->config->logfolder . $this->config->logfile, "\"{$header}\" - \"{$message}\"" . PHP_EOL, FILE_APPEND) ? $type == "notice" && $this->config->show_notice || $this->config->show_error ? print "There was an error.\n\t\t\t\t\t\t\tIt was printed to the error-Log." : null : die("There was a serious error,which was caused by getting an include-error by then getting a log-error![HES DEAD!]"); } switch ($type) { case "FATAL": print "The error was a FATAL Error, aborting."; break; case "notice": $this->config->show_notice ? print "The error was a(n) {$type}." : null; break; default: $this->config->show_error ? print "There was a(n) {$type} Error." : null; } }
public function __construct() { parent::__construct(array('dbname' => 'moodle_dev', 'wwwroot' => self::BASE . 'dev', 'dataroot' => '/var/www/html/moodledata')); }