[+BUGFIX] Extbase (Dispatcher): Resolved a bug where the reflection service is not...
authorSebastian Kurfürst <sebastian@typo3.org>
Mon, 26 Oct 2009 06:13:25 +0000 (06:13 +0000)
committerSebastian Kurfürst <sebastian@typo3.org>
Mon, 26 Oct 2009 06:13:25 +0000 (06:13 +0000)
typo3/sysext/extbase/Classes/Dispatcher.php

index 83962e3..89f3950 100644 (file)
@@ -79,6 +79,8 @@ class Tx_Extbase_Dispatcher {
        public function __construct() {
                t3lib_cache::initializeCachingFramework();
                $this->initializeClassLoader();
+               $this->initializeCache();
+               $this->initializeReflection();
        }
 
        /**
@@ -105,9 +107,6 @@ class Tx_Extbase_Dispatcher {
                $request = $requestBuilder->build();
                $response = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Response');
 
-               $this->initializeCache();
-               $this->initializeReflection();
-
                // Request hash service
                $requestHashService = t3lib_div::makeInstance('Tx_Extbase_Security_Channel_RequestHashService'); // singleton
                $requestHashService->verifyRequest($request);
@@ -178,7 +177,7 @@ class Tx_Extbase_Dispatcher {
         *
         * @return void
         */
-       public function initializeCache() {
+       protected function initializeCache() {
                $this->cacheManager = $GLOBALS['typo3CacheManager'];
                try {
                        $this->cacheManager->getCache('cache_extbase_reflection');
@@ -196,12 +195,13 @@ class Tx_Extbase_Dispatcher {
         * Initializes the Reflection Service
         *
         * @return void
-        * @see initialize()
         */
-       public function initializeReflection() {
+       protected function initializeReflection() {
                self::$reflectionService = t3lib_div::makeInstance('Tx_Extbase_Reflection_Service');
                self::$reflectionService->setCache($this->cacheManager->getCache('cache_extbase_reflection'));
-               self::$reflectionService->initialize($availableClassNames);
+               if (!self::$reflectionService->isInitialized()) {
+                       self::$reflectionService->initialize();
+               }
        }
 
        /**