コード例 #1
0
ファイル: index.php プロジェクト: martinlindhe/core_dev
<?php

/**
 * This is the application handler
 * all webpage requests is sent here from a RewriteRule in .htaccess
 */
require_once 'config.php';
require_once 'RequestHandler.php';
try {
    $front = RequestHandler::getInstance();
    $front->excludeSession(array('api'));
    //exclude session handling for these controllers
    $front->route();
    $page = XmlDocumentHandler::getInstance();
    echo $page->render();
} catch (Exception $e) {
    echo '<pre>';
    echo $e->__toString();
    dp($e->__toString());
    //because the exception is caught it is not written to error log
    echo '</pre>';
}
コード例 #2
0
ファイル: index.php プロジェクト: anzasolutions/simland
<?php

// all necessary settings are included
include 'app/config/init.php';
// class autoloading is started
Autoloader::init();
// application registry initializes
$registry = new Registry();
// core components loading
$registry->session = Session::getInstance();
$registry->db = MySQLDriver::getInstance();
$registry->request = RequestHandler::getInstance();
$registry->dao = new DAOFactory($registry);
$registry->router = Router::getInstance($registry);
$registry->template = new Template($registry);
// application is started
$registry->router->loader();