mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 02:10:37 +02:00
@@ -90,7 +90,6 @@ class ClassLoader
|
||||
public static function directory($path)
|
||||
{
|
||||
static::$directories[] = rtrim($path, '/');
|
||||
echo rtrim($path, '/');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -160,28 +159,27 @@ class ClassLoader
|
||||
public static function load($className)
|
||||
{
|
||||
|
||||
/*
|
||||
var_dump(static::$classes);
|
||||
die();
|
||||
*/
|
||||
$className = ltrim($className, '\\');
|
||||
|
||||
// Try to autoload an aliased class
|
||||
|
||||
/**
|
||||
* Try to autoload an aliased class
|
||||
*/
|
||||
if (isset(static::$aliases[$className])) {
|
||||
return class_alias(static::$aliases[$className], $className);
|
||||
}
|
||||
|
||||
// Try to load a mapped class
|
||||
|
||||
/**
|
||||
* Try to load a mapped class
|
||||
*/
|
||||
if (isset(static::$classes[$className]) && file_exists(static::$classes[$className])) {
|
||||
include static::$classes[$className];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Try to load class from a registered namespace
|
||||
|
||||
/**
|
||||
* Try to load class from a registered namespace
|
||||
*/
|
||||
foreach (static::$namespaces as $namespace => $path) {
|
||||
if (strpos($className, $namespace) === 0) {
|
||||
if (static::loadPSR0(substr($className, strlen($namespace)), $path)) {
|
||||
@@ -190,8 +188,10 @@ class ClassLoader
|
||||
}
|
||||
}
|
||||
|
||||
// Try to load a PSR-0 compatible class
|
||||
// The second call to the loadPSR0 method is used to autoload legacy code
|
||||
/**
|
||||
* Try to load a PSR-0 compatible class
|
||||
* The second call to the loadPSR0 method is used to autoload legacy code
|
||||
*/
|
||||
if (static::loadPSR0($className) || static::loadPSR0(strtolower($className))) {
|
||||
return true;
|
||||
}
|
||||
|
@@ -242,7 +242,7 @@ class ErrorHandler
|
||||
$error['type'] = get_class($exception);
|
||||
}
|
||||
|
||||
// Write to error log
|
||||
// @todo Write to error log
|
||||
|
||||
/*if () {
|
||||
Write here
|
||||
@@ -251,7 +251,7 @@ class ErrorHandler
|
||||
// Send headers and output
|
||||
@header('Content-Type: text/html; charset=UTF-8');
|
||||
|
||||
if (GELATO_DISPLAY_ERRORS) {
|
||||
if (GELATO_DISPLAY_ERRORS) {
|
||||
$error['backtrace'] = $exception->getTrace();
|
||||
|
||||
if ($exception instanceof ErrorException) {
|
||||
|
@@ -1,3 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Error</title>
|
||||
<style type="text/css">
|
||||
* { margin: 0; padding: 0; }
|
||||
#gelato-error
|
||||
@@ -223,3 +228,5 @@ function toggle(id, link)
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@@ -1,69 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="">
|
||||
<meta charset="utf-8">
|
||||
<title>Error</title>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
body
|
||||
{
|
||||
height:100%;
|
||||
background:#eee;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
height: 100%;
|
||||
font-size: 100%;
|
||||
color:#333;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
line-height: 100%;
|
||||
height:100%;
|
||||
background:#eee;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
height: 100%;
|
||||
font-size: 100%;
|
||||
color:#333;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
line-height: 100%;
|
||||
}
|
||||
a
|
||||
{
|
||||
color:#0088cc;
|
||||
text-decoration:none;
|
||||
color:#0088cc;
|
||||
text-decoration:none;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
color:#005580;
|
||||
text-decoration:underline;
|
||||
color:#005580;
|
||||
text-decoration:underline;
|
||||
}
|
||||
h1
|
||||
{
|
||||
font-size: 4em;
|
||||
font-size: 4em;
|
||||
}
|
||||
small
|
||||
{
|
||||
font-size: 0.7em;
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
font-size: 0.7em;
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
}
|
||||
hr
|
||||
{
|
||||
border:0px;
|
||||
border-bottom:1px #ddd solid;
|
||||
border:0px;
|
||||
border-bottom:1px #ddd solid;
|
||||
}
|
||||
#message
|
||||
{
|
||||
width: 700px;
|
||||
margin: 15% auto;
|
||||
width: 700px;
|
||||
margin: 15% auto;
|
||||
}
|
||||
#back-home
|
||||
{
|
||||
bottom:0px;
|
||||
right:0px;
|
||||
position:absolute;
|
||||
padding:10px;
|
||||
bottom:0px;
|
||||
right:0px;
|
||||
position:absolute;
|
||||
padding:10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="message">
|
||||
<h1>Error</h1>
|
||||
<hr>
|
||||
<p>Aw, snap! An error has occurred while processing your request.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
@@ -14,6 +14,7 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Valid
|
||||
{
|
||||
/**
|
||||
|
Reference in New Issue
Block a user