当前位置: 首页>>代码示例>>PHP>>正文


PHP RequestHandler::getInstance方法代码示例

本文整理汇总了PHP中RequestHandler::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP RequestHandler::getInstance方法的具体用法?PHP RequestHandler::getInstance怎么用?PHP RequestHandler::getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RequestHandler的用法示例。


在下文中一共展示了RequestHandler::getInstance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: catch

<?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>';
}
开发者ID:martinlindhe,项目名称:core_dev,代码行数:22,代码来源:index.php

示例2: Registry

<?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();
开发者ID:anzasolutions,项目名称:simland,代码行数:17,代码来源:index.php


注:本文中的RequestHandler::getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。