1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-14 00:54:06 +02:00

Core Improvements: Next Round #79 #80

This commit is contained in:
Awilum
2013-01-07 00:52:00 +02:00
parent 0f59fa83fc
commit 26a605bf50
12 changed files with 665 additions and 296 deletions

View File

@@ -13,6 +13,18 @@
* @since 1.0.0
*/
/**
* The version of Gelato
*/
define('GELATO_VERSION', '1.0.0');
/**
* Display Gelato Errors or not ?
*/
if ( ! defined('GELATO_DISPLAY_ERRORS')) {
define('GELATO_DISPLAY_ERRORS', true);
}
/**
* Should we use the Gelato Autoloader to ensure the dependancies are automatically
* loaded?
@@ -22,7 +34,27 @@ if ( ! defined('GELATO_AUTOLOADER')) {
}
/**
* Register autoload function
* Load Gelato Error Handler
*/
require_once __DIR__ . '/ErrorHandler.php';
/**
* Set Error Handler
*/
set_error_handler('ErrorHandler::errorHandler');
/**
* Set Fatal Error Handler
*/
register_shutdown_function('ErrorHandler::fatalErrorHandler');
/**
* Set Exception Handler
*/
set_exception_handler('ErrorHandler::exception');
/**
* Register Gelato Autoloader
*/
if (GELATO_AUTOLOADER) {
spl_autoload_register(array('Gelato', 'autoload'));
@@ -33,12 +65,6 @@ if (GELATO_AUTOLOADER) {
*/
class Gelato
{
/**
* The version of Gelato
*/
const VERSION = '1.0.0';
/**
* Registry of variables
*