本文整理汇总了PHP中Nette\Application\UI\Presenter::invalidLinkMode方法的典型用法代码示例。如果您正苦于以下问题:PHP Presenter::invalidLinkMode方法的具体用法?PHP Presenter::invalidLinkMode怎么用?PHP Presenter::invalidLinkMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nette\Application\UI\Presenter
的用法示例。
在下文中一共展示了Presenter::invalidLinkMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createServiceApplication
/**
* @return Nette\Application\Application
*/
public static function createServiceApplication(DI\Container $container, array $options = NULL)
{
$context = new DI\Container();
$context->addService('httpRequest', $container->httpRequest);
$context->addService('httpResponse', $container->httpResponse);
$context->addService('session', $container->session);
$context->addService('presenterFactory', $container->presenterFactory);
$context->addService('router', $container->router);
Nette\Application\UI\Presenter::$invalidLinkMode = $container->params['productionMode'] ? Nette\Application\UI\Presenter::INVALID_LINK_SILENT : Nette\Application\UI\Presenter::INVALID_LINK_WARNING;
$class = isset($options['class']) ? $options['class'] : 'Nette\\Application\\Application';
$application = new $class($context);
$application->catchExceptions = $container->params['productionMode'];
if ($container->session->exists()) {
$application->onStartup[] = function () use($container) {
$container->session->start();
// opens already started session
};
}
return $application;
}