[Foundation] added kernel.bundles to the list of default parameters of the DIC

This commit is contained in:
Fabien Potencier 2010-02-22 11:57:59 +01:00
parent 62c2ef65f8
commit 0dcaabfc8c
2 changed files with 14 additions and 0 deletions

View File

@ -180,6 +180,12 @@ abstract class Kernel
public function getDefaultParameters()
{
$bundles = array();
foreach ($this->bundles as $bundle)
{
$bundles[] = get_class($bundle);
}
return array_merge(
array(
'kernel.root_dir' => $this->rootDir,
@ -189,6 +195,7 @@ abstract class Kernel
'kernel.cache_dir' => $this->rootDir.'/cache/'.$this->environment,
'kernel.logs_dir' => $this->rootDir.'/logs',
'kernel.bundle_dirs' => $this->bundleDirs,
'kernel.bundles' => $bundles,
'kernel.charset' => 'UTF-8',
),
$this->getEnvParameters(),

View File

@ -448,6 +448,12 @@ abstract class Kernel
public function getDefaultParameters()
{
$bundles = array();
foreach ($this->bundles as $bundle)
{
$bundles[] = get_class($bundle);
}
return array_merge(
array(
'kernel.root_dir' => $this->rootDir,
@ -457,6 +463,7 @@ abstract class Kernel
'kernel.cache_dir' => $this->rootDir.'/cache/'.$this->environment,
'kernel.logs_dir' => $this->rootDir.'/logs',
'kernel.bundle_dirs' => $this->bundleDirs,
'kernel.bundles' => $bundles,
'kernel.charset' => 'UTF-8',
),
$this->getEnvParameters(),