From 0dcaabfc8c8b8a0417b98447171cfdbc4bf805ee Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 22 Feb 2010 11:57:59 +0100 Subject: [PATCH] [Foundation] added kernel.bundles to the list of default parameters of the DIC --- src/Symfony/Foundation/Kernel.php | 7 +++++++ src/Symfony/Foundation/bootstrap.php | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/Symfony/Foundation/Kernel.php b/src/Symfony/Foundation/Kernel.php index 4068ac2fae..f5001580f2 100644 --- a/src/Symfony/Foundation/Kernel.php +++ b/src/Symfony/Foundation/Kernel.php @@ -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(), diff --git a/src/Symfony/Foundation/bootstrap.php b/src/Symfony/Foundation/bootstrap.php index ffe0b5dd51..852d46dbeb 100644 --- a/src/Symfony/Foundation/bootstrap.php +++ b/src/Symfony/Foundation/bootstrap.php @@ -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(),