public static function takeover() { if (self::$_locked) { return; } if (!self::$_inControl) { self::$_oldErrorHandler = set_error_handler('Saf_Debug::handle'); self::$_oldExceptionHandler = set_exception_handler('Saf_Debug::handleException'); if (!self::$_shutdownRegistered) { register_shutdown_function('Saf_Debug::shutdown'); self::$_shutdownRegistered = TRUE; } ini_set('display_errors', self::$_disabledDisplayMode); self::$_inControl = TRUE; } }