[~API] Extbase (MVC): Renamed flashMessages to flashMessageContainer in AbstractContr...
authorSebastian Kurfürst <sebastian@typo3.org>
Fri, 16 Apr 2010 08:33:35 +0000 (08:33 +0000)
committerSebastian Kurfürst <sebastian@typo3.org>
Fri, 16 Apr 2010 08:33:35 +0000 (08:33 +0000)
typo3/sysext/extbase/Classes/Dispatcher.php
typo3/sysext/extbase/Classes/MVC/Controller/AbstractController.php
typo3/sysext/extbase/Classes/MVC/Controller/ControllerContext.php

index e7a6552..365af23 100644 (file)
@@ -248,9 +248,9 @@ class Tx_Extbase_Dispatcher {
                
                $controller->injectSettings(!empty(self::$extbaseFrameworkConfiguration['settings']) ? self::$extbaseFrameworkConfiguration['settings'] : array());
 
-               $flashMessages = t3lib_div::makeInstance('Tx_Extbase_MVC_Controller_FlashMessages'); // singleton
-               $flashMessages->reset();
-               $controller->injectFlashMessages($flashMessages);
+               $flashMessageContainer = t3lib_div::makeInstance('Tx_Extbase_MVC_Controller_FlashMessages'); // singleton
+               $flashMessageContainer->reset();
+               $controller->injectFlashMessageContainer($flashMessageContainer);
 
                $objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_Manager');
                $validatorResolver = t3lib_div::makeInstance('Tx_Extbase_Validation_ValidatorResolver');
index 5f09869..b4c8091 100644 (file)
@@ -105,14 +105,22 @@ abstract class Tx_Extbase_MVC_Controller_AbstractController implements Tx_Extbas
        protected $supportedRequestTypes = array('Tx_Extbase_MVC_Request');
 
        /**
-        * The flash messages. Use $this->flashMessages->add(...) to add a new Flash message.
+        * The flash messages. DEPRECATED. Use $this->flashMessageContainer instead.
         *
         * @var Tx_Extbase_MVC_Controller_FlashMessages
-        * @api
+        * @deprecated
         */
        protected $flashMessages;
 
        /**
+        * The flash messages. Use $this->flashMessageContainer->add(...) to add a new Flash message.
+        *
+        * @var Tx_Extbase_MVC_Controller_FlashMessages
+        * @api
+        */
+       protected $flashMessageContainer;
+
+       /**
         * Constructs the controller.
         */
        public function __construct() {
@@ -178,8 +186,9 @@ abstract class Tx_Extbase_MVC_Controller_AbstractController implements Tx_Extbas
         * @param Tx_Extbase_MVC_Controller_FlashMessages $flashMessages
         * @return void
         */
-       public function injectFlashMessages(Tx_Extbase_MVC_Controller_FlashMessages $flashMessages) {
-               $this->flashMessages = $flashMessages;
+       public function injectFlashMessageContainer(Tx_Extbase_MVC_Controller_FlashMessages $flashMessageContainer) {
+               $this->flashMessageContainer = $flashMessageContainer;
+               $this->flashMessages = $flashMessageContainer; // deprecated, but should still work.
        }
 
        /**
@@ -240,7 +249,7 @@ abstract class Tx_Extbase_MVC_Controller_AbstractController implements Tx_Extbas
                        $controllerContext->setArgumentsMappingResults($this->argumentsMappingResults);
                }
                $controllerContext->setUriBuilder($this->uriBuilder);
-               $controllerContext->setFlashMessages($this->flashMessages);
+               $controllerContext->setFlashMessageContainer($this->flashMessageContainer);
                return $controllerContext;
        }
 
index 6fb7ec8..eaf992b 100644 (file)
@@ -65,7 +65,7 @@ class Tx_Extbase_MVC_Controller_ControllerContext {
        /**
         * @var Tx_Extbase_MVC_Controller_FlashMessages
         */
-       protected $flashMessages;
+       protected $flashMessageContainer;
 
        /**
         * Set the request of the controller
@@ -169,27 +169,28 @@ class Tx_Extbase_MVC_Controller_ControllerContext {
         * @param Tx_Extbase_MVC_Controller_FlashMessages $flashMessages
         * @return void
         */
-       public function setFlashMessages(Tx_Extbase_MVC_Controller_FlashMessages $flashMessages) {
-               $this->flashMessages = $flashMessages;
+       public function setFlashMessageContainer(Tx_Extbase_MVC_Controller_FlashMessages $flashMessageContainer) {
+               $this->flashMessageContainer = $flashMessageContainer;
        }
 
        /**
         * Get the flash messages
         *
         * @return Tx_Extbase_MVC_Controller_FlashMessages
-        * @api
+        * @deprecated
         */
        public function getFlashMessages() {
-               return $this->flashMessages;
+               return $this->flashMessageContainer;
        }
 
        /**
         * Get the flash messages
         *
         * @return Tx_Extbase_MVC_Controller_FlashMessages
+        * @api
         */
        public function getFlashMessageContainer() {
-               return $this->flashMessages;
+               return $this->flashMessageContainer;
        }
 }
 ?>
\ No newline at end of file