more fixes for composer use

This commit is contained in:
Joey Kimsey
2024-08-09 01:35:47 -04:00
parent e3cf6beebb
commit f80f7bed6b
2 changed files with 23 additions and 17 deletions

View File

@ -46,8 +46,8 @@ class Bedrock {
Debug::group( 'Bedrock Application' ); Debug::group( 'Bedrock Application' );
ob_start(); ob_start();
self::$activeConfig = new Config( CONFIG_JSON ); self::$activeConfig = new Config( CONFIG_JSON );
set_error_handler( [ 'TheTempusProject\\Canary\\Canary', 'handle_error' ] ); set_error_handler( [ BEDROCK_DEFAULT_ERROR_HANDLER, 'handle_error' ] );
set_exception_handler( [ 'TheTempusProject\\Canary\\Canary', 'handle_exception' ] ); set_exception_handler( [ BEDROCK_DEFAULT_EXCEPTION_HANDLER, 'handle_exception' ] );
self::$controllerName = DEFAULT_CONTROLLER_CLASS; self::$controllerName = DEFAULT_CONTROLLER_CLASS;
self::$methodName = DEFAULT_CONTROLLER_METHOD; self::$methodName = DEFAULT_CONTROLLER_METHOD;
$this->setUrl( $url ); $this->setUrl( $url );

View File

@ -47,24 +47,30 @@
} }
// Debug // Debug
// Log Levels // Log Levels
if ( ! defined('CANARY_DEBUG_LEVEL_ERROR' ) ) { if ( ! defined('CANARY_DEBUG_LEVEL_ERROR' ) ) {
define( 'CANARY_DEBUG_LEVEL_ERROR', 'error' ); define( 'CANARY_DEBUG_LEVEL_ERROR', 'error' );
} }
if ( ! defined('CANARY_DEBUG_LEVEL_WARN' ) ) { if ( ! defined('CANARY_DEBUG_LEVEL_WARN' ) ) {
define( 'CANARY_DEBUG_LEVEL_WARN', 'warn' ); define( 'CANARY_DEBUG_LEVEL_WARN', 'warn' );
} }
if ( ! defined('CANARY_DEBUG_LEVEL_INFO' ) ) { if ( ! defined('CANARY_DEBUG_LEVEL_INFO' ) ) {
define( 'CANARY_DEBUG_LEVEL_INFO', 'info' ); define( 'CANARY_DEBUG_LEVEL_INFO', 'info' );
} }
if ( ! defined('CANARY_DEBUG_LEVEL_LOG' ) ) { if ( ! defined('CANARY_DEBUG_LEVEL_LOG' ) ) {
define( 'CANARY_DEBUG_LEVEL_LOG', 'log' ); define( 'CANARY_DEBUG_LEVEL_LOG', 'log' );
} }
if ( ! defined('CANARY_DEBUG_LEVEL_DEBUG' ) ) { if ( ! defined('CANARY_DEBUG_LEVEL_DEBUG' ) ) {
define( 'CANARY_DEBUG_LEVEL_DEBUG', 'debug' ); define( 'CANARY_DEBUG_LEVEL_DEBUG', 'debug' );
} }
if (!defined('CANARY_ENABLED')) { if (!defined('CANARY_ENABLED')) {
define('CANARY_ENABLED', false); define('CANARY_ENABLED', false);
} }
if (!defined('BEDROCK_DEFAULT_ERROR_HANDLER')) {
define('BEDROCK_DEFAULT_ERROR_HANDLER', 'TheTempusProject\\Canary\\Bin\\Canary');
}
if (!defined('BEDROCK_DEFAULT_EXCEPTION_HANDLER')) {
define('BEDROCK_DEFAULT_EXCEPTION_HANDLER', 'TheTempusProject\\Canary\\Bin\\Canary');
}
if (!defined('DEBUG_EMAIL')) { if (!defined('DEBUG_EMAIL')) {
define('DEBUG_EMAIL', 'webmaster@' . $_SERVER['HTTP_HOST']); define('DEBUG_EMAIL', 'webmaster@' . $_SERVER['HTTP_HOST']);
} }