Codice: Seleziona tutto
protected function __blindInitSession() {
//parent::$sessObj = new adminSession;
echo $a;
die('eddai stampati');
}
Codice: Seleziona tutto
final static public function exceptionHandler(\Exception $e) {
try {
if ($e instanceof IException) {
$e->show();
}
}
catch (\Exception $exception) {
die(
"<pre>BlindCore::exceptionHandler() Unhandled exception: ".
BaseErrorHandler::hideCriticalInfo(Security::htmlspecialchars($exception->getMessage()))."\n\n".
BaseErrorHandler::hideCriticalInfo(Security::htmlspecialchars($exception->getTraceAsString()))
);
}
}
final static public function errorHandler($errorNo, $message, $filename, $lineNo) {
if (error_reporting() != 0) {
throw new BlindException('PHP error in file '.$filename.' ('.$lineNo.'): '.$message, $errorNo);
}
}
Codice: Seleziona tutto
public function show() {
if (!in_array($this->_code, array(E_NOTICE, E_DEPRECATED))) {
header('Expires: Mon, 21 Jul 1992 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-cache');
header('Pragma: no-cache');
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
header('Content-Type: text/html; charset=utf-8');
if (DEVELOPMENT || $this->_type == 'custom') $errorMsg = $this->_message;
else {
$errorMsg = 'Do not worry. Retry again';
}
die(
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n".
'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">'."\n".
'<head>'."\n".
'<title>Error</title>'."\n".
'</head>'."\n".
'<body style="margin: 40px; font: 85%/130% verdana, arial, sans-serif; color: #333;">'."\n".
'<h1>An error was encountered</h1>'."\n".
'<hr />'."\n".
'<p>'.$errorMsg.'</p>'."\n".
'</body>'."\n".
'</html>'."\n"
);
}
}