/** * Datenbankverbindung herstellen * * *Description* Methode ohne instanziieren der Klasse aufrufen * * @param * * @return object */ public static function connect() { self::setMySQLCharset(); //Aufbau der Datenbankverbindung try { $db = new \PDO('mysql:host=' . DB_HOST . self::setMySQLPort() . ';dbname=' . DB_NAME, DB_USER, DB_PASS, array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES "' . self::$charset . '"', \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION)); $db->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC); return $db; } catch (\PDOException $ex) { //Fehler $error = \View\Error::errDocument($ex->getMessage()); exit($error); } }
public function parse() { $output = ''; $file = DIR_ADMIN . 'index.php'; if (file_exists($file)) { ob_start(); include $file; $output = ob_get_contents(); ob_end_clean(); } else { $msg = DIR_ADMIN . 'index.php not found'; $output = \View\Error::errDocument($msg); } return $output; }
public function parse($file) { $output = ''; if ($file) { ob_start(); include $file; $html = ob_get_contents(); ob_end_clean(); $output = \Model\LoadExtensions::AddPlugin($html); } else { $msg = "Template nicht gefunden"; $output = \View\Error::errDocument($msg); } return $output; }
public function parse($message) { $output = ''; $file = PATH_PAGES . INSTALLPAGE; if (file_exists($file)) { $output = $this->compileContent(file_get_contents($file), $message); } else { $msg = $file . ' not found'; $output = \View\Error::errDocument($msg); } return $output; }
public function ViewErrorMessage($param) { $msg = 'Incorrect information in the parameters used : ' . $param; return \View\Error::errDocument($msg); }