Merge "[~BUGFIX] correct annotations of Tx_Extbase_Persistence_Mapper_DataMapper"
authorBastian Waidelich <bastian@typo3.org>
Mon, 7 Mar 2011 13:32:46 +0000 (14:32 +0100)
committerGerrit Code Review <gerrit@review.typo3.org>
Mon, 7 Mar 2011 13:32:46 +0000 (14:32 +0100)
typo3/sysext/extbase/Classes/MVC/Controller/AbstractController.php
typo3/sysext/extbase/Classes/MVC/Controller/ActionController.php
typo3/sysext/extbase/Classes/MVC/Controller/ControllerContext.php
typo3/sysext/extbase/Classes/MVC/Web/AbstractRequestHandler.php
typo3/sysext/extbase/Tests/Unit/MVC/Controller/ActionControllerTest.php

index c579879..1499fdf 100644 (file)
@@ -110,10 +110,8 @@ abstract class Tx_Extbase_MVC_Controller_AbstractController implements Tx_Extbas
        protected $controllerContext;
 
        /**
-        * The flash messages. DEPRECATED. Use $this->flashMessageContainer instead.
-        *
         * @var Tx_Extbase_MVC_Controller_FlashMessages
-        * @deprecated
+        * @deprecated since Extbase 1.1; will be removed in Extbase 1.6
         */
        protected $flashMessages;
 
@@ -180,12 +178,13 @@ abstract class Tx_Extbase_MVC_Controller_AbstractController implements Tx_Extbas
        /**
         * Injects the flash messages container
         *
-        * @param Tx_Extbase_MVC_Controller_FlashMessages $flashMessages
+        * @param Tx_Extbase_MVC_Controller_FlashMessages $flashMessageContainer
         * @return void
         */
        public function injectFlashMessageContainer(Tx_Extbase_MVC_Controller_FlashMessages $flashMessageContainer) {
                $this->flashMessageContainer = $flashMessageContainer;
-               $this->flashMessages = $flashMessageContainer; // deprecated, but should still work.
+                       // @deprecated since Extbase 1.1; will be removed in Extbase 1.6
+               $this->flashMessages = $flashMessageContainer;
        }
 
        /**
index 58eb480..a5dbf07 100644 (file)
@@ -388,7 +388,7 @@ class Tx_Extbase_MVC_Controller_ActionController extends Tx_Extbase_MVC_Controll
 
                $errorFlashMessage = $this->getErrorFlashMessage();
                if ($errorFlashMessage !== FALSE) {
-                       $this->flashMessages->add($errorFlashMessage, '', t3lib_FlashMessage::ERROR);
+                       $this->flashMessageContainer->add($errorFlashMessage, '', t3lib_FlashMessage::ERROR);
                }
 
                if ($this->request->hasArgument('__referrer')) {
index eaf992b..1c62278 100644 (file)
@@ -166,7 +166,7 @@ class Tx_Extbase_MVC_Controller_ControllerContext {
        /**
         * Set the flash messages
         *
-        * @param Tx_Extbase_MVC_Controller_FlashMessages $flashMessages
+        * @param Tx_Extbase_MVC_Controller_FlashMessages $flashMessageContainer
         * @return void
         */
        public function setFlashMessageContainer(Tx_Extbase_MVC_Controller_FlashMessages $flashMessageContainer) {
@@ -177,9 +177,10 @@ class Tx_Extbase_MVC_Controller_ControllerContext {
         * Get the flash messages
         *
         * @return Tx_Extbase_MVC_Controller_FlashMessages
-        * @deprecated
+        * @deprecated since Extbase 1.1; will be removed in Extbase 1.6
         */
        public function getFlashMessages() {
+               t3lib_div::logDeprecatedFunction();
                return $this->flashMessageContainer;
        }
 
index 81628c5..b8ffddf 100644 (file)
@@ -48,9 +48,15 @@ abstract class Tx_Extbase_MVC_Web_AbstractRequestHandler implements Tx_Extbase_M
 
        /**
         * @var Tx_Extbase_MVC_Controller_FlashMessages
+        * @deprecated since Extbase 1.1; will be removed in Extbase 1.6
         */
        protected $flashMessages;
 
+       /**
+        * @var Tx_Extbase_MVC_Controller_FlashMessages
+        */
+       protected $flashMessageContainer;
+
        /**
         * @param Tx_Extbase_Object_ObjectManagerInterface $objectManager
         * @return void
@@ -60,11 +66,13 @@ abstract class Tx_Extbase_MVC_Web_AbstractRequestHandler implements Tx_Extbase_M
        }
 
        /**
-        * @param Tx_Extbase_Object_ObjectManagerInterface $objectManager
+        * @param Tx_Extbase_MVC_Controller_FlashMessages $flashMessageContainer
         * @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;
+                       // @deprecated since Extbase 1.1; will be removed in Extbase 1.6
+               $this->flashMessages = $flashMessageContainer;
        }
 
        /**
index e28be51..00bcbb2 100644 (file)
@@ -536,7 +536,7 @@ class Tx_Extbase_Tests_Unit_MVC_Controller_ActionControllerTest extends Tx_Extba
 
                $mockController = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_ActionController'), array('pushFlashMessage', 'clearCacheOnError'), array(), '', FALSE);
                $mockController->_set('request', $mockRequest);
-               $mockController->_set('flashMessages', $mockFlashMessages);
+               $mockController->_set('flashMessageContainer', $mockFlashMessages);
                $mockController->_set('argumentsMappingResults', $mockArgumentsMappingResults);
 
                $mockRequest->expects($this->once())->method('setErrors')->with(array($mockError));