本文整理匯總了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);
}