本文整理匯總了PHP中FrontController::handle方法的典型用法代碼示例。如果您正苦於以下問題:PHP FrontController::handle方法的具體用法?PHP FrontController::handle怎麽用?PHP FrontController::handle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FrontController
的用法示例。
在下文中一共展示了FrontController::handle方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: catch
WidgetWrapper::getInstance(false);
// Closing stuff
WidgetWrapper::destroyInstance();
} catch (Exception $e) {
$log = new Logger('movim');
$log->pushHandler(new SyslogHandler('movim'));
$log->addInfo($e->getMessage());
if (ENVIRONMENT === 'development' && !FAIL_SAFE) {
?>
<div id="final_exception" class="error debug">
<h2>An error happened</h2>
<p><?php
print $e->getMessage();
?>
</p>
</div>
<?php
} elseif (!FAIL_SAFE) {
?>
<div class="carreful">
<h2> Oops... something went wrong.</h2>
<p>But don't panic. The NSA is on the case.</p>
</div>
<?php
}
if (FAIL_SAFE) {
$r = new Route();
$rqst = new FrontController();
$rqst->handle();
}
}
示例2: Request
<?php
require_once __DIR__ . '/Request.php';
require_once __DIR__ . '/Routing.php';
require_once __DIR__ . '/Response.php';
require_once __DIR__ . '/FrontController.php';
$request = new Request();
$routing = new Routing();
$controller = new FrontController($routing);
$response = $controller->handle($request);
$response->render();