本文整理匯總了PHP中Alchemy\Phrasea\Application::boot方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::boot方法的具體用法?PHP Application::boot怎麽用?PHP Application::boot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Alchemy\Phrasea\Application
的用法示例。
在下文中一共展示了Application::boot方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testIpsAndEnvironments
/**
* @dataProvider provideIpsAndEnvironments
*/
public function testIpsAndEnvironments($exceptionThrown, $env, $incomingIp, $authorized)
{
$app = new Application($env);
unset($app['exception_handler']);
$app['phraseanet.configuration.config-path'] = __DIR__ . '/Fixtures/configuration-debugger.yml';
$app['phraseanet.configuration.config-compiled-path'] = __DIR__ . '/Fixtures/configuration-debugger.php';
if (is_file($app['phraseanet.configuration.config-compiled-path'])) {
unlink($app['phraseanet.configuration.config-compiled-path']);
}
$app['conf']->set(['debugger', 'allowed-ips'], $authorized);
$app['dispatcher']->addSubscriber(new DebuggerSubscriber($app));
$app->get('/', function () {
return 'success';
});
$app->boot();
if ($exceptionThrown) {
$this->setExpectedException('Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException');
}
$app->handle(new Request([], [], [], [], [], ['REMOTE_ADDR' => $incomingIp]));
}
示例2: boot
public function boot()
{
parent::boot();
$this['console']->setDispatcher($this['dispatcher']);
}