Пример #1
0
 function d($msg)
 {
     if (class_exists('Debugger') && $this->config->debug) {
         Debugger::d('Application', $msg);
     } else {
         die('No debugger attached');
     }
 }
Пример #2
0
Файл: index.php Проект: kix/kphp
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', dirname(dirname(__FILE__)));
ini_set('display_errors', 'On');
ini_set('error_reporting', E_ALL);
require_once ROOT . DS . 'app' . DS . 'config.php';
require_once ROOT . DS . 'libs' . DS . 'Helpers.php';
require_once ROOT . DS . 'libs' . DS . 'external' . DS . 'Smarty.class.php';
function __autoload($className)
{
    if (file_exists(ROOT . DS . 'libs' . DS . strtolower($className) . '.class.php')) {
        require_once ROOT . DS . 'libs' . DS . strtolower($className) . '.class.php';
    } else {
        if (file_exists(ROOT . DS . 'app' . DS . 'controllers' . DS . strtolower($className) . '.php')) {
            require_once ROOT . DS . 'app' . DS . 'controllers' . DS . strtolower($className) . '.php';
        } else {
            if (file_exists(ROOT . DS . 'app' . DS . 'models' . DS . strtolower($className) . '.php')) {
                require_once ROOT . DS . 'app' . DS . 'models' . DS . strtolower($className) . '.php';
            }
        }
    }
    // TODO: error handling
}
$app = new Application();
print_r($app);
Debugger::d('Bootstrap', 'Hello world');
//print_r(Debugger::getInstance());
print_r(Debugger::html());
if (isset($_GET['url'])) {
    $app->route($_GET['url']);
}
Пример #3
0
 function d($msg)
 {
     Debugger::d($this->name, $msg);
 }