本文整理汇总了PHP中Alchemy\Phrasea\Application::getEnvironment方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::getEnvironment方法的具体用法?PHP Application::getEnvironment怎么用?PHP Application::getEnvironment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Alchemy\Phrasea\Application
的用法示例。
在下文中一共展示了Application::getEnvironment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
if (!$app['phraseanet.configuration-tester']->isBlank()) {
if ('setup_upgrade_instructions' !== $app['request']->attributes->get('_route')) {
return $app->redirectPath('setup_upgrade_instructions');
}
}
} elseif (!$app['phraseanet.configuration-tester']->isBlank()) {
return $app->redirectPath('homepage');
}
} else {
if (false === strpos($request->getPathInfo(), '/include/minify')) {
$app['firewall']->requireSetup();
}
}
}, Application::EARLY_EVENT);
$app->bindRoutes();
if (PhraseaApplication::ENV_DEV === $app->getEnvironment()) {
$app->register($p = new WebProfilerServiceProvider(), ['profiler.cache_dir' => $app['cache.path'] . '/profiler']);
$app->mount('/_profiler', $p);
if ($app['phraseanet.configuration-tester']->isInstalled()) {
$app->register(new DoctrineProfilerServiceProvider());
$app['db'] = $app->share(function (PhraseaApplication $app) {
return $app['orm.em']->getConnection();
});
}
}
$app['dispatcher'] = $app->share($app->extend('dispatcher', function (EventDispatcherInterface $dispatcher, PhraseaApplication $app) {
$dispatcher->addSubscriber(new BridgeExceptionSubscriber($app));
$dispatcher->addSubscriber(new FirewallSubscriber());
$dispatcher->addSubscriber(new JsonRequestSubscriber());
$dispatcher->addSubscriber(new DebuggerSubscriber($app));
return $dispatcher;