本文整理汇总了PHP中Symfony\Component\HttpKernel\Kernel::initializeBundles方法的典型用法代码示例。如果您正苦于以下问题:PHP Kernel::initializeBundles方法的具体用法?PHP Kernel::initializeBundles怎么用?PHP Kernel::initializeBundles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\HttpKernel\Kernel
的用法示例。
在下文中一共展示了Kernel::initializeBundles方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initializeBundles
/**
* {@inheritdoc}
*/
protected function initializeBundles()
{
parent::initializeBundles();
// pass bundles to CumulativeResourceManager
$bundles = array();
foreach ($this->bundles as $name => $bundle) {
$bundles[$name] = get_class($bundle);
}
CumulativeResourceManager::getInstance()->setBundles($bundles)->setAppRootDir($this->rootDir);
}
示例2: initializeBundles
protected function initializeBundles()
{
parent::initializeBundles();
// pass bundles to BundleBag
$bundles = array();
foreach ($this->bundles as $name => $bundle) {
$bundles[$name] = get_class($bundle);
}
BundleBag::getInstance()->setBundles($bundles)->setAppRootDir($this->rootDir);
}
示例3: initializeBundles
/**
* Initializes the data structures related to the bundle management.
*
* - the bundles property maps a bundle name to the bundle instance,
* - the bundleMap property maps a bundle name to the bundle inheritance hierarchy (most derived bundle first).
*
* @throws \LogicException if two bundles share a common name
* @throws \LogicException if a bundle tries to extend a non-registered bundle
* @throws \LogicException if a bundle tries to extend itself
* @throws \LogicException if two bundles extend the same ancestor
*/
protected function initializeBundles()
{
parent::initializeBundles();
foreach ($this->registerBundles() as $bundle) {
if (\method_exists($bundle, "extendBundle")) {
$name = $bundle->getName();
$extenBundle = $bundle->extendBundle();
$this->bundleMap[$name][] = $this->bundles[$extenBundle];
}
}
}
示例4: initializeBundles
public function initializeBundles()
{
parent::initializeBundles();
}
示例5: initializeBundles
protected function initializeBundles()
{
parent::initializeBundles();
$this->bundles['App'] = $bundle = $this->getAppBundle();
$this->bundleMap['App'] = array($bundle);
}