本文整理汇总了PHP中Symfony\Component\HttpFoundation\ParameterBag::getIterator方法的典型用法代码示例。如果您正苦于以下问题:PHP ParameterBag::getIterator方法的具体用法?PHP ParameterBag::getIterator怎么用?PHP ParameterBag::getIterator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\HttpFoundation\ParameterBag
的用法示例。
在下文中一共展示了ParameterBag::getIterator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: startContainer
/**
* @return ContainerInterface
*/
public function startContainer()
{
if (true === $this->isStarted()) {
return $this->container;
}
$configAsArray = iterator_to_array($this->config->getIterator());
$this->internalConfig['parameters'] = $configAsArray;
$this->container = $this->createContainer(new ArrayConfig($this->internalConfig));
$loggerFactory = new LoggerFactory($this->config->get('debug'), $this->config->get('log_dir'));
$this->container->bind('LoggerFactory', $loggerFactory);
if (null !== $this->router) {
// Keep compatibility, use the right type hint in the application as usual (UrlGeneratorInterface, UrlMatcherInterface)
$this->container->bind('UrlMatcher', $this->router->getUrlMatcher());
$this->container->bind('UrlGenerator', $this->router->getUrlGenerator());
$this->container->bind('RouteCollection', $this->router->getRouteCollection());
}
$this->container->bind('AppLogger', $this->loggerFactory->getLogger('app'));
$this->started = true;
return $this->container;
}