* renamed the dispatcher to lowercase
authorJochen Rau <j.rau@web.de>
Tue, 20 Jan 2009 20:07:17 +0000 (20:07 +0000)
committerJochen Rau <j.rau@web.de>
Tue, 20 Jan 2009 20:07:17 +0000 (20:07 +0000)
* restructured folders inside extmvc

101 files changed:
typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_AbstractController.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_ActionController.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_Argument.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_Arguments.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_ArgumentsValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_DefaultController.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_RESTController.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_RequestHandlingController.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InfiniteLoop.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidActionName.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidArgumentName.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidArgumentType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidArgumentValue.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidController.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidControllerName.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidFormat.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidMarker.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidPackageKey.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidPart.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidRequestMethod.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidRequestType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidRoutePartHandler.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidTemplateResource.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidViewHelper.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_NoSuchAction.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_NoSuchArgument.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_NoSuchController.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_StopAction.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_SuccessiveDynamicRouteParts.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_UnsupportedRequestType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/TX_EXTMVC_DefaultRequestHandler.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/TX_EXTMVC_Exception.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/TX_EXTMVC_Request.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/TX_EXTMVC_RequestHandlerInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/TX_EXTMVC_RequestHandlerResolver.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/TX_EXTMVC_RequestProcessorChainManager.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/TX_EXTMVC_RequestProcessorInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/TX_EXTMVC_Response.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/View/Helper/TX_EXTMVC_View_Helper_AbstractHelper.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/View/Helper/TX_EXTMVC_View_Helper_HelperInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/View/Helper/TX_EXTMVC_View_Helper_URIHelper.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_AbstractView.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_DefaultView.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_EmptyView.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_Template.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_Request.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_RequestBuilder.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_RequestHandler.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_Response.php [new file with mode: 0755]
typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_AbstractController.php [deleted file]
typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_ActionController.php [deleted file]
typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_Argument.php [deleted file]
typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_Arguments.php [deleted file]
typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_ArgumentsValidator.php [deleted file]
typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_DefaultController.php [deleted file]
typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_RESTController.php [deleted file]
typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_RequestHandlingController.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InfiniteLoop.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidActionName.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidArgumentName.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidArgumentType.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidArgumentValue.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidController.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidControllerName.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidFormat.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidMarker.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidPackageKey.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidPart.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidRequestMethod.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidRequestType.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidRoutePartHandler.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidTemplateResource.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_InvalidViewHelper.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_NoSuchAction.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_NoSuchArgument.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_NoSuchController.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_StopAction.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_SuccessiveDynamicRouteParts.php [deleted file]
typo3/sysext/extbase/Exception/TX_EXTMVC_Exception_UnsupportedRequestType.php [deleted file]
typo3/sysext/extbase/TX_EXTMVC_DefaultRequestHandler.php [deleted file]
typo3/sysext/extbase/TX_EXTMVC_Dispatcher.php [deleted file]
typo3/sysext/extbase/TX_EXTMVC_Dispatcher_uc.php [deleted file]
typo3/sysext/extbase/TX_EXTMVC_Exception.php [deleted file]
typo3/sysext/extbase/TX_EXTMVC_Request.php [deleted file]
typo3/sysext/extbase/TX_EXTMVC_RequestHandlerInterface.php [deleted file]
typo3/sysext/extbase/TX_EXTMVC_RequestHandlerResolver.php [deleted file]
typo3/sysext/extbase/TX_EXTMVC_RequestProcessorChainManager.php [deleted file]
typo3/sysext/extbase/TX_EXTMVC_RequestProcessorInterface.php [deleted file]
typo3/sysext/extbase/TX_EXTMVC_Response.php [deleted file]
typo3/sysext/extbase/View/Helper/TX_EXTMVC_View_Helper_AbstractHelper.php [deleted file]
typo3/sysext/extbase/View/Helper/TX_EXTMVC_View_Helper_HelperInterface.php [deleted file]
typo3/sysext/extbase/View/Helper/TX_EXTMVC_View_Helper_URIHelper.php [deleted file]
typo3/sysext/extbase/View/TX_EXTMVC_View_AbstractView.php [deleted file]
typo3/sysext/extbase/View/TX_EXTMVC_View_DefaultView.php [deleted file]
typo3/sysext/extbase/View/TX_EXTMVC_View_EmptyView.php [deleted file]
typo3/sysext/extbase/View/TX_EXTMVC_View_Template.php [deleted file]
typo3/sysext/extbase/Web/TX_EXTMVC_Web_Request.php [deleted file]
typo3/sysext/extbase/Web/TX_EXTMVC_Web_RequestBuilder.php [deleted file]
typo3/sysext/extbase/Web/TX_EXTMVC_Web_RequestHandler.php [deleted file]
typo3/sysext/extbase/Web/TX_EXTMVC_Web_Response.php [deleted file]
typo3/sysext/extbase/tx_extmvc_dispatcher.php [new file with mode: 0644]

diff --git a/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_AbstractController.php b/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_AbstractController.php
new file mode 100755 (executable)
index 0000000..0f7d228
--- /dev/null
@@ -0,0 +1,111 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An abstract base class for Controllers
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+abstract class AbstractController {
+
+       /**
+        * @var F3_FLOW3_Object_FactoryInterface A reference to the Object Factory
+        */
+       protected $objectFactory;
+
+       /**
+        * @var string Key of the package this controller belongs to
+        */
+       protected $packageKey;
+
+       /**
+        * @var F3_FLOW3_Package_Package The package this controller belongs to
+        */
+       protected $package;
+
+       /**
+        * Contains the settings of the current package
+        *
+        * @var array
+        */
+       protected $settings;
+
+       /**
+        * Constructs the controller.
+        *
+        * @param F3_FLOW3_Object_FactoryInterface $objectFactory A reference to the Object Factory
+        * @param F3_FLOW3_Package_ManagerInterface $packageManager A reference to the Package Manager
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function __construct(F3_FLOW3_Object_FactoryInterface $objectFactory, F3_FLOW3_Package_ManagerInterface $packageManager) {
+               $this->objectFactory = $objectFactory;
+               list(, $this->packageKey) = explode('\\', get_class($this));
+               $this->package = $packageManager->getPackage($this->packageKey);
+       }
+
+       /**
+        * Sets / injects the settings of the package this controller belongs to.
+        *
+        * @param array $settings Settings container of the current package
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setSettings(array $settings) {
+               $this->settings = $settings;
+       }
+
+       /**
+        * Initializes this object after all dependencies have been resolved.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function initializeObject() {
+               $this->initializeController();
+       }
+
+       /**
+        * Initializes this controller.
+        *
+        * Override this method for initializing your concrete controller implementation.
+        * Recommended actions for your controller initialization method are setting up the expected
+        * arguments and narrowing down the supported request types if neccessary.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       protected function initializeController() {
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_ActionController.php b/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_ActionController.php
new file mode 100644 (file)
index 0000000..1d9a5b5
--- /dev/null
@@ -0,0 +1,142 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A multi action controller
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class ActionController extends TX_EXTMVC_Controller_RequestHandlingController {
+
+       /**
+        * @var F3_FLOW3_Object_ManagerInterface
+        */
+       protected $objectManager;
+
+       /**
+        * @var boolean If initializeView() should be called on an action invocation.
+        */
+       protected $initializeView = TRUE;
+
+       /**
+        * @var TX_EXTMVC_View_AbstractView By default a view with the same name as the current action is provided. Contains NULL if none was found.
+        */
+       protected $view = NULL;
+
+       /**
+        * Injects the object manager
+        *
+        * @param F3_FLOW3_Object_ManagerInterface $objectManager
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function injectObjectManager(F3_FLOW3_Object_ManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * Handles a request. The result output is returned by altering the given response.
+        *
+        * @param TX_EXTMVC_Request $request The request object
+        * @param TX_EXTMVC_Response $response The response, modified by this handler
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function processRequest(TX_EXTMVC_Request $request, TX_EXTMVC_Response $response) {
+               parent::processRequest($request, $response);
+               $this->callActionMethod();
+       }
+
+       /**
+        * Determines the name of the requested action and calls the action method accordingly.
+        * If no action was specified, the "default" action is assumed.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        * @throws TX_EXTMVC_Exception_NoSuchAction if the action specified in the request object does not exist (and if there's no default action either).
+        */
+       protected function callActionMethod() {
+               $actionMethodName = $this->request->getControllerActionName() . 'Action';
+
+               if (!method_exists($this, $actionMethodName)) throw new TX_EXTMVC_Exception_NoSuchAction('An action "' . $this->request->getControllerActionName() . '" does not exist in controller "' . get_class($this) . '".', 1186669086);
+               $this->initializeAction();
+               if ($this->initializeView) $this->initializeView();
+               $actionResult = call_user_func_array(array($this, $actionMethodName), array());
+               if (is_string($actionResult) && F3_PHP6_Functions::strlen($actionResult) > 0) {
+                       $this->response->appendContent($actionResult);
+               }
+       }
+
+       /**
+        * Prepares a view for the current action and stores it in $this->view.
+        * By default, this method tries to locate a view with a name matching
+        * the current action.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       protected function initializeView() {
+               $viewObjectName = $this->request->getViewObjectName();
+               if ($viewObjectName === FALSE) {
+                       $viewObjectName = 'F3_FLOW3_MVC_View_EmptyView';
+               }
+               $this->view = $this->objectManager->getObject($viewObjectName);
+               $this->view->setRequest($this->request);
+       }
+
+       /**
+        * Initializes the controller before invoking an action method.
+        *
+        * Override this method to solve tasks which all actions have in
+        * common.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       protected function initializeAction() {
+       }
+
+       /**
+        * The default action of this controller.
+        *
+        * This method should always be overridden by the concrete action
+        * controller implementation.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       protected function indexAction() {
+               return 'No index action has been implemented yet for this controller.';
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_Argument.php b/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_Argument.php
new file mode 100644 (file)
index 0000000..ac2c5c3
--- /dev/null
@@ -0,0 +1,554 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A controller argument
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope prototype
+ */
+class Argument {
+
+       /**
+        * @var F3_FLOW3_Object_ManagerInterface
+        */
+       protected $objectManager;
+
+       /**
+        * @var F3_FLOW3_Object_FactoryInterface
+        */
+       protected $objectFactory;
+
+       /**
+        * Name of this argument
+        * @var string
+        */
+       protected $name = '';
+
+       /**
+        * Short name of this argument
+        * @var string
+        */
+       protected $shortName = NULL;
+
+       /**
+        * Data type of this argument's value
+        * @var string
+        */
+       protected $dataType = 'Text';
+
+       /**
+        * TRUE if this argument is required
+        * @var boolean
+        */
+       protected $isRequired = FALSE;
+
+       /**
+        * Actual value of this argument
+        * @var object
+        */
+       protected $value = NULL;
+
+       /**
+        * Short help message for this argument
+        * @var string Short help message for this argument
+        */
+       protected $shortHelpMessage = NULL;
+
+       /**
+        * The argument is valid
+        * @var boolean
+        */
+       protected $isValid = TRUE;
+
+       /**
+        * Any error (F3_FLOW3_Error_Error) that occured while initializing this argument (e.g. a mapping error)
+        * @var array
+        */
+       protected $errors = array();
+
+       /**
+        * Any warning (F3_FLOW3_Error_Warning) that occured while initializing this argument (e.g. a mapping warning)
+        * @var array
+        */
+       protected $warnings = array();
+
+       /**
+        * The property validator for this argument
+        * @var F3_FLOW3_Validation_ValidatorInterface
+        */
+       protected $validator = NULL;
+
+       /**
+        * The property validator for this arguments datatype
+        * @var F3_FLOW3_Validation_ValidatorInterface
+        */
+       protected $datatypeValidator = NULL;
+
+       /**
+        * The filter for this argument
+        * @var F3_FLOW3_Validation_FilterInterface
+        */
+       protected $filter = NULL;
+
+       /**
+        * The property converter for this argument
+        * @var F3_FLOW3_Property_ConverterInterface
+        */
+       protected $propertyConverter = NULL;
+
+       /**
+        * The property converter's input format for this argument
+        * @var string
+        */
+       protected $propertyConverterInputFormat = 'string';
+
+       /**
+        * Identifier for the argument, if it has one
+        * @var string
+        */
+       protected $identifier = NULL;
+
+       /**
+        * Constructs this controller argument
+        *
+        * @param string $name Name of this argument
+        * @param string $dataType The data type of this argument
+        * @param F3_FLOW3_Object_ManagerInterface The object manager
+        * @throws InvalidArgumentException if $name is not a string or empty
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function __construct($name, $dataType = 'Text', F3_FLOW3_Object_ManagerInterface $objectManager) {
+               if (!is_string($name) || F3_PHP6_Functions::strlen($name) < 1) throw new InvalidArgumentException('$name must be of type string, ' . gettype($name) . ' given.', 1187951688);
+               $this->objectManager = $objectManager;
+               $this->objectFactory = $this->objectManager->getObjectFactory();
+               $this->name = $name;
+
+               $this->setDataType($dataType);
+       }
+
+       /**
+        * Returns the name of this argument
+        *
+        * @return string This argument's name
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getName() {
+               return $this->name;
+       }
+
+       /**
+        * Sets the short name of this argument.
+        *
+        * @param string $shortName A "short name" - a single character
+        * @return TX_EXTMVC_Controller_Argument $this
+        * @throws InvalidArgumentException if $shortName is not a character
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setShortName($shortName) {
+               if ($shortName !== NULL && (!is_string($shortName) || F3_PHP6_Functions::strlen($shortName) != 1)) throw new InvalidArgumentException('$shortName must be a single character or NULL', 1195824959);
+               $this->shortName = $shortName;
+               return $this;
+       }
+
+       /**
+        * Returns the short name of this argument
+        *
+        * @return string This argument's short name
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function getShortName() {
+               return $this->shortName;
+       }
+
+       /**
+        * Sets the data type of this argument's value
+        *
+        * @param string $dataType: Name of the data type
+        * @return TX_EXTMVC_Controller_Argument $this
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setDataType($dataType) {
+               $this->dataType = ($dataType != '' ? $dataType : 'Text');
+
+               $dataTypeValidatorClassname = $this->dataType;
+               if (!$this->objectManager->isObjectRegistered($dataTypeValidatorClassname)) $dataTypeValidatorClassname = 'F3_FLOW3_Validation_Validator\\' . $this->dataType;
+               $this->datatypeValidator = $this->objectManager->getObject($dataTypeValidatorClassname);
+
+               return $this;
+       }
+
+       /**
+        * Returns the data type of this argument's value
+        *
+        * @return string The data type
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getDataType() {
+               return $this->dataType;
+       }
+
+       /**
+        * Marks this argument to be required
+        *
+        * @param boolean $required TRUE if this argument should be required
+        * @return TX_EXTMVC_Controller_Argument $this
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function setRequired($required) {
+               $this->isRequired = $required;
+               return $this;
+       }
+
+       /**
+        * Returns TRUE if this argument is required
+        *
+        * @return boolean TRUE if this argument is required
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function isRequired() {
+               return $this->isRequired;
+       }
+
+       /**
+        * Sets the value of this argument.
+        *
+        * @param mixed $value: The value of this argument
+        * @return TX_EXTMVC_Controller_Argument $this
+        * @throws TX_EXTMVC_Exception_InvalidArgumentValue if the argument is not a valid object of type $dataType
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setValue($value) {
+               $this->value = $value;
+               return $this;
+       }
+
+       /**
+        * Returns the value of this argument
+        *
+        * @return object The value of this argument - if none was set, NULL is returned
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getValue() {
+               return $this->value;
+       }
+
+       /**
+        * Checks if this argument has a value set.
+        *
+        * @return boolean TRUE if a value was set, otherwise FALSE
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function isValue() {
+               return $this->value !== NULL;
+       }
+
+       /**
+        * Sets a short help message for this argument. Mainly used at the command line, but maybe
+        * used elsewhere, too.
+        *
+        * @param string $message: A short help message
+        * @return TX_EXTMVC_Controller_Argument                $this
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setShortHelpMessage($message) {
+               if (!is_string($message)) throw new InvalidArgumentException('The help message must be of type string, ' . gettype($message) . 'given.', 1187958170);
+               $this->shortHelpMessage = $message;
+               return $this;
+       }
+
+       /**
+        * Returns the short help message
+        *
+        * @return string The short help message
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getShortHelpMessage() {
+               return $this->shortHelpMessage;
+       }
+
+       /**
+        * Set the validity status of the argument
+        *
+        * @param boolean TRUE if the argument is valid, FALSE otherwise
+        * @return void
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function setValidity($isValid) {
+               $this->isValid = $isValid;
+       }
+
+       /**
+        * Returns TRUE when the argument is valid
+        *
+        * @return boolean TRUE if the argument is valid
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function isValid() {
+               return $this->isValid;
+       }
+
+       /**
+        * Add an initialization error (e.g. a mapping error)
+        *
+        * @param F3_FLOW3_Error_Error An error object
+        * @return void
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function addError(F3_FLOW3_Error_Error $error) {
+               $this->errors[] = $error;
+       }
+
+       /**
+        * Get all initialization errors
+        *
+        * @return array An array containing F3_FLOW3_Error_Error objects
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        * @see addError(F3_FLOW3_Error_Error $error)
+        */
+       public function getErrors() {
+               return $this->errors;
+       }
+
+       /**
+        * Add an initialization warning (e.g. a mapping warning)
+        *
+        * @param F3_FLOW3_Error_Warning A warning object
+        * @return void
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function addWarning(F3_FLOW3_Error_Warning $warning) {
+               $this->warnings[] = $warning;
+       }
+
+       /**
+        * Get all initialization warnings
+        *
+        * @return array An array containing F3_FLOW3_Error_Warning objects
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        * @see addWarning(F3_FLOW3_Error_Warning $warning)
+        */
+       public function getWarnings() {
+               return $this->warnings;
+       }
+
+       /**
+        * Set an additional validator
+        *
+        * @param string Class name of a validator
+        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function setValidator($className) {
+               $this->validator = $this->objectManager->getObject($className);
+               return $this;
+       }
+
+       /**
+        * Returns the set validator
+        *
+        * @return F3_FLOW3_Validation_ValidatorInterface The set validator, NULL if none was set
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function getValidator() {
+               return $this->validator;
+       }
+
+       /**
+        * Returns the set datatype validator
+        *
+        * @return F3_FLOW3_Validation_ValidatorInterface The set datatype validator
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function getDatatypeValidator() {
+               return $this->datatypeValidator;
+       }
+
+       /**
+        * Set a filter
+        *
+        * @param string Class name of a filter
+        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function setFilter($className) {
+               $this->filter = $this->objectManager->getObject($className);
+               return $this;
+       }
+
+       /**
+        * Create and set a filter chain
+        *
+        * @param array Class names of the filters
+        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function setNewFilterChain(array $classNames) {
+               $this->filter = $this->createNewFilterChainObject();
+
+               foreach ($classNames as $className) {
+                       if (!$this->objectManager->isObjectRegistered($className)) $className = 'F3_FLOW3_Validation_Filter\\' . $className;
+                       $this->filter->addFilter($this->objectManager->getObject($className));
+               }
+
+               return $this;
+       }
+
+       /**
+        * Create and set a validator chain
+        *
+        * @param array Class names of the validators
+        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function setNewValidatorChain(array $classNames) {
+               $this->validator = $this->createNewValidatorChainObject();
+
+               foreach ($classNames as $className) {
+                       if (!$this->objectManager->isObjectRegistered($className)) $className = 'F3_FLOW3_Validation_Validator\\' . $className;
+                       $this->validator->addValidator($this->objectManager->getObject($className));
+               }
+
+               return $this;
+       }
+
+       /**
+        * Returns the set filter
+        *
+        * @return F3_FLOW3_Validation_FilterInterface The set filter, NULL if none was set
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function getFilter() {
+               return $this->filter;
+       }
+
+       /**
+        * Set a property converter
+        *
+        * @param string Class name of a property converter
+        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function setPropertyConverter($className) {
+               if (is_string($className)) {
+                       $this->propertyConverter = $this->objectFactory->create($className);
+               } else {
+                       $this->propertyConverter = $className;
+               }
+               return $this;
+       }
+
+       /**
+        * Returns the set property converter
+        *
+        * @return F3_FLOW3_Property_ConverterInterface The set property convertr, NULL if none was set
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function getPropertyConverter() {
+               return $this->propertyConverter;
+       }
+
+       /**
+        * Set a property converter input format
+        *
+        * @param string Input format the property converter should use
+        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function setPropertyConverterInputFormat($format) {
+               $this->propertyConverterInputFormat = $format;
+               return $this;
+       }
+
+       /**
+        * Returns the set property converter input format
+        *
+        * @return string The set property converter input format
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function getPropertyConverterInputFormat() {
+               return $this->propertyConverterInputFormat;
+       }
+
+       /**
+        * Set the identifier for the argument.
+        *
+        * @param string $identifier The identifier for the argument.
+        * @return void
+        * @author Sebastian Kurfürst <sebastian@typo3.org>
+        */
+       public function setIdentifier($identifier) {
+               $this->identifier = $identifier;
+       }
+
+       /**
+        * Get the identifier of the argument, if it has one.
+        *
+        * @return string Identifier of the argument. If none set, returns NULL.
+        * @author Sebastian Kurfürst <sebastian@typo3.org>
+        */
+       public function getIdentifier() {
+               return $this->identifier;
+       }
+
+       /**
+        * Factory method that creates a new filter chain
+        *
+        * @return F3_FLOW3_Validation_Filter_Chain A new filter chain
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function createNewFilterChainObject() {
+               return $this->objectFactory->create('F3_FLOW3_Validation_Filter_Chain');
+       }
+
+       /**
+        * Factory method that creates a new validator chain
+        *
+        * @return F3_FLOW3_Validation_Validator_Chain A new validator chain
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function createNewValidatorChainObject() {
+               return $this->objectFactory->create('F3_FLOW3_Validation_Validator_Chain');
+       }
+
+       /**
+        * Returns a string representation of this argument's value
+        *
+        * @return string
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function __toString() {
+               return (string)$this->value;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_Arguments.php b/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_Arguments.php
new file mode 100644 (file)
index 0000000..f3bce3f
--- /dev/null
@@ -0,0 +1,280 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A composite of controller arguments
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope prototype
+ */
+class Arguments extends ArrayObject {
+
+       /**
+        * @var F3_FLOW3_Object_FactoryInterface A reference to the object factory
+        */
+       protected $objectFactory;
+
+       /**
+        * @var F3_FLOW3_Object_ManagerInterface A reference to the object manager
+        */
+       protected $objectManager;
+
+       /**
+        * @var array Names of the arguments contained by this object
+        */
+       protected $argumentNames = array();
+
+       /**
+        * Constructs this Arguments object
+        *
+        * @param F3_FLOW3_Object_FactoryInterface $objectFactory
+        * @param F3_FLOW3_Object_ManagerInterface $objectManager
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function __construct(F3_FLOW3_Object_FactoryInterface $objectFactory, F3_FLOW3_Object_ManagerInterface $objectManager) {
+               $this->objectFactory = $objectFactory;
+               $this->objectManager = $objectManager;
+               parent::__construct();
+       }
+
+       /**
+        * Adds or replaces the argument specified by $value. The argument's name is taken from the
+        * argument object itself, therefore the $offset does not have any meaning in this context.
+        *
+        * @param mixed $offset Offset - not used here
+        * @param mixed $value The argument.
+        * @return void
+        * @throws InvalidArgumentException if the argument is not a valid Controller Argument object
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function offsetSet($offset, $value) {
+               if (!$value instanceof TX_EXTMVC_Controller_Argument) throw new InvalidArgumentException('Controller arguments must be valid TX_EXTMVC_Controller_Argument objects.', 1187953786);
+
+               $argumentName = $value->getName();
+               parent::offsetSet($argumentName, $value);
+               $this->argumentNames[$argumentName] = TRUE;
+       }
+
+       /**
+        * Sets an argument, aliased to offsetSet()
+        *
+        * @param mixed $value The value
+        * @return void
+        * @throws InvalidArgumentException if the argument is not a valid Controller Argument object
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function append($value) {
+               if (!$value instanceof TX_EXTMVC_Controller_Argument) throw new InvalidArgumentException('Controller arguments must be valid TX_EXTMVC_Controller_Argument objects.', 1187953786);
+               $this->offsetSet(NULL, $value);
+       }
+
+       /**
+        * Unsets an argument
+        *
+        * @param mixed $offset Offset
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function offsetUnset($offset) {
+               $translatedOffset = $this->translateToLongArgumentName($offset);
+               parent::offsetUnset($translatedOffset);
+
+               unset($this->argumentNames[$translatedOffset]);
+               if ($offset != $translatedOffset) {
+                       unset($this->argumentShortNames[$offset]);
+               }
+       }
+
+       /**
+        * Returns whether the requested index exists
+        *
+        * @param mixed $offset Offset
+        * @return boolean
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function offsetExists($offset) {
+               $translatedOffset = $this->translateToLongArgumentName($offset);
+               return parent::offsetExists($translatedOffset);
+       }
+
+       /**
+        * Returns the value at the specified index
+        *
+        * @param mixed $offset Offset
+        * @return TX_EXTMVC_Controller_Argument The requested argument object
+        * @throws TX_EXTMVC_Exception_NoSuchArgument if the argument does not exist
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function offsetGet($offset) {
+               $translatedOffset = $this->translateToLongArgumentName($offset);
+               if ($translatedOffset === '') throw new TX_EXTMVC_Exception_NoSuchArgument('The argument "' . $offset . '" does not exist.', 1216909923);
+               return parent::offsetGet($translatedOffset);
+       }
+
+       /**
+        * Creates, adds and returns a new controller argument to this composite object.
+        * If an argument with the same name exists already, it will be replaced by the
+        * new argument object.
+        *
+        * If $dataType is an object registered at the Object Manager, it sets the default property converter to map this property.
+        *
+        * @param string $name Name of the argument
+        * @param string $dataType Name of one of the built-in data types
+        * @param boolean $isRequired TRUE if this argument should be marked as required
+        * @return TX_EXTMVC_Controller_Argument The new argument
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function addNewArgument($name, $dataType = 'Text', $isRequired = FALSE) {
+               $argument = $this->objectFactory->create('F3_FLOW3_MVC_Controller_Argument', $name, $dataType);
+               $argument->setRequired($isRequired);
+
+               if ($this->objectManager->isObjectRegistered($dataType)) {
+                       $propertyConverter = $this->objectFactory->create('F3_FLOW3_Property_Converter_DomainObjectConverter', $dataType);
+                       $argument->setPropertyConverter($propertyConverter)->setPropertyConverterInputFormat('array');
+               }
+               $this->addArgument($argument);
+               return $argument;
+       }
+
+       /**
+        * Adds the specified controller argument to this composite object.
+        * If an argument with the same name exists already, it will be replaced by the
+        * new argument object.
+        *
+        * Note that the argument will be cloned, not referenced.
+        *
+        * @param TX_EXTMVC_Controller_Argument $argument The argument to add
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function addArgument(TX_EXTMVC_Controller_Argument $argument) {
+               $this->offsetSet(NULL, $argument);
+       }
+
+       /**
+        * Returns an argument specified by name
+        *
+        * @param string $argumentName Name of the argument to retrieve
+        * @return TX_EXTMVC_Controller_Argument
+        * @throws TX_EXTMVC_Exception_NoSuchArgument
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getArgument($argumentName) {
+               if (!$this->offsetExists($argumentName)) throw new TX_EXTMVC_Exception_NoSuchArgument('An argument "' . $argumentName . '" does not exist.', 1195815178);
+               return $this->offsetGet($argumentName);
+       }
+
+       /**
+        * Checks if an argument with the specified name exists
+        *
+        * @param string $argumentName Name of the argument to check for
+        * @return boolean TRUE if such an argument exists, otherwise FALSE
+        * @see offsetExists()
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function hasArgument($argumentName) {
+               return $this->offsetExists($argumentName);
+       }
+
+       /**
+        * Returns the names of all arguments contained in this object
+        *
+        * @return array Argument names
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getArgumentNames() {
+               return array_keys($this->argumentNames);
+       }
+
+       /**
+        * Returns the short names of all arguments contained in this object that have one.
+        *
+        * @return array Argument short names
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getArgumentShortNames() {
+               $argumentShortNames = array();
+               foreach ($this as $argument) {
+                       $argumentShortNames[$argument->getShortName()] = TRUE;
+               }
+               return array_keys($argumentShortNames);
+       }
+
+       /**
+        * Magic setter method for the argument values. Each argument
+        * value can be set by just calling the setArgumentName() method.
+        *
+        * @param string $methodName Name of the method
+        * @param array $arguments Method arguments
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function __call($methodName, array $arguments) {
+               if (F3_PHP6_Functions::substr($methodName, 0, 3) !== 'set') throw new LogicException('Unknown method "' . $methodName . '".', 1210858451);
+
+               $firstLowerCaseArgumentName = $this->translateToLongArgumentName(F3_PHP6_Functions::strtolower($methodName{3}) . F3_PHP6_Functions::substr($methodName, 4));
+               $firstUpperCaseArgumentName = $this->translateToLongArgumentName(F3_PHP6_Functions::ucfirst(F3_PHP6_Functions::substr($methodName, 3)));
+
+               if (in_array($firstLowerCaseArgumentName, $this->getArgumentNames())) {
+                       $argument = parent::offsetGet($firstLowerCaseArgumentName);
+                       $argument->setValue($arguments[0]);
+               } elseif (in_array($firstUpperCaseArgumentName, $this->getArgumentNames())) {
+                       $argument = parent::offsetGet($firstUpperCaseArgumentName);
+                       $argument->setValue($arguments[0]);
+               }
+       }
+
+       /**
+        * Translates a short argument name to its corresponding long name. If the
+        * specified argument name is a real argument name already, it will be returned again.
+        *
+        * If an argument with the specified name or short name does not exist, an empty
+        * string is returned.
+        *
+        * @param string argument name
+        * @return string long argument name or empty string
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       protected function translateToLongArgumentName($argumentName) {
+
+               if (in_array($argumentName, $this->getArgumentNames())) return $argumentName;
+
+               foreach ($this as $argument) {
+                       if ($argumentName === $argument->getShortName()) return $argument->getName();
+               }
+               return '';
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_ArgumentsValidator.php b/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_ArgumentsValidator.php
new file mode 100644 (file)
index 0000000..ff215a9
--- /dev/null
@@ -0,0 +1,153 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * Validator for the controller arguments object
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope prototype
+ */
+class ArgumentsValidator implements F3_FLOW3_Validation_ObjectValidatorInterface {
+
+       /**
+        * @var F3_FLOW3_Object_FactoryInterface The object factory
+        */
+       protected $objectFactory;
+
+       /**
+        * @var TX_EXTMVC_Controller_Arguments The registered arguments with the specified property validators
+        */
+       protected $registeredArguments;
+
+       /**
+        * Constructor
+        *
+        * @param TX_EXTMVC_Controller_Arguments The registered arguments with the specified property editors
+        * @param F3_FLOW3_Object_FactoryInterface The object factory
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       public function __construct(TX_EXTMVC_Controller_Arguments $registeredArguments, F3_FLOW3_Object_FactoryInterface $objectFactory) {
+               $this->objectFactory = $objectFactory;
+               $this->registeredArguments = $registeredArguments;
+       }
+
+       /**
+        * Checks if classes of the given type can be validated with this
+        * validator.
+        *
+        * @param  string $className: Specifies the class type which is supposed to be validated. The check succeeds if this validator can handle the specified class or any subclass of it.
+        * @return boolean TRUE if this validator can validate the class type or FALSE if it can't
+        */
+       public function canValidate($className) {
+               return ($className === 'F3_FLOW3_MVC_Controller_Arguments');
+       }
+
+       /**
+        * Validates the given object. Any errors will be stored in the passed errors
+        * object. If validation succeeds completely, this method returns TRUE. If at
+        * least one error occurred, the result is FALSE.
+        *
+        * @param object $object: The object which is supposed to be validated.
+        * @param F3_FLOW3_Validation_Errors $errors: Here any occured validation error is stored
+        * @return boolean TRUE if validation succeeded completely, FALSE if at least one error occurred.
+        * @throws F3_FLOW3_Validation_Exception_InvalidSubject if this validator cannot validate the given subject or the subject is not an object.
+        */
+       public function validate($object, F3_FLOW3_Validation_Errors &$errors) {
+               if (!$object instanceof TX_EXTMVC_Controller_Arguments) throw new F3_FLOW3_Validation_Exception_InvalidSubject('The specified object cannot be validated by this validator.', 1216720829);
+
+               $isValid = TRUE;
+               foreach ($object as $argument) {
+                       if ($argument->isRequired()) $isValid &= $this->validateProperty($object, $argument->getName(), $errors);
+               }
+
+               return (boolean)$isValid;
+       }
+
+       /**
+        * Validates a specific property ($propertyName) of the given object. Any errors will be stored
+        * in the given errors object. If validation succeeds, this method returns TRUE, else it will return FALSE.
+        * It also invokes any registered property editors.
+        *
+        * @param object $object: The object of which the property should be validated
+        * @param string $propertyName: The name of the property that should be validated
+        * @param F3_FLOW3_Validation_Errors $errors: Here any occured validation error is stored
+        * @return boolean TRUE if the property could be validated, FALSE if an error occured
+        * @throws F3_FLOW3_Validation_Exception_InvalidSubject if this validator cannot validate the given subject or the subject is not an object.
+        */
+       public function validateProperty($object, $propertyName, F3_FLOW3_Validation_Errors &$errors) {
+               if (!$object instanceof TX_EXTMVC_Controller_Arguments) throw new F3_FLOW3_Validation_Exception_InvalidSubject('The specified object cannot be validated by this validator.', 1216720830);
+
+               $propertyValidatorErrors = $this->createNewValidationErrorsObject();
+
+               $isValid = TRUE;
+               if ($object[$propertyName]->getValidator() != NULL) $isValid &= $object[$propertyName]->getValidator()->isValidProperty($object[$propertyName]->getValue(), $propertyValidatorErrors);
+               $datatypeValidator = $object[$propertyName]->getDatatypeValidator();
+               $isValid &= $datatypeValidator->isValidProperty($object[$propertyName]->getValue(), $propertyValidatorErrors);
+
+               if (!$isValid) $errors[$propertyName] = $propertyValidatorErrors;
+
+               return (boolean)$isValid;
+       }
+
+       /**
+        * Returns TRUE, if the given property ($proptertyValue) is a valid value for the property ($propertyName) of the class ($className).
+        * Any errors will be stored in the given errors object. If at least one error occurred, the result is FALSE.
+        *
+        * @param string $className: The propterty's class name
+        * @param string $propertyName: The name of the property for wich the value should be validated
+        * @param object $propertyValue: The value that should be validated
+        * @return boolean TRUE if the value could be validated for the given property, FALSE if an error occured
+        */
+       public function isValidProperty($className, $propertyName, $propertyValue, F3_FLOW3_Validation_Errors &$errors) {
+               $propertyValidatorErrors = $this->createNewValidationErrorsObject();
+
+               $isValid = TRUE;
+               if ($this->registeredArguments[$propertyName]->getValidator() != NULL) $isValid &= $this->registeredArguments[$propertyName]->getValidator()->isValidProperty($propertyValue->getValue(), $propertyValidatorErrors);
+               $isValid &= $this->registeredArguments[$propertyName]->getDatatypeValidator()->isValidProperty($propertyValue, $propertyValidatorErrors);
+
+               if (!$isValid) $errors[$propertyName] = $propertyValidatorErrors;
+
+               return (boolean)$isValid;
+       }
+
+       /**
+        * This is a factory method to get a clean validation errors object
+        *
+        * @return F3_FLOW3_Validation_Errors An empty errors object
+        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
+        */
+       protected function createNewValidationErrorsObject() {
+               return $this->objectFactory->create('F3_FLOW3_Validation_Errors');
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_DefaultController.php b/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_DefaultController.php
new file mode 100755 (executable)
index 0000000..be65985
--- /dev/null
@@ -0,0 +1,96 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A Special Case of a Controller: If no controller could be resolved or no
+ * controller has been specified in the request, this controller is chosen.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class DefaultController extends TX_EXTMVC_Controller_RequestHandlingController {
+
+       /**
+        * @var TX_EXTMVC_View_DefaultView
+        */
+       protected $defaultView;
+
+       /**
+        * Injects the default view
+        *
+        * @param TX_EXTMVC_View_DefaultView $defaultView The default view
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function injectDefaultView(TX_EXTMVC_View_DefaultView $defaultView) {
+               $this->defaultView = $defaultView;
+       }
+
+       /**
+        * Processes a generic request and returns a response
+        *
+        * @param TX_EXTMVC_Request $request: The request
+        * @param TX_EXTMVC_Response $response: The response
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function processRequest(TX_EXTMVC_Request $request, TX_EXTMVC_Response $response) {
+               $request->setDispatched(TRUE);
+               switch (get_class($request)) {
+                       case 'F3_FLOW3_MVC_Web_Request' :
+                               $this->processWebRequest($request, $response);
+                               break;
+                       default :
+                               $response->setContent(
+                                       "\nWelcome to FLOW3!\n\n" .
+                                       "This is the default view of the FLOW3 MVC object. You see this message because no \n" .
+                                       "other view is available. Please refer to the Developer's Guide for more information \n" .
+                                       "how to create and configure one.\n\n" .
+                                       "Have fun! The FLOW3 Development Team\n"
+                               );
+               }
+       }
+
+       /**
+        * Processes a web request and returns a response
+        *
+        * @param TX_EXTMVC_Web_Request $request: The request
+        * @param TX_EXTMVC_Web_Response $response: The response
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       protected function processWebRequest(TX_EXTMVC_Web_Request $request, TX_EXTMVC_Web_Response $response) {
+               $this->defaultView->setRequest($request);
+               $response->setContent($this->defaultView->render());
+       }
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_RESTController.php b/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_RESTController.php
new file mode 100644 (file)
index 0000000..c54140f
--- /dev/null
@@ -0,0 +1,117 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An action controller for RESTful web services
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class RESTController extends TX_EXTMVC_Controller_ActionController {
+
+       /**
+        * @var TX_EXTMVC_Web_Request The current request
+        */
+       protected $request;
+
+       /**
+        * @var TX_EXTMVC_Web_Response The response which will be returned by this action controller
+        */
+       protected $response;
+
+       /**
+        * Handles a web request. The result output is returned by altering the given response.
+        *
+        * Note that this REST controller only supports web requests!
+        *
+        * @param TX_EXTMVC_Web_Request $request The request object
+        * @param TX_EXTMVC_Web_Response $response The response, modified by this handler
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function processRequest(TX_EXTMVC_Request $request, TX_EXTMVC_Response $response) {
+               if (!($request instanceof TX_EXTMVC_Web_Request) || !($response instanceof TX_EXTMVC_Web_Response)) {
+                       throw new TX_EXTMVC_Exception_InvalidRequestType('This RESTController only supports web requests.', 1226665171);
+               }
+               parent::processRequest($request, $response);
+       }
+
+       /**
+        * Determines the name of the requested action and calls the action method accordingly.
+        * This implementation analyzes the HTTP request and chooses a matching REST-style action.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        * @throws TX_EXTMVC_Exception_NoSuchAction if the action specified in the request object does not exist (and if there's no default action either).
+        */
+       protected function callActionMethod() {
+               if ($this->arguments['id']->isValid() === FALSE) $this->throwStatus(400);
+
+               if ($this->request->getControllerActionName() == 'index') {
+                       $actionName = 'index';
+                       switch ($this->request->getMethod()) {
+                               case F3_FLOW3_Utility_Environment::REQUEST_METHOD_GET :
+                                       $actionName = ($this->arguments['id']->getValue() === NULL) ? 'list' : 'show';
+                               break;
+                               case F3_FLOW3_Utility_Environment::REQUEST_METHOD_POST :
+                                       $actionName = 'create';
+                               break;
+                               case F3_FLOW3_Utility_Environment::REQUEST_METHOD_PUT :
+                                       if ($this->arguments['id']->getValue() === NULL) $this->throwStatus(400, NULL, 'Invalid identifier');
+                                       $actionName = 'update';
+                               break;
+                               case F3_FLOW3_Utility_Environment::REQUEST_METHOD_DELETE :
+                                       $actionName = 'delete';
+                               break;
+                       }
+                       $this->request->setControllerActionName($actionName);
+               }
+               parent::callActionMethod();
+       }
+
+       /**
+        * Initializes (registers / defines) arguments of this controller.
+        *
+        * Override this method to add arguments which can later be accessed
+        * by the action methods.
+        *
+        * NOTE: If you override this method, don't forget to call the parent
+        * method as well (or define the identifier own your own).
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function initializeArguments() {
+               $this->arguments->addNewArgument('id', 'UUID');
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_RequestHandlingController.php b/typo3/sysext/extbase/Classes/Controller/TX_EXTMVC_Controller_RequestHandlingController.php
new file mode 100644 (file)
index 0000000..c8397d1
--- /dev/null
@@ -0,0 +1,254 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An abstract base class for Controllers which can handle requests
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class RequestHandlingController extends TX_EXTMVC_Controller_AbstractController {
+
+       /**
+        * @var TX_EXTMVC_Request The current request
+        */
+       protected $request;
+
+       /**
+        * @var TX_EXTMVC_Response The response which will be returned by this action controller
+        */
+       protected $response;
+
+       /**
+        * @var TX_EXTMVC_Controller_Arguments Arguments passed to the controller
+        */
+       protected $arguments;
+
+       /**
+        * @var TX_EXTMVC_Property_Mapper A property mapper for mapping the arguments
+        */
+       protected $propertyMapper;
+
+       /**
+        * @var array An array of supported request types. By default only web requests are supported. Modify or replace this array if your specific controller supports certain (additional) request types.
+        */
+       protected $supportedRequestTypes = array('F3_FLOW3_MVC_Web_Request');
+
+       /**
+        * @var F3_FLOW3_Property_MappingResults Mapping results of the arguments mapping process
+       */
+       protected $argumentMappingResults;
+
+       /**
+        * Constructs the controller.
+        *
+        * @param F3_FLOW3_Object_FactoryInterface $objectFactory A reference to the Object Factory
+        * @param F3_FLOW3_Package_ManagerInterface $packageManager A reference to the Package Manager
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function __construct(F3_FLOW3_Object_FactoryInterface $objectFactory, F3_FLOW3_Package_ManagerInterface $packageManager) {
+               $this->arguments = $objectFactory->create('F3_FLOW3_MVC_Controller_Arguments');
+               parent::__construct($objectFactory, $packageManager);
+       }
+
+       /**
+        * Injects a property mapper
+        *
+        * @param F3_FLOW3_Property_Mapper $propertyMapper
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function injectPropertyMapper(F3_FLOW3_Property_Mapper $propertyMapper) {
+               $this->propertyMapper = $propertyMapper;
+       }
+
+       /**
+        * Checks if the current request type is supported by the controller.
+        *
+        * If your controller only supports certain request types, either
+        * replace / modify the supporteRequestTypes property or override this
+        * method.
+        *
+        * @param TX_EXTMVC_Request $request The current request
+        * @return boolean TRUE if this request type is supported, otherwise FALSE
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function canProcessRequest($request) {
+               foreach ($this->supportedRequestTypes as $supportedRequestType) {
+                       if ($request instanceof $supportedRequestType) return TRUE;
+               }
+               return FALSE;
+       }
+
+       /**
+        * Processes a general request. The result can be returned by altering the given response.
+        *
+        * @param TX_EXTMVC_Request $request The request object
+        * @param TX_EXTMVC_Response $response The response, modified by this handler
+        * @return void
+        * @throws TX_EXTMVC_Exception_UnsupportedRequestType if the controller doesn't support the current request type
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function processRequest(TX_EXTMVC_Request $request, TX_EXTMVC_Response $response) {
+               if (!$this->canProcessRequest($request)) throw new TX_EXTMVC_Exception_UnsupportedRequestType(get_class($this) . ' does not support requests of type "' . get_class($request) . '". Supported types are: ' . implode(' ', $this->supportedRequestTypes) , 1187701131);
+
+               $this->request = $request;
+               $this->request->setDispatched(TRUE);
+               $this->response = $response;
+
+               $this->initializeArguments();
+               $this->mapRequestArgumentsToLocalArguments();
+       }
+
+       /**
+        * Forwards the request to another controller.
+        *
+        * @return void
+        * @throws TX_EXTMVC_Exception_StopAction
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function forward($actionName, $controllerName = NULL, $packageKey = NULL, TX_EXTMVC_Controller_Arguments $arguments = NULL) {
+               $this->request->setDispatched(FALSE);
+               $this->request->setControllerActionName($actionName);
+               if ($controllerName !== NULL) $this->request->setControllerName($controllerName);
+               if ($packageKey !== NULL) $this->request->setControllerPackageKey($packageKey);
+               if ($arguments !== NULL) $this->request->setArguments($arguments);
+               throw new TX_EXTMVC_Exception_StopAction();
+       }
+
+       /**
+        * Redirects the web request to another uri.
+        *
+        * NOTE: This method only supports web requests and will thrown an exception if used with other request types.
+        *
+        * @param mixed $uri Either a string representation of a URI or a F3_FLOW3_Property_DataType_URI object
+        * @param integer $delay (optional) The delay in seconds. Default is no delay.
+        * @param integer $statusCode (optional) The HTTP status code for the redirect. Default is "303 See Other"
+        * @throws TX_EXTMVC_Exception_UnsupportedRequestType If the request is not a web request
+        * @throws TX_EXTMVC_Exception_StopAction
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function redirect($uri, $delay = 0, $statusCode = 303) {
+               if (!$this->request instanceof TX_EXTMVC_Web_Request) throw new TX_EXTMVC_Exception_UnsupportedRequestType('redirect() only supports web requests.', 1220539734);
+
+               $escapedUri = htmlentities($uri, ENT_QUOTES, 'utf-8');
+               $this->response->setContent('<html><head><meta http-equiv="refresh" content="' . intval($delay) . ';url=' . $escapedUri . '"/></head></html>');
+               $this->response->setStatus($statusCode);
+               $this->response->setHeader('Location', (string)$uri);
+               throw new TX_EXTMVC_Exception_StopAction();
+       }
+
+       /**
+        * Sends the specified HTTP status immediately.
+        *
+        * NOTE: This method only supports web requests and will thrown an exception if used with other request types.
+        *
+        * @param integer $statusCode The HTTP status code
+        * @param string $statusMessage A custom HTTP status message
+        * @param string $content Body content which further explains the status
+        * @throws TX_EXTMVC_Exception_UnsupportedRequestType If the request is not a web request
+        * @throws TX_EXTMVC_Exception_StopAction
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function throwStatus($statusCode, $statusMessage = NULL, $content = NULL) {
+               if (!$this->request instanceof TX_EXTMVC_Web_Request) throw new TX_EXTMVC_Exception_UnsupportedRequestType('throwStatus() only supports web requests.', 1220539739);
+
+               $this->response->setStatus($statusCode, $statusMessage);
+               if ($content === NULL) $content = $this->response->getStatus();
+               $this->response->setContent($content);
+               throw new TX_EXTMVC_Exception_StopAction();
+       }
+
+       /**
+        * Returns the arguments which are defined for this controller.
+        *
+        * Use this information if you want to know about what arguments are supported and / or
+        * required by this controller or if you'd like to know about further information about
+        * each argument.
+        *
+        * @return TX_EXTMVC_Controller_Arguments Supported arguments of this controller
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getArguments() {
+               return $this->arguments;
+       }
+
+       /**
+        * Initializes (registers / defines) arguments of this controller.
+        *
+        * Override this method to add arguments which can later be accessed
+        * by the action methods.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function initializeArguments() {
+       }
+
+       /**
+        * Maps arguments delivered by the request object to the local controller arguments.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       protected function mapRequestArgumentsToLocalArguments() {
+               $this->propertyMapper->setTarget($this->arguments);
+               foreach ($this->arguments as $argument) {
+                       if ($argument->getFilter() != NULL) $this->propertyMapper->registerFilter($argument->getFilter(), $argument->getName());
+                       if ($argument->getPropertyConverter() != NULL) $this->propertyMapper->registerPropertyConverter($argument->getPropertyConverter(), $argument->getName(), $argument->getPropertyConverterInputFormat());
+               }
+
+               $argumentsValidator = $this->objectFactory->create('F3_FLOW3_MVC_Controller_ArgumentsValidator', $this->arguments);
+               $this->propertyMapper->registerValidator($argumentsValidator);
+               $this->propertyMapper->setAllowedProperties(array_merge($this->arguments->getArgumentNames(), $this->arguments->getArgumentShortNames()));
+               $this->propertyMapper->map($this->request->getArguments());
+
+               $this->argumentMappingResults = $this->propertyMapper->getMappingResults();
+
+               foreach ($this->argumentMappingResults->getErrors() as $propertyName => $error) {
+                       if (isset($this->arguments[$propertyName])) {
+                               $this->arguments[$propertyName]->setValidity(FALSE);
+                               $this->arguments[$propertyName]->addError($error);
+                       }
+               }
+
+               foreach ($this->argumentMappingResults->getWarnings() as $propertyName => $warning) {
+                       if (isset($this->arguments[$propertyName])) $this->arguments[$propertyName]->addWarning($warning);
+               }
+
+               foreach ($this->argumentMappingResults->getIdentifiers() as $propertyName => $identifier) {
+                       if (isset($this->arguments[$propertyName])) $this->arguments[$propertyName]->setIdentifier($identifier);
+               }
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InfiniteLoop.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InfiniteLoop.php
new file mode 100644 (file)
index 0000000..ed007e3
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Infinite Loop" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InfiniteLoop extends TX_EXTMVC_Exception {
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidActionName.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidActionName.php
new file mode 100644 (file)
index 0000000..164f1bd
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "invalid action name" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidActionName extends TX_EXTMVC_Exception {
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidArgumentName.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidArgumentName.php
new file mode 100644 (file)
index 0000000..9d740c1
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Argument Name" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidArgumentName extends TX_EXTMVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidArgumentType.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidArgumentType.php
new file mode 100644 (file)
index 0000000..664c94f
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Argument Type" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+
+class InvalidArgumentType extends TX_EXTMVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidArgumentValue.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidArgumentValue.php
new file mode 100644 (file)
index 0000000..9d29c29
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Argument Value" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+
+class InvalidArgumentValue extends TX_EXTMVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidController.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidController.php
new file mode 100644 (file)
index 0000000..796769f
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Controller" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+
+class InvalidController extends TX_EXTMVC_Exception {
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidControllerName.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidControllerName.php
new file mode 100644 (file)
index 0000000..418cee1
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Controller Name" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidControllerName extends TX_EXTMVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidFormat.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidFormat.php
new file mode 100644 (file)
index 0000000..8e6aab9
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Format" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidFormat extends TX_EXTMVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidMarker.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidMarker.php
new file mode 100644 (file)
index 0000000..5998348
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Marker" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidMarker extends TX_EXTMVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidPackageKey.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidPackageKey.php
new file mode 100644 (file)
index 0000000..6578a9e
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Package Key" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidPackageKey extends TX_EXTMVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidPart.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidPart.php
new file mode 100644 (file)
index 0000000..c8a2115
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Part" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidPart extends TX_EXTMVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidRequestMethod.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidRequestMethod.php
new file mode 100644 (file)
index 0000000..17e8941
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Request Method" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidRequestMethod extends TX_EXTMVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidRequestType.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidRequestType.php
new file mode 100644 (file)
index 0000000..018813d
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Request Type" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidRequestType extends TX_EXTMVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidRoutePartHandler.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidRoutePartHandler.php
new file mode 100644 (file)
index 0000000..a746104
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "invalid RoutePartHandler" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidRoutePartHandler extends TX_EXTMVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidTemplateResource.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidTemplateResource.php
new file mode 100644 (file)
index 0000000..fdad9b8
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Invalid Template Resource" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidTemplateResource extends TX_EXTMVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidViewHelper.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_InvalidViewHelper.php
new file mode 100644 (file)
index 0000000..d2930c4
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "invalid ViewHelper" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class InvalidViewHelper extends TX_EXTMVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_NoSuchAction.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_NoSuchAction.php
new file mode 100644 (file)
index 0000000..c562c51
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A "No Such Action" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class NoSuchAction extends TX_EXTMVC_Exception {
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_NoSuchArgument.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_NoSuchArgument.php
new file mode 100644 (file)
index 0000000..af9c9d8
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A "No Such Argument" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class NoSuchArgument extends TX_EXTMVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_NoSuchController.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_NoSuchController.php
new file mode 100644 (file)
index 0000000..103dfc4
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A "No Such Controller" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class NoSuchController extends TX_EXTMVC_Exception {
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_StopAction.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_StopAction.php
new file mode 100644 (file)
index 0000000..bb42108
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * This exception is thrown by a controller to stop the execution of the current
+ * action and return the control to the dispatcher. The dispatcher catches this
+ * exception and - depending on the "dispatched" status of the request - either
+ * continues dispatching the request or returns control to the request handler.
+ *
+ * See the Action Controller's forward() and redirect() methods for more information.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class StopAction extends TX_EXTMVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_SuccessiveDynamicRouteParts.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_SuccessiveDynamicRouteParts.php
new file mode 100644 (file)
index 0000000..1114449
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Successive Dynamic RoutePart" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class SuccessiveDynamicRouteParts extends TX_EXTMVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_UnsupportedRequestType.php b/typo3/sysext/extbase/Classes/Exception/TX_EXTMVC_Exception_UnsupportedRequestType.php
new file mode 100644 (file)
index 0000000..d48e6c5
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An "Unsupported Request Type" exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class UnsupportedRequestType extends TX_EXTMVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/TX_EXTMVC_DefaultRequestHandler.php b/typo3/sysext/extbase/Classes/TX_EXTMVC_DefaultRequestHandler.php
new file mode 100644 (file)
index 0000000..678a2d5
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+declare(ENCODING = 'utf-8');
+namespace F3_FLOW3_MVC;
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id: F3_FLOW3_MVC_DefaultRequestHandler.php 1749 2009-01-15 15:06:30Z k-fish $
+ */
+
+/**
+ * A Special Case of a Request Handler: This default handler is used, if no other request
+ * handler was found which could handle the request.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id: F3_FLOW3_MVC_DefaultRequestHandler.php 1749 2009-01-15 15:06:30Z k-fish $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class DefaultRequestHandler implements F3_FLOW3_MVC_RequestHandlerInterface {
+
+       /**
+        * Handles the request
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function handleRequest() {
+               echo ('FLOW3: This is the default request handler - no other suitable request handler could be determined.');
+       }
+
+       /**
+        * This request handler can handle any request, as it is the default request handler.
+        *
+        * @return boolean TRUE
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function canHandleRequest() {
+               return TRUE;
+       }
+
+       /**
+        * Returns the priority - how eager the handler is to actually handle the
+        * request.
+        *
+        * @return integer The priority of the request handler. Always "0" = fallback.
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getPriority() {
+               return 0;
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/TX_EXTMVC_Exception.php b/typo3/sysext/extbase/Classes/TX_EXTMVC_Exception.php
new file mode 100644 (file)
index 0000000..cf1a784
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A generic MVC exception
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class Exception extends F3_FLOW3_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/TX_EXTMVC_Request.php b/typo3/sysext/extbase/Classes/TX_EXTMVC_Request.php
new file mode 100644 (file)
index 0000000..61f84b8
--- /dev/null
@@ -0,0 +1,426 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * Represents a generic request.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope prototype
+ */
+class Request {
+
+       const PATTERN_MATCH_FORMAT = '/^[a-z0-9]{1,5}$/';
+
+       /**
+        * @var F3_FLOW3_Object_ManagerInterface
+        */
+       protected $objectManager;
+
+       /**
+        * @var F3_FLOW3_Package_ManagerInterface
+        */
+       protected $packageManager;
+
+       /**
+        * Pattern after which the controller object name is built
+        *
+        * @var string
+        */
+       protected $controllerObjectNamePattern = 'F3_@package_Controller_@controllerController';
+
+       /**
+        * Pattern after which the view object name is built
+        *
+        * @var string
+        */
+       protected $viewObjectNamePattern = 'F3_@package_View_@controller@action@format';
+
+       /**
+        * Package key of the controller which is supposed to handle this request.
+        *
+        * @var string
+        */
+       protected $controllerPackageKey = 'FLOW3_MVC';
+
+       /**
+        * Subpackage key of the controller which is supposed to handle this request.
+        *
+        * @var string
+        */
+       protected $controllerSubpackageKey;
+
+       /**
+        * @var string Object name of the controller which is supposed to handle this request.
+        */
+       protected $controllerName = 'Default';
+
+       /**
+        * @var string Name of the action the controller is supposed to take.
+        */
+       protected $controllerActionName = 'index';
+
+       /**
+        * @var ArrayObject The arguments for this request
+        */
+       protected $arguments;
+
+       /**
+        * @var string The requested representation format
+        */
+       protected $format = 'txt';
+
+       /**
+        * @var boolean If this request has been changed and needs to be dispatched again
+        */
+       protected $dispatched = FALSE;
+
+       /**
+        * Constructs this request
+        *
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function __construct() {
+               $this->arguments = new ArrayObject;
+       }
+
+       /**
+        * Injects the object manager
+        *
+        * @param F3_FLOW3_Object_ManagerInterface $objectManager A reference to the object manager
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function injectObjectManager(F3_FLOW3_Object_ManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * Injects the package
+        *
+        * @param F3_FLOW3_Package_ManagerInterface $packageManager A reference to the package manager
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function injectPackageManager(F3_FLOW3_Package_ManagerInterface $packageManager) {
+               $this->packageManager = $packageManager;
+       }
+
+       /**
+        * Sets the dispatched flag
+        *
+        * @param boolean $flag If this request has been dispatched
+        * @return void
+        */
+       public function setDispatched($flag) {
+               $this->dispatched = $flag ? TRUE : FALSE;
+       }
+
+       /**
+        * If this request has been dispatched and addressed by the responsible
+        * controller and the response is ready to be sent.
+        *
+        * The dispatcher will try to dispatch the request again if it has not been
+        * addressed yet.
+        *
+        * @return boolean TRUE if this request has been disptached sucessfully
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function isDispatched() {
+               return $this->dispatched;
+       }
+
+       /**
+        * Returns the object name of the controller defined by the package key and
+        * controller name
+        *
+        * @return string The controller's Object Name
+        * @throws F3_FLOW3_MVC:Exception_NoSuchController if the controller does not exist
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getControllerObjectName() {
+               $lowercaseObjectName = str_replace('@package', $this->controllerPackageKey, $this->controllerObjectNamePattern);
+               $lowercaseObjectName = str_replace('@subpackage', $this->controllerSubpackageKey, $lowercaseObjectName);
+               $lowercaseObjectName = strtolower(str_replace('@controller', $this->controllerName, $lowercaseObjectName));
+               $objectName = $this->objectManager->getCaseSensitiveObjectName($lowercaseObjectName);
+               if ($objectName === FALSE) throw new TX_EXTMVC_Exception_NoSuchController('The controller object "' . $lowercaseObjectName . '" does not exist.', 1220884009);
+
+               return $objectName;
+       }
+
+       /**
+        * Sets the pattern for building the controller object name.
+        *
+        * The pattern may contain the placeholders "@package" and "@controller" which will be substituted
+        * by the real package key and controller name.
+        *
+        * @param string $pattern The pattern
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setControllerObjectNamePattern($pattern) {
+               $this->controllerObjectNamePattern = $pattern;
+       }
+
+       /**
+        * Returns the pattern for building the controller object name.
+        *
+        * @return string $pattern The pattern
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getControllerObjectNamePattern() {
+               return $this->controllerObjectNamePattern;
+       }
+
+       /**
+        * Sets the pattern for building the view object name
+        *
+        * @param string $pattern The view object name pattern, eg. F3_@package_View::@controller@action
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setViewObjectNamePattern($pattern) {
+               if (!is_string($pattern)) throw new InvalidArgumentException('The view object name pattern must be a valid string, ' . gettype($pattern) . ' given.', 1221563219);
+               $this->viewObjectNamePattern = $pattern;
+       }
+
+       /**
+        * Returns the View Object Name Pattern
+        *
+        * @return string The pattern
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getViewObjectNamePattern() {
+               return $this->viewObjectNamePattern;
+       }
+
+       /**
+        * Returns the view's (possible) object name according to the defined view object
+        * name pattern and the specified values for package, controller, action and format.
+        *
+        * If no valid view object name could be resolved, FALSE is returned
+        *
+        * @return mixed Either the view object name or FALSE
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getViewObjectName() {
+               $possibleViewName = $this->viewObjectNamePattern;
+               $possibleViewName = str_replace('@package', $this->controllerPackageKey, $possibleViewName);
+               $possibleViewName = str_replace('@subpackage', $this->controllerSubpackageKey, $possibleViewName);
+               $possibleViewName = str_replace('@controller', $this->controllerName, $possibleViewName);
+               $possibleViewName = str_replace('@action', $this->controllerActionName, $possibleViewName);
+
+               $viewObjectName = $this->objectManager->getCaseSensitiveObjectName(str_replace('@format', $this->format, $possibleViewName));
+               if ($viewObjectName === FALSE) {
+                       $viewObjectName = $this->objectManager->getCaseSensitiveObjectName(str_replace('@format', '', $possibleViewName));
+               }
+               return $viewObjectName;
+       }
+
+       /**
+        * Sets the package key of the controller.
+        *
+        * @param string $packageKey The package key.
+        * @return void
+        * @throws TX_EXTMVC_Exception_InvalidPackageKey if the package key is not valid
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setControllerPackageKey($packageKey) {
+               $upperCamelCasedPackageKey = $this->packageManager->getCaseSensitivePackageKey($packageKey);
+               if ($upperCamelCasedPackageKey === FALSE) throw new TX_EXTMVC_Exception_InvalidPackageKey('"' . $packageKey . '" is not a valid package key.', 1217961104);
+               $this->controllerPackageKey = $upperCamelCasedPackageKey;
+       }
+
+       /**
+        * Returns the package key of the specified controller.
+        *
+        * @return string The package key
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getControllerPackageKey() {
+               return $this->controllerPackageKey;
+       }
+
+       /**
+        * Sets the subpackage key of the controller.
+        *
+        * @param string $subpackageKey The subpackage key.
+        * @return void
+        * @author Bastian Waidelich <bastian@typo3.org>
+        */
+       public function setControllerSubpackageKey($subpackageKey) {
+               $this->controllerSubpackageKey = $subpackageKey;
+       }
+
+       /**
+        * Returns the subpackage key of the specified controller.
+        *
+        * @return string The subpackage key
+        * @author Bastian Waidelich <bastian@typo3.org>
+        */
+       public function getControllerSubpackageKey() {
+               return $this->controllerSubpackageKey;
+       }
+
+       /**
+        * Sets the name of the controller which is supposed to handle the request.
+        * Note: This is not the object name of the controller!
+        *
+        * @param string $controllerName Name of the controller
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setControllerName($controllerName) {
+               if (!is_string($controllerName)) throw new TX_EXTMVC_Exception_InvalidControllerName('The controller name must be a valid string, ' . gettype($controllerName) . ' given.', 1187176358);
+               if (strpos($controllerName, '_') !== FALSE) throw new TX_EXTMVC_Exception_InvalidControllerName('The controller name must not contain underscores.', 1217846412);
+               $this->controllerName = $controllerName;
+       }
+
+       /**
+        * Returns the object name of the controller supposed to handle this request, if one
+        * was set already (if not, the name of the default controller is returned)
+        *
+        * @return string Object name of the controller
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getControllerName() {
+               return $this->controllerName;
+       }
+
+       /**
+        * Sets the name of the action contained in this request.
+        *
+        * Note that the action name must start with a lower case letter.
+        *
+        * @param string $actionName: Name of the action to execute by the controller
+        * @return void
+        * @throws TX_EXTMVC_Exception_InvalidActionName if the action name is not valid
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setControllerActionName($actionName) {
+               if (!is_string($actionName)) throw new TX_EXTMVC_Exception_InvalidActionName('The action name must be a valid string, ' . gettype($actionName) . ' given (' . $actionName . ').', 1187176358);
+               if ($actionName{0} !== F3_PHP6_Functions::strtolower($actionName{0})) throw new TX_EXTMVC_Exception_InvalidActionName('The action name must start with a lower case letter, "' . $actionName . '" does not match this criteria.', 1218473352);
+               $this->controllerActionName = $actionName;
+       }
+
+       /**
+        * Returns the name of the action the controller is supposed to execute.
+        *
+        * @return string Action name
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getControllerActionName() {
+               return $this->controllerActionName;
+       }
+
+       /**
+        * Sets the value of the specified argument
+        *
+        * @param string $argumentName Name of the argument to set
+        * @param mixed $value The new value
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setArgument($argumentName, $value) {
+               if (!is_string($argumentName) || F3_PHP6_Functions::strlen($argumentName) == 0) throw new TX_EXTMVC_Exception_InvalidArgumentName('Invalid argument name.', 1210858767);
+               $this->arguments[$argumentName] = $value;
+       }
+
+       /**
+        * Sets the whole arguments ArrayObject and therefore replaces any arguments
+        * which existed before.
+        *
+        * @param ArrayObject $arguments An ArrayObject of argument names and their values
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setArguments(_ArrayObject $arguments) {
+               $this->arguments = $arguments;
+       }
+
+       /**
+        * Returns an ArrayObject of arguments and their values
+        *
+        * @return ArrayObject ArrayObject of arguments and their values (which may be arguments and values as well)
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getArguments() {
+               return $this->arguments;
+       }
+
+       /**
+        * Sets the requested representation format
+        *
+        * @param string $format The desired format, something like "html", "xml", "png", "json" or the like.
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setFormat($format) {
+               if (!preg_match(self::PATTERN_MATCH_FORMAT, $format)) throw new TX_EXTMVC_Exception_InvalidFormat('An invalid request format (' . $format . ') was given.', 1218015038);
+               $this->format = $format;
+       }
+
+       /**
+        * Returns the requested representation format
+        *
+        * @return string The desired format, something like "html", "xml", "png", "json" or the like.
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getFormat() {
+               return $this->format;
+       }
+
+       /**
+        * Returns the value of the specified argument
+        *
+        * @param string $argumentName Name of the argument
+        * @return string Value of the argument
+        * @author Robert Lemke <robert@typo3.org>
+        * @throws TX_EXTMVC_Exception_NoSuchArgument if such an argument does not exist
+        */
+       public function getArgument($argumentName) {
+               if (!isset($this->arguments[$argumentName])) throw new TX_EXTMVC_Exception_NoSuchArgument('An argument "' . $argumentName . '" does not exist for this request.', 1176558158);
+               return $this->arguments[$argumentName];
+       }
+
+       /**
+        * Checks if an argument of the given name exists (is set)
+        *
+        * @param string $argumentName Name of the argument to check
+        * @return boolean TRUE if the argument is set, otherwise FALSE
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function hasArgument($argumentName) {
+               return isset($this->arguments[$argumentName]);
+       }
+}
+?>
diff --git a/typo3/sysext/extbase/Classes/TX_EXTMVC_RequestHandlerInterface.php b/typo3/sysext/extbase/Classes/TX_EXTMVC_RequestHandlerInterface.php
new file mode 100644 (file)
index 0000000..6207719
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * The interface for a request handler
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @author Robert Lemke <robert@typo3.org>
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+interface RequestHandlerInterface {
+
+       /**
+        * Handles a raw request and sends the respsonse.
+        *
+        * @return void
+        */
+       public function handleRequest();
+
+       /**
+        * Checks if the request handler can handle the current request.
+        *
+        * @return boolean TRUE if it can handle the request, otherwise FALSE
+        */
+       public function canHandleRequest();
+
+       /**
+        * Returns the priority - how eager the handler is to actually handle the
+        * request. An integer > 0 means "I want to handle this request" where
+        * "100" is default. "0" means "I am a fallback solution".
+        *
+        * If the handler cannot handle the request, a LogicException should be
+        * thrown.
+        *
+        * @return integer The priority of the request handler
+        */
+       public function getPriority();
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/TX_EXTMVC_RequestHandlerResolver.php b/typo3/sysext/extbase/Classes/TX_EXTMVC_RequestHandlerResolver.php
new file mode 100644 (file)
index 0000000..b49fcad
--- /dev/null
@@ -0,0 +1,91 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * Analyzes the raw request and delivers a request handler which can handle it.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class RequestHandlerResolver {
+
+       /**
+        * @var F3_FLOW3_ObjectManagerInterface Reference to the object manager
+        */
+       protected $objectManager;
+
+       /**
+        * The FLOW3 settings
+        * @var array
+        */
+       protected $configuration;
+
+       /**
+        * Constructs the Request Handler Resolver
+        *
+        * @param array $settings The FLOW3 settings
+        * @param F3_FLOW3_ObjectManagerInterface $objectManager A reference to the object manager
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function __construct(array $settings, F3_FLOW3_Object_ManagerInterface $objectManager) {
+               $this->settings = $settings;
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * Analyzes the raw request and tries to find a request handler which can handle
+        * it. If none is found, an exception is thrown.
+        *
+        * @return TX_EXTMVC_RequestHandler A request handler
+        * @throws TX_EXTMVC_Exception
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function resolveRequestHandler() {
+               $availableRequestHandlerClassNames = $this->settings['mvc']['availableRequestHandlers'];
+
+               $suitableRequestHandlers = array();
+               foreach ($availableRequestHandlerClassNames as $requestHandlerClassName) {
+                       $requestHandler = $this->objectManager->getObject($requestHandlerClassName);
+                       if ($requestHandler->canHandleRequest()) {
+                               $priority = $requestHandler->getPriority();
+                               if (isset($suitableRequestHandlers[$priority])) throw new LogicException('More than one request handler with the same priority can handle the request, but only one handler may be active at a time!', 1176475350);
+                               $suitableRequestHandlers[$priority] = $requestHandler;
+                       }
+               }
+               if (count($suitableRequestHandlers) == 0) throw new TX_EXTMVC_Exception('No suitable request handler found.', 1205414233);
+               ksort($suitableRequestHandlers);
+               return array_pop($suitableRequestHandlers);
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/TX_EXTMVC_RequestProcessorChainManager.php b/typo3/sysext/extbase/Classes/TX_EXTMVC_RequestProcessorChainManager.php
new file mode 100644 (file)
index 0000000..277c95c
--- /dev/null
@@ -0,0 +1,127 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A Manager for the Request Processor Chain. This chain is used to post-process
+ * the Request object prior to handing it over to the Request Dispatcher.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class RequestProcessorChainManager {
+
+       /**
+        * @var array Supported request types
+        */
+       protected $supportedRequestTypes = array('F3_FLOW3_MVC_Request', 'F3_FLOW3_MVC_Web_Request', 'F3_FLOW3_MVC_CLI_Request');
+
+       /**
+        * @var array Registered request processors, grouped by request type
+        */
+       protected $requestProcessors = array();
+
+       /**
+        * Processes the given request object by invoking the processors
+        * of the processor chain.
+        *
+        * @param TX_EXTMVC_Request $request The request object - changes are applied directly to this object by the processors.
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function processRequest(TX_EXTMVC_Request $request) {
+               $requestTypes = array_keys($this->requestProcessors);
+               foreach ($requestTypes as $requestType) {
+                       if ($request instanceof $requestType) {
+                               foreach ($this->requestProcessors[$requestType] as $requestProcessor) {
+                                       $requestProcessor->processRequest($request);
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Registers a Request Processor for the specified request type.
+        *
+        * @param TX_EXTMVC_RequestProcessorInterface $requestProcessor: The request processor
+        * @param string $requestType: Type (class- or interface name) of the request this processor is interested in
+        * @return void
+        * @throws TX_EXTMVC_Exception_InvalidRequestType if the request type is not supported.
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function registerRequestProcessor(TX_EXTMVC_RequestProcessorInterface $requestProcessor, $requestType) {
+               if (!in_array($requestType, $this->supportedRequestTypes, TRUE)) throw new TX_EXTMVC_Exception_InvalidRequestType('"' . $requestType . '" is not a valid request type - or at least it\'s not supported by the Request Processor Chain.', 1187260972);
+               $this->requestProcessors[$requestType][] = $requestProcessor;
+       }
+
+       /**
+        * Unregisters the given Request Processor. If a request type is specified,
+        * the Processor will only be removed from that chain accordingly.
+        *
+        * Triggers no_ error if the request processor did not exist.
+        *
+        * @param TX_EXTMVC_RequestProcessorInterface $requestProcessor The request processor
+        * @param string $requestType Type (class- or interface name) of the request this processor is interested in
+        * @return void
+        * @throws TX_EXTMVC_Exception_InvalidRequestType if the request type is not supported.
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function unregisterRequestProcessor(TX_EXTMVC_RequestProcessorInterface $requestProcessor, $requestType = NULL) {
+               if ($requestType !== NULL) {
+                       if (!in_array($requestType, $this->supportedRequestTypes, TRUE)) throw new TX_EXTMVC_Exception_InvalidRequestType('"' . $requestType . '" is not a valid request type - or at least it\'s not supported by the Request Processor Chain.', 1187261072);
+                       foreach ($this->requestProcessors[$requestType] as $index => $existingRequestProcessor) {
+                               if ($existingRequestProcessor === $requestProcessor) {
+                                       unset($this->requestProcessors[$requestType][$index]);
+                               }
+                       }
+               } else {
+                       foreach ($this->requestProcessors as $requestType => $requestProcessorsForThisType) {
+                               foreach ($requestProcessorsForThisType as $index => $existingRequestProcessor) {
+                                       if ($existingRequestProcessor === $requestProcessor) {
+                                               unset($this->requestProcessors[$requestType][$index]);
+                                       }
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Returns an array of all registered request processors, grouped by request type.
+        *
+        * @return array An array of request types of request processor objects
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getRegisteredRequestProcessors() {
+               return $this->requestProcessors;
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/TX_EXTMVC_RequestProcessorInterface.php b/typo3/sysext/extbase/Classes/TX_EXTMVC_RequestProcessorInterface.php
new file mode 100644 (file)
index 0000000..b6d107b
--- /dev/null
@@ -0,0 +1,52 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * Contract for a Request Processor. Objects of this kind are registered
+ * via the Request Processor Chain Manager.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @author Robert Lemke <robert@typo3.org>
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+interface RequestProcessorInterface {
+
+       /**
+        * Processes the given request (ie. analyzes and modifies if necessary).
+        *
+        * @param TX_EXTMVC_Request $request The request
+        * @return void
+        */
+       public function processRequest(TX_EXTMVC_Request $request);
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/TX_EXTMVC_Response.php b/typo3/sysext/extbase/Classes/TX_EXTMVC_Response.php
new file mode 100644 (file)
index 0000000..ba28cfb
--- /dev/null
@@ -0,0 +1,91 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A generic and very basic response implementation
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope prototype
+ */
+class Response {
+
+       /**
+        * @var string The response content
+        */
+       protected $content = NULL;
+
+       /**
+        * Overrides and sets the content of the response
+        *
+        * @param string $content The response content
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setContent($content) {
+               $this->content = $content;
+       }
+
+       /**
+        * Appends content to the already existing content.
+        *
+        * @param string $content More response content
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function appendContent($content) {
+               $this->content .= $content;
+       }
+
+       /**
+        * Returns the response content without sending it.
+        *
+        * @return string The response content
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getContent() {
+               return $this->content;
+       }
+
+       /**
+        * Sends the response
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function send() {
+               if ($this->content !== NULL) {
+                       echo $this->getContent();
+               }
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/View/Helper/TX_EXTMVC_View_Helper_AbstractHelper.php b/typo3/sysext/extbase/Classes/View/Helper/TX_EXTMVC_View_Helper_AbstractHelper.php
new file mode 100644 (file)
index 0000000..9eb7fa1
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An abstract View Helper
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+abstract class AbstractHelper implements TX_EXTMVC_View_Helper_HelperInterface {
+
+       /**
+        * @var TX_EXTMVC_Web_Request
+        */
+       protected $request;
+
+       /**
+        * Sets the current request
+        */
+       public function setRequest(TX_EXTMVC_Web_Request $request) {
+               $this->request = $request;
+       }
+}
+
+?>
diff --git a/typo3/sysext/extbase/Classes/View/Helper/TX_EXTMVC_View_Helper_HelperInterface.php b/typo3/sysext/extbase/Classes/View/Helper/TX_EXTMVC_View_Helper_HelperInterface.php
new file mode 100644 (file)
index 0000000..a9c8460
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * View Helper interface
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+interface HelperInterface {
+
+       /**
+        * Sets the current request
+        */
+       public function setRequest(TX_EXTMVC_Web_Request $request);
+}
+
+?>
diff --git a/typo3/sysext/extbase/Classes/View/Helper/TX_EXTMVC_View_Helper_URIHelper.php b/typo3/sysext/extbase/Classes/View/Helper/TX_EXTMVC_View_Helper_URIHelper.php
new file mode 100644 (file)
index 0000000..c2fe68a
--- /dev/null
@@ -0,0 +1,105 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A URI/Link Helper
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class URIHelper extends TX_EXTMVC_View_Helper_AbstractHelper {
+
+       /**
+        * @var TX_EXTMVC_Web_Routing_RouterInterface
+        */
+       protected $router;
+
+       /**
+        * Injects the Router
+        * 
+        * @param TX_EXTMVC_Web_Routing_RouterInterface $router
+        * @return void
+        * @author Bastian Waidelich <bastian@typo3.org>
+        */
+       public function injectRouter(TX_EXTMVC_Web_Routing_RouterInterface $router) {
+               $this->router = $router;
+       }
+
+       /**
+        * Creates a link by making use of the Routers reverse routing mechanism.
+        * 
+        * @param string $label Inner HTML of the generated link. Label is htmlspecialchared by default
+        * @param string $actionName Name of the action to be called
+        * @param array $arguments Additional arguments
+        * @param string $controllerName Name of the target controller. If not set, current controller is used
+        * @param string $packageKey Name of the target package. If not set, current package is used
+        * @param string $subpackageKey Name of the target subpackage. If not set, current subpackage is used
+        * @param array $options Further options
+        * @return string the HTML code for the generated link
+        * @see UIRFor()
+        * @author Bastian Waidelich <bastian@typo3.org>
+        */
+       public function linkTo($label, $actionName, $arguments = array(), $controllerName = NULL, $packageKey = NULL, $subpackageKey = NULL, $options = array()) {
+               $link = '<a href="' . $this->URIFor($actionName, $arguments, $controllerName, $packageKey, $subpackageKey, $options) . '">' . htmlspecialchars($label) . '</a>';
+               return $link;
+       }
+
+       /**
+        * Creates an URI by making use of the Routers reverse routing mechanism.
+        * 
+        * @param string $actionName Name of the action to be called
+        * @param array $arguments Additional arguments
+        * @param string $controllerName Name of the target controller. If not set, current controller is used
+        * @param string $packageKey Name of the target package. If not set, current package is used
+        * @param string $subpackageKey Name of the target subpackage. If not set, current subpackage is used
+        * @param array $options Further options
+        * @return string the HTML code for the generated link
+        * @author Bastian Waidelich <bastian@typo3.org>
+        */
+       public function URIFor($actionName, $arguments = array(), $controllerName = NULL, $packageKey = NULL, $subpackageKey = NULL, $options = array()) {
+               $routeValues = $arguments;
+               $routeValues['@action'] = $actionName;
+               $routeValues['@controller'] = ($controllerName === NULL) ? $this->request->getControllerName() : $controllerName;
+               $routeValues['@package'] = ($packageKey === NULL) ? $this->request->getControllerPackageKey() : $packageKey;
+               $currentSubpackageKey = $this->request->getControllerSubpackageKey();
+               if ($subpackageKey === NULL && strlen($currentSubpackageKey)) {
+                       $routeValues['@subpackage'] = $currentSubpackageKey;
+               } else if (strlen($subpackageKey)) {
+                       $routeValues['@subpackage'] = $subpackageKey;
+               }
+
+               $URIString = $this->router->resolve($routeValues);
+               return $URIString;
+       }
+}
+
+?>
diff --git a/typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_AbstractView.php b/typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_AbstractView.php
new file mode 100755 (executable)
index 0000000..3bbd41f
--- /dev/null
@@ -0,0 +1,147 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An abstract View
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+abstract class AbstractView {
+
+       /**
+        * @var F3_FLOW3_Object_FactoryInterface A reference to the Object Factory
+        */
+       protected $objectFactory;
+
+       /**
+        * @var F3_FLOW3_Package_FactoryInterface
+        */
+       protected $packageManager;
+
+       /**
+        * @var F3_FLOW3_Resource_ManagerInterface
+        */
+       protected $resourceManager;
+
+       /**
+        * @var F3_FLOW3_Object_ManagerInterface
+        */
+       protected $objectManager;
+
+       /**
+        * @var TX_EXTMVC_Request
+        */
+       protected $request;
+
+       /**
+        * @var array of TX_EXTMVC_View_Helper_HelperInterface
+        */
+       protected $viewHelpers;
+
+       /**
+        * Constructs the view.
+        *
+        * @param F3_FLOW3_Object_FactoryInterface $objectFactory A reference to the Object Factory
+        * @param F3_FLOW3_Package_ManagerInterface $packageManager A reference to the Package Manager
+        * @param F3_FLOW3_Resource_Manager $resourceManager A reference to the Resource Manager
+        * @param F3_FLOW3_Object_ManagerInterface $objectManager A reference to the Object Manager
+        * @author Robert Lemke <robert@typo3.org>
+        * @author Karsten Dambekalns <karsten@typo3.org>
+        */
+       public function __construct(F3_FLOW3_Object_FactoryInterface $objectFactory, F3_FLOW3_Package_ManagerInterface $packageManager, F3_FLOW3_Resource_Manager $resourceManager, F3_FLOW3_Object_ManagerInterface $objectManager) {
+               $this->objectFactory = $objectFactory;
+               $this->objectManager = $objectManager;
+               $this->packageManager = $packageManager;
+               $this->resourceManager = $resourceManager;
+       }
+
+       /**
+        * Initializes the view after all dependencies have been injected
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function initializeObject() {
+               $this->initializeView();
+       }
+
+       /**
+        * Sets the current request
+        *
+        * @param TX_EXTMVC_Request $request
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setRequest(TX_EXTMVC_Request $request) {
+               $this->request = $request;
+       }
+
+       /**
+        * Returns an View Helper instance.
+        * View Helpers must implement the interface TX_EXTMVC_View_Helper_HelperInterface
+        *
+        * @param string $viewHelperClassName the full name of the View Helper Class including 
+        * @return TX_EXTMVC_View_Helper_HelperInterface The View Helper instance
+        * @author Bastian Waidelich <bastian@typo3.org>
+        */
+       public function getViewHelper($viewHelperClassName) {
+               if (!isset($this->viewHelpers[$viewHelperClassName])) {
+                       $viewHelper = $this->objectManager->getObject($viewHelperClassName);
+                       if (!$viewHelper instanceof TX_EXTMVC_View_Helper_HelperInterface) {
+                               throw new TX_EXTMVC_Exception_InvalidViewHelper('View Helpers must implement interface "TX_EXTMVC_View_Helper_HelperInterface"', 1222895456);
+                       }
+                       $viewHelper->setRequest($this->request);
+                       $this->viewHelpers[$viewHelperClassName] = $viewHelper;
+               }
+               return $this->viewHelpers[$viewHelperClassName];
+       }
+
+       /**
+        * Initializes this view.
+        *
+        * Override this method for initializing your concrete view implementation.
+        *
+        * @return void
+        */
+       protected function initializeView() {
+       }
+
+       /**
+        * Renders the view
+        *
+        * @return string The rendered view
+        */
+       abstract public function render();
+}
+
+?>
diff --git a/typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_DefaultView.php b/typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_DefaultView.php
new file mode 100755 (executable)
index 0000000..ef8d4b2
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * The default view - a special case.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class DefaultView extends TX_EXTMVC_View_AbstractView {
+
+       /**
+        * @var TX_EXTMVC_Request
+        */
+       protected $request;
+
+       /**
+        * Renders the default view
+        *
+        * @return string The rendered view
+        * @author Karsten Dambekalns <karsten@typo3.org>
+        * @throws TX_EXTMVC_Exception if no request has been set
+        */
+       public function render() {
+               if (!is_object($this->request)) throw new TX_EXTMVC_Exception('Can\'t render view without request object.', 1192450280);
+
+               $template = $this->objectFactory->create('F3_FLOW3_MVC_View_Template');
+               $template->setTemplateResource($this->resourceManager->getResource('file://FLOW3/Public/MVC/DefaultView_Template.html')->getContent());
+
+               if ($this->request instanceof TX_EXTMVC_Web_Request) {
+                       $template->setMarkerContent('baseuri', $this->request->getBaseURI());
+               }
+               return $template->render();
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_EmptyView.php b/typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_EmptyView.php
new file mode 100644 (file)
index 0000000..ac0424c
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * An empty view - a special case.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class EmptyView extends TX_EXTMVC_View_AbstractView {
+
+       /**
+        * Renders the empty view
+        *
+        * @return string An empty string
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function render() {
+               return '';
+       }
+
+       /**
+        * A magic call method.
+        *
+        * Because this empty view is used as a Special Case in situations when no matching
+        * view is available, it must be able to handle method calls which originally were
+        * directed to another type of view. This magic method should prevent PHP from issuing
+        * a fatal error.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function __call($methodName, array $arguments) {
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_Template.php b/typo3/sysext/extbase/Classes/View/TX_EXTMVC_View_Template.php
new file mode 100644 (file)
index 0000000..39bb1fc
--- /dev/null
@@ -0,0 +1,136 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A basic Template View
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope prototype
+ */
+class Template extends TX_EXTMVC_View_AbstractView {
+
+       /**
+        * @var string
+        */
+       protected $templateResource;
+
+       /**
+        * @var array Marker identifiers and their replacement content
+        */
+       protected $markers = array();
+
+       /**
+        * @var array Parts
+        */
+       protected $parts = array();
+
+       /**
+        * Sets the text resource which contains the markers this template view
+        * is going to fill in.
+        *
+        * As long as we don't have a Resource Framework, this method just accepts
+        * a string.
+        *
+        * @param string $template The template
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        * @todo Adapt as soon as we have a Resource Management
+        */
+       public function setTemplateResource($templateResource) {
+               $this->templateResource = $templateResource;
+       }
+
+       /**
+        * Sets the content of a marker. All markers with this name will be
+        * replaced by the content when this template is rendered.
+        *
+        * @param string $marker The marker which will be replaced by $content
+        * @param string $content The fill-in for the specified marker
+        * @return void
+        * @throws TX_EXTMVC_Exception_InvalidMarker if the marker is not a valid string
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setMarkerContent($marker, $content) {
+               if (!is_string($marker)) throw new TX_EXTMVC_Exception_InvalidMarker('A template marker must be a valid string, ' . gettype($marker) . ' given.', 1187334295);
+               $this->markers[$marker] = $content;
+       }
+
+       /**
+        * Sets the content of a part. All parts which are enclosed by markers
+        * with this name will be replaced by the content when this template
+        * is rendered.
+        *
+        * @param string $partMarker Marker which identifies the part
+        * @param string $content The fill-in for the specified part
+        * @return void
+        * @throws TX_EXTMVC_Exception_InvalidPart if the part marker is not a valid string
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setPartContent($partMarker, $content) {
+               if (!is_string($partMarker)) throw new TX_EXTMVC_Exception_InvalidPart('A template part marker must be a valid string, ' . gettype($partMarker) . ' given.', 1187334296);
+               $this->parts[$partMarker] = $content;
+       }
+
+       /**
+        * Renders this template view.
+        *
+        * @return string The rendered template view
+        * @throws TX_EXTMVC_Exception_InvalidTemplateResource if no template resource has been defined yet
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function render() {
+               if ($this->templateResource == '') throw new TX_EXTMVC_Exception_InvalidTemplateResource('No template resource has been defined yet.', 1187860750);
+               $output = $this->templateResource;
+               foreach ($this->markers as $marker => $content) {
+                       $output = str_replace('###' . F3_PHP6_Functions::strtoupper($marker) . '###', $content, $output);
+               }
+
+               foreach ($this->parts as $marker => $content) {
+                       $output = preg_replace('/<!--\s*###' . F3_PHP6_Functions::strtoupper(preg_quote($marker, '/')) . '###.*###' . F3_PHP6_Functions::strtoupper(preg_quote($marker, '/')) . '###.*-->/msU', $content, $output);
+               }
+               return $output;
+       }
+
+       /**
+        * Substitutes a subpart in $content with the content of $subpartContent.
+        *
+        * @param string Content with subpart wrapped in fx. "###CONTENT_PART###" inside.
+        * @param string Marker string, eg. "###CONTENT_PART###"
+        * @param array
+        * @return string Processed input content
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       protected function substitutePart($subject, $marker, $replacement) {
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_Request.php b/typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_Request.php
new file mode 100755 (executable)
index 0000000..214bf4d
--- /dev/null
@@ -0,0 +1,171 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * Represents a web request.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ *
+ * @scope prototype
+ */
+class Request extends TX_EXTMVC_Request {
+
+       /**
+        * @var string The requested representation format
+        */
+       protected $format = 'html';
+
+       /**
+        * @var string Contains the request method
+        */
+       protected $method = F3_FLOW3_Utility_Environment::REQUEST_METHOD_GET;
+
+       /**
+        * @var F3_FLOW3_Utility_Environment
+        */
+       protected $environment;
+
+       /**
+        * @var F3_FLOW3_Property_DataType_URI The request URI
+        */
+       protected $requestURI;
+
+       /**
+        * @var F3_FLOW3_Property_DataType_URI The base URI for this request - ie. the host and path leading to the index.php
+        */
+       protected $baseURI;
+
+       /**
+        * Injects the environment
+        *
+        * @param F3_FLOW3_Utility_Environment $environment
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function injectEnvironment(F3_FLOW3_Utility_Environment $environment) {
+               $this->environment = $environment;
+       }
+
+       /**
+        * Sets the request method
+        *
+        * @param string $method Name of the request method - one of the F3_FLOW3_Utility_Environment::REQUEST_METHOD_* constants
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        * @throws TX_EXTMVC_Exception_InvalidRequestMethod if the request method is not supported
+        */
+       public function setMethod($method) {
+               if (array_search($method, array(
+                               F3_FLOW3_Utility_Environment::REQUEST_METHOD_GET,
+                               F3_FLOW3_Utility_Environment::REQUEST_METHOD_POST,
+                               F3_FLOW3_Utility_Environment::REQUEST_METHOD_DELETE,
+                               F3_FLOW3_Utility_Environment::REQUEST_METHOD_PUT,
+                               F3_FLOW3_Utility_Environment::REQUEST_METHOD_HEAD,
+                               F3_FLOW3_Utility_Environment::REQUEST_METHOD_OPTIONS,
+                               F3_FLOW3_Utility_Environment::REQUEST_METHOD_UNKNOWN
+                       )) === FALSE) throw new TX_EXTMVC_Exception_InvalidRequestMethod('The request method "' . $method . '" is not supported.', 1217778382);
+               $this->method = $method;
+       }
+
+       /**
+        * Returns the name of the request method
+        *
+        * @return string Name of the request method - one of the F3_FLOW3_Utility_Environment::REQUEST_METHOD_* constants
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getMethod() {
+               return $this->method;
+       }
+
+       /**
+        * Sets the request URI
+        *
+        * @param F3_FLOW3_Property_DataType_URI $requestURI URI of this web request
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setRequestURI(F3_FLOW3_Property_DataType_URI $requestURI) {
+               $this->requestURI = clone $requestURI;
+               $this->baseURI = $this->detectBaseURI($requestURI);
+       }
+
+       /**
+        * Returns the request URI
+        *
+        * @return F3_FLOW3_Property_DataType_URI URI of this web request
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getRequestURI() {
+               return $this->requestURI;
+       }
+
+       /**
+        * Sets the base URI for this request.
+        *
+        * @param F3_FLOW3_Property_DataType_URI $baseURI New base URI
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setBaseURI(F3_FLOW3_Property_DataType_URI $baseURI) {
+               $this->baseURI = clone $baseURI;
+       }
+
+       /**
+        * Returns the base URI
+        *
+        * @return F3_FLOW3_Property_DataType_URI Base URI of this web request
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getBaseURI() {
+               return $this->baseURI;
+       }
+
+       /**
+        * Tries to detect the base URI of this request and returns it.
+        *
+        * @param F3_FLOW3_Property_DataType_URI $requestURI URI of this web request
+        * @return F3_FLOW3_Property_DataType_URI The detected base URI
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       protected function detectBaseURI(F3_FLOW3_Property_DataType_URI $requestURI) {
+               $baseURI = clone $requestURI;
+               $baseURI->setQuery(NULL);
+               $baseURI->setFragment(NULL);
+
+               $requestPathSegments = explode('/', $this->environment->getScriptRequestPathAndName());
+               array_pop($requestPathSegments);
+               $baseURI->setPath(implode('/', $requestPathSegments) . '/');
+               return $baseURI;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_RequestBuilder.php b/typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_RequestBuilder.php
new file mode 100644 (file)
index 0000000..5e661a3
--- /dev/null
@@ -0,0 +1,123 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * Builds a web request object from the raw HTTP information
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class RequestBuilder {
+
+       /**
+        * @var F3_FLOW3_Object_FactoryInterface $objectFactory: A reference to the Object Factory
+        */
+       protected $objectFactory;
+
+       /**
+        * @var F3_FLOW3_Utility_Environment
+        */
+       protected $environment;
+
+       /**
+        * @var F3_FLOW3_Configuration_Manager
+        */
+       protected $configurationManager;
+
+       /**
+        * @var TX_EXTMVC_Web_RouterInterface
+        */
+       protected $router;
+
+       /**
+        * Constructs this Web Request Builder
+        *
+        * @param F3_FLOW3_Object_FactoryInterface $objectFactory A reference to the object factory
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function __construct(F3_FLOW3_Object_FactoryInterface $objectFactory) {
+               $this->objectFactory = $objectFactory;
+       }
+
+       /**
+        * Injects the server environment
+        *
+        * @param F3_FLOW3_Utility_Environment $environment The environment
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function injectEnvironment(F3_FLOW3_Utility_Environment $environment) {
+               $this->environment = $environment;
+       }
+
+       /**
+        * Injects the configuration manager
+        *
+        * @param F3_FLOW3_Configuration_Manager $configurationManager A reference to the configuration manager
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function injectConfigurationManager(F3_FLOW3_Configuration_Manager $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
+        * Injects a router for routing the web request
+        *
+        * @param TX_EXTMVC_Web_Routing_RouterInterface $router A router which routes the web request to a controller and action
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function injectRouter(TX_EXTMVC_Web_Routing_RouterInterface $router) {
+               $this->router = $router;
+       }
+
+       /**
+        * Builds a web request object from the raw HTTP information
+        *
+        * @return TX_EXTMVC_Web_Request The web request as an object
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function build() {
+               $request = $this->objectFactory->create('F3_FLOW3_MVC_Web_Request');
+               $request->injectEnvironment($this->environment);
+               $request->setRequestURI($this->environment->getRequestURI());
+               $request->setMethod($this->environment->getRequestMethod());
+
+               $routesConfiguration = $this->configurationManager->getSpecialConfiguration(F3_FLOW3_Configuration_Manager::CONFIGURATION_TYPE_ROUTES);
+               $this->router->setRoutesConfiguration($routesConfiguration);
+               $this->router->route($request);
+
+               return $request;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_RequestHandler.php b/typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_RequestHandler.php
new file mode 100755 (executable)
index 0000000..a4e2e1b
--- /dev/null
@@ -0,0 +1,134 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A request handler which can handle web requests.
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class RequestHandler implements TX_EXTMVC_RequestHandlerInterface {
+
+       /**
+        * @var F3_FLOW3_Object_FactoryInterface Reference to the object factory
+        */
+       protected $objectFactory;
+
+       /**
+        * @var F3_FLOW3_Utility_Environment Reference to the environment utility object
+        */
+       protected $utilityEnvironment;
+
+       /**
+        * @var TX_EXTMVC_Dispatcher
+        */
+       protected $dispatcher;
+
+       /**
+        * @var TX_EXTMVC_Web_RequestBuilder
+        */
+       protected $requestBuilder;
+
+       /**
+        * @var TX_EXTMVC_RequestProcessorChainManager
+        */
+       protected $requestProcessorChainManager;
+
+       /**
+        * Constructs the Web Request Handler
+        *
+        * @param F3_FLOW3_Object_FactoryInterface $objectFactory A reference to the object factory
+        * @param F3_FLOW3_Utility_Environment $utilityEnvironment A reference to the environment
+        * @param TX_EXTMVC_Dispatcher $dispatcher The request dispatcher
+        * @param TX_EXTMVC_Web_RequestBuilder $requestBuilder The request builder
+        * @param TX_EXTMVC_RequestProcessorChainManager A reference to the request processor chain manager
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function __construct(
+                       F3_FLOW3_Object_FactoryInterface $objectFactory,
+                       F3_FLOW3_Utility_Environment $utilityEnvironment,
+                       TX_EXTMVC_Dispatcher $dispatcher,
+                       TX_EXTMVC_Web_RequestBuilder $requestBuilder,
+                       TX_EXTMVC_RequestProcessorChainManager $requestProcessorChainManager) {
+               $this->objectFactory = $objectFactory;
+               $this->utilityEnvironment = $utilityEnvironment;
+               $this->dispatcher = $dispatcher;
+               $this->requestBuilder = $requestBuilder;
+               $this->requestProcessorChainManager = $requestProcessorChainManager;
+       }
+
+       /**
+        * Handles the web request. The response will automatically be sent to the client.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function handleRequest() {
+               $request = $this->requestBuilder->build();
+               $this->requestProcessorChainManager->processRequest($request);
+               $response = $this->objectFactory->create('F3_FLOW3_MVC_Web_Response');
+               $this->dispatcher->dispatch($request, $response);
+               $response->send();
+       }
+
+       /**
+        * This request handler can handle any web request.
+        *
+        * @return boolean If the request is a web request, TRUE otherwise FALSE
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function canHandleRequest() {
+               switch ($this->utilityEnvironment->getRequestMethod()) {
+                       case F3_FLOW3_Utility_Environment::REQUEST_METHOD_GET :
+                       case F3_FLOW3_Utility_Environment::REQUEST_METHOD_POST :
+                       case F3_FLOW3_Utility_Environment::REQUEST_METHOD_PUT :
+                       case F3_FLOW3_Utility_Environment::REQUEST_METHOD_DELETE :
+                       case F3_FLOW3_Utility_Environment::REQUEST_METHOD_OPTIONS :
+                       case F3_FLOW3_Utility_Environment::REQUEST_METHOD_HEAD :
+                               return TRUE;
+               }
+               return FALSE;
+       }
+
+       /**
+        * Returns the priority - how eager the handler is to actually handle the
+        * request.
+        *
+        * @return integer The priority of the request handler.
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getPriority() {
+               return 100;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_Response.php b/typo3/sysext/extbase/Classes/Web/TX_EXTMVC_Web_Response.php
new file mode 100755 (executable)
index 0000000..4463e19
--- /dev/null
@@ -0,0 +1,207 @@
+<?php
+declare(ENCODING = 'utf-8');
+
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ */
+
+/**
+ * A web specific response implementation
+ *
+ * @package FLOW3
+ * @subpackage MVC
+ * @version $Id:$
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope prototype
+ */
+class Response extends TX_EXTMVC_Response {
+
+       /**
+        * The HTTP headers which will be sent in the response
+        *
+        * @var array
+        */
+       protected $headers = array();
+
+       /**
+        * The HTTP status code
+        *
+        * @var integer
+        */
+       protected $statusCode = 200;
+
+       /**
+        * The HTTP status message
+        *
+        * @var string
+        */
+       protected $statusMessage = 'OK';
+
+       /**
+        * The standardized and other important HTTP Status messages
+        *
+        * @var array
+        */
+       protected $statusMessages = array(
+               100 => 'Continue',
+               101 => 'Switching Protocols',
+               102 => 'Processing', # RFC 2518
+               200 => 'OK',
+               201 => 'Created',
+               202 => 'Accepted',
+               203 => 'Non-Authoritative Information',
+               204 => 'No Content',
+               205 => 'Reset Content',
+               206 => 'Partial Content',
+               207 => 'Multi-Status',
+               300 => 'Multiple Choices',
+               301 => 'Moved Permanently',
+               302 => 'Found',
+               303 => 'See Other',
+               304 => 'Not Modified',
+               305 => 'Use Proxy',
+               307 => 'Temporary Redirect',
+               400 => 'Bad Request',
+               401 => 'Unauthorized',
+               402 => 'Payment Required',
+               403 => 'Forbidden',
+               404 => 'Not Found',
+               405 => 'Method Not Allowed',
+               406 => 'Not Acceptable',
+               407 => 'Proxy Authentication Required',
+               408 => 'Request Timeout',
+               409 => 'Conflict',
+               410 => 'Gone',
+               411 => 'Length Required',
+               412 => 'Precondition Failed',
+               413 => 'Request Entity Too Large',
+               414 => 'Request-URI Too Long',
+               415 => 'Unsupported Media Type',
+               416 => 'Requested Range Not Satisfiable',
+               417 => 'Expectation Failed',
+               500 => 'Internal Server Error',
+               501 => 'Not Implemented',
+               502 => 'Bad Gateway',
+               503 => 'Service Unavailable',
+               504 => 'Gateway Timeout',
+               505 => 'HTTP Version Not Supported',
+               507 => 'Insufficient Storage',
+               509 => 'Bandwidth Limit Exceeded',
+       );
+
+       /**
+        * Sets the HTTP status code and (optionally) a customized message.
+        *
+        * @param integer $code The status code
+        * @param string $message If specified, this message is sent instead of the standard message
+        * @return void
+        * @throws InvalidArgumentException if the specified status code is not valid
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setStatus($code, $message = NULL) {
+               if (!is_int($code)) throw new InvalidArgumentException('The HTTP status code must be of type integer, ' . gettype($code) . ' given.', 1220526013);
+               if ($message === NULL && !isset($this->statusMessages[$code])) throw new InvalidArgumentException('No message found for HTTP status code "' . $code . '".', 1220526014);
+
+               $this->statusCode = $code;
+               $this->statusMessage = ($message === NULL) ? $this->statusMessages[$code] : $message;
+       }
+
+       /**
+        * Returns status code and status message.
+        *
+        * @return string The status code and status message, eg. "404 Not Found"
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getStatus() {
+               return $this->statusCode . ' ' . $this->statusMessage;
+       }
+
+       /**
+        * Sets the specified HTTP header
+        *
+        * @param string $name Name of the header, for example "Location", "Content-Description" etc.
+        * @param mixed $value The value of the given header
+        * @param boolean $replaceExistingHeader If a header with the same name should be replaced. Default is TRUE.
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setHeader($name, $value, $replaceExistingHeader = TRUE) {
+               if (strtoupper(substr($name, 0, 4)) == 'HTTP') throw new InvalidArgumentException('The HTTP status header must be set via setStatus().', 1220541963);
+               if ($replaceExistingHeader === TRUE || !isset($this->headers[$name])) {
+                       $this->headers[$name] = array($value);
+               } else {
+                       $this->headers[$name][] = $value;
+               }
+       }
+
+       /**
+        * Returns the HTTP headers - including the status header - of this web response
+        *
+        * @return string The HTTP headers
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function getHeaders() {
+               $preparedHeaders = array();
+               $statusHeader = 'HTTP/1.1 ' . $this->statusCode . ' ' . $this->statusMessage;
+
+               $preparedHeaders[] = $statusHeader;
+               foreach ($this->headers as $name => $values) {
+                       foreach ($values as $value) {
+                               $preparedHeaders[] = $name . ': ' . $value;
+                       }
+               }
+               return $preparedHeaders;
+       }
+
+       /**
+        * Sends the HTTP headers.
+        *
+        * If headers have already been sent, this method fails silently.
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function sendHeaders() {
+               if (headers_sent() === TRUE) return;
+               foreach ($this->getHeaders() as $header) {
+                       header($header);
+               }
+       }
+
+       /**
+        * Renders and sends the whole web response
+        *
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function send() {
+               $this->sendHeaders();
+               if ($this->content !== NULL) {
+                       echo $this->getContent();
+               }
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_AbstractController.php b/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_AbstractController.php
deleted file mode 100755 (executable)
index 0f7d228..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-declare(ENCODING = 'utf-8');
-
-
-/*                                                                        *
- * This script belongs to the FLOW3 framework.                            *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- */
-
-/**
- * An abstract base class for Controllers
- *
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
- */
-abstract class AbstractController {
-
-       /**
-        * @var F3_FLOW3_Object_FactoryInterface A reference to the Object Factory
-        */
-       protected $objectFactory;
-
-       /**
-        * @var string Key of the package this controller belongs to
-        */
-       protected $packageKey;
-
-       /**
-        * @var F3_FLOW3_Package_Package The package this controller belongs to
-        */
-       protected $package;
-
-       /**
-        * Contains the settings of the current package
-        *
-        * @var array
-        */
-       protected $settings;
-
-       /**
-        * Constructs the controller.
-        *
-        * @param F3_FLOW3_Object_FactoryInterface $objectFactory A reference to the Object Factory
-        * @param F3_FLOW3_Package_ManagerInterface $packageManager A reference to the Package Manager
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function __construct(F3_FLOW3_Object_FactoryInterface $objectFactory, F3_FLOW3_Package_ManagerInterface $packageManager) {
-               $this->objectFactory = $objectFactory;
-               list(, $this->packageKey) = explode('\\', get_class($this));
-               $this->package = $packageManager->getPackage($this->packageKey);
-       }
-
-       /**
-        * Sets / injects the settings of the package this controller belongs to.
-        *
-        * @param array $settings Settings container of the current package
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function setSettings(array $settings) {
-               $this->settings = $settings;
-       }
-
-       /**
-        * Initializes this object after all dependencies have been resolved.
-        *
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function initializeObject() {
-               $this->initializeController();
-       }
-
-       /**
-        * Initializes this controller.
-        *
-        * Override this method for initializing your concrete controller implementation.
-        * Recommended actions for your controller initialization method are setting up the expected
-        * arguments and narrowing down the supported request types if neccessary.
-        *
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       protected function initializeController() {
-       }
-}
-
-?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_ActionController.php b/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_ActionController.php
deleted file mode 100644 (file)
index 1d9a5b5..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-<?php
-declare(ENCODING = 'utf-8');
-
-
-/*                                                                        *
- * This script belongs to the FLOW3 framework.                            *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- */
-
-/**
- * A multi action controller
- *
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
- */
-class ActionController extends TX_EXTMVC_Controller_RequestHandlingController {
-
-       /**
-        * @var F3_FLOW3_Object_ManagerInterface
-        */
-       protected $objectManager;
-
-       /**
-        * @var boolean If initializeView() should be called on an action invocation.
-        */
-       protected $initializeView = TRUE;
-
-       /**
-        * @var TX_EXTMVC_View_AbstractView By default a view with the same name as the current action is provided. Contains NULL if none was found.
-        */
-       protected $view = NULL;
-
-       /**
-        * Injects the object manager
-        *
-        * @param F3_FLOW3_Object_ManagerInterface $objectManager
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function injectObjectManager(F3_FLOW3_Object_ManagerInterface $objectManager) {
-               $this->objectManager = $objectManager;
-       }
-
-       /**
-        * Handles a request. The result output is returned by altering the given response.
-        *
-        * @param TX_EXTMVC_Request $request The request object
-        * @param TX_EXTMVC_Response $response The response, modified by this handler
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function processRequest(TX_EXTMVC_Request $request, TX_EXTMVC_Response $response) {
-               parent::processRequest($request, $response);
-               $this->callActionMethod();
-       }
-
-       /**
-        * Determines the name of the requested action and calls the action method accordingly.
-        * If no action was specified, the "default" action is assumed.
-        *
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        * @throws TX_EXTMVC_Exception_NoSuchAction if the action specified in the request object does not exist (and if there's no default action either).
-        */
-       protected function callActionMethod() {
-               $actionMethodName = $this->request->getControllerActionName() . 'Action';
-
-               if (!method_exists($this, $actionMethodName)) throw new TX_EXTMVC_Exception_NoSuchAction('An action "' . $this->request->getControllerActionName() . '" does not exist in controller "' . get_class($this) . '".', 1186669086);
-               $this->initializeAction();
-               if ($this->initializeView) $this->initializeView();
-               $actionResult = call_user_func_array(array($this, $actionMethodName), array());
-               if (is_string($actionResult) && F3_PHP6_Functions::strlen($actionResult) > 0) {
-                       $this->response->appendContent($actionResult);
-               }
-       }
-
-       /**
-        * Prepares a view for the current action and stores it in $this->view.
-        * By default, this method tries to locate a view with a name matching
-        * the current action.
-        *
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       protected function initializeView() {
-               $viewObjectName = $this->request->getViewObjectName();
-               if ($viewObjectName === FALSE) {
-                       $viewObjectName = 'F3_FLOW3_MVC_View_EmptyView';
-               }
-               $this->view = $this->objectManager->getObject($viewObjectName);
-               $this->view->setRequest($this->request);
-       }
-
-       /**
-        * Initializes the controller before invoking an action method.
-        *
-        * Override this method to solve tasks which all actions have in
-        * common.
-        *
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       protected function initializeAction() {
-       }
-
-       /**
-        * The default action of this controller.
-        *
-        * This method should always be overridden by the concrete action
-        * controller implementation.
-        *
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       protected function indexAction() {
-               return 'No index action has been implemented yet for this controller.';
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_Argument.php b/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_Argument.php
deleted file mode 100644 (file)
index ac2c5c3..0000000
+++ /dev/null
@@ -1,554 +0,0 @@
-<?php
-declare(ENCODING = 'utf-8');
-
-
-/*                                                                        *
- * This script belongs to the FLOW3 framework.                            *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- */
-
-/**
- * A controller argument
- *
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
- * @scope prototype
- */
-class Argument {
-
-       /**
-        * @var F3_FLOW3_Object_ManagerInterface
-        */
-       protected $objectManager;
-
-       /**
-        * @var F3_FLOW3_Object_FactoryInterface
-        */
-       protected $objectFactory;
-
-       /**
-        * Name of this argument
-        * @var string
-        */
-       protected $name = '';
-
-       /**
-        * Short name of this argument
-        * @var string
-        */
-       protected $shortName = NULL;
-
-       /**
-        * Data type of this argument's value
-        * @var string
-        */
-       protected $dataType = 'Text';
-
-       /**
-        * TRUE if this argument is required
-        * @var boolean
-        */
-       protected $isRequired = FALSE;
-
-       /**
-        * Actual value of this argument
-        * @var object
-        */
-       protected $value = NULL;
-
-       /**
-        * Short help message for this argument
-        * @var string Short help message for this argument
-        */
-       protected $shortHelpMessage = NULL;
-
-       /**
-        * The argument is valid
-        * @var boolean
-        */
-       protected $isValid = TRUE;
-
-       /**
-        * Any error (F3_FLOW3_Error_Error) that occured while initializing this argument (e.g. a mapping error)
-        * @var array
-        */
-       protected $errors = array();
-
-       /**
-        * Any warning (F3_FLOW3_Error_Warning) that occured while initializing this argument (e.g. a mapping warning)
-        * @var array
-        */
-       protected $warnings = array();
-
-       /**
-        * The property validator for this argument
-        * @var F3_FLOW3_Validation_ValidatorInterface
-        */
-       protected $validator = NULL;
-
-       /**
-        * The property validator for this arguments datatype
-        * @var F3_FLOW3_Validation_ValidatorInterface
-        */
-       protected $datatypeValidator = NULL;
-
-       /**
-        * The filter for this argument
-        * @var F3_FLOW3_Validation_FilterInterface
-        */
-       protected $filter = NULL;
-
-       /**
-        * The property converter for this argument
-        * @var F3_FLOW3_Property_ConverterInterface
-        */
-       protected $propertyConverter = NULL;
-
-       /**
-        * The property converter's input format for this argument
-        * @var string
-        */
-       protected $propertyConverterInputFormat = 'string';
-
-       /**
-        * Identifier for the argument, if it has one
-        * @var string
-        */
-       protected $identifier = NULL;
-
-       /**
-        * Constructs this controller argument
-        *
-        * @param string $name Name of this argument
-        * @param string $dataType The data type of this argument
-        * @param F3_FLOW3_Object_ManagerInterface The object manager
-        * @throws InvalidArgumentException if $name is not a string or empty
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function __construct($name, $dataType = 'Text', F3_FLOW3_Object_ManagerInterface $objectManager) {
-               if (!is_string($name) || F3_PHP6_Functions::strlen($name) < 1) throw new InvalidArgumentException('$name must be of type string, ' . gettype($name) . ' given.', 1187951688);
-               $this->objectManager = $objectManager;
-               $this->objectFactory = $this->objectManager->getObjectFactory();
-               $this->name = $name;
-
-               $this->setDataType($dataType);
-       }
-
-       /**
-        * Returns the name of this argument
-        *
-        * @return string This argument's name
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function getName() {
-               return $this->name;
-       }
-
-       /**
-        * Sets the short name of this argument.
-        *
-        * @param string $shortName A "short name" - a single character
-        * @return TX_EXTMVC_Controller_Argument $this
-        * @throws InvalidArgumentException if $shortName is not a character
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function setShortName($shortName) {
-               if ($shortName !== NULL && (!is_string($shortName) || F3_PHP6_Functions::strlen($shortName) != 1)) throw new InvalidArgumentException('$shortName must be a single character or NULL', 1195824959);
-               $this->shortName = $shortName;
-               return $this;
-       }
-
-       /**
-        * Returns the short name of this argument
-        *
-        * @return string This argument's short name
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function getShortName() {
-               return $this->shortName;
-       }
-
-       /**
-        * Sets the data type of this argument's value
-        *
-        * @param string $dataType: Name of the data type
-        * @return TX_EXTMVC_Controller_Argument $this
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function setDataType($dataType) {
-               $this->dataType = ($dataType != '' ? $dataType : 'Text');
-
-               $dataTypeValidatorClassname = $this->dataType;
-               if (!$this->objectManager->isObjectRegistered($dataTypeValidatorClassname)) $dataTypeValidatorClassname = 'F3_FLOW3_Validation_Validator\\' . $this->dataType;
-               $this->datatypeValidator = $this->objectManager->getObject($dataTypeValidatorClassname);
-
-               return $this;
-       }
-
-       /**
-        * Returns the data type of this argument's value
-        *
-        * @return string The data type
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function getDataType() {
-               return $this->dataType;
-       }
-
-       /**
-        * Marks this argument to be required
-        *
-        * @param boolean $required TRUE if this argument should be required
-        * @return TX_EXTMVC_Controller_Argument $this
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function setRequired($required) {
-               $this->isRequired = $required;
-               return $this;
-       }
-
-       /**
-        * Returns TRUE if this argument is required
-        *
-        * @return boolean TRUE if this argument is required
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function isRequired() {
-               return $this->isRequired;
-       }
-
-       /**
-        * Sets the value of this argument.
-        *
-        * @param mixed $value: The value of this argument
-        * @return TX_EXTMVC_Controller_Argument $this
-        * @throws TX_EXTMVC_Exception_InvalidArgumentValue if the argument is not a valid object of type $dataType
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function setValue($value) {
-               $this->value = $value;
-               return $this;
-       }
-
-       /**
-        * Returns the value of this argument
-        *
-        * @return object The value of this argument - if none was set, NULL is returned
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function getValue() {
-               return $this->value;
-       }
-
-       /**
-        * Checks if this argument has a value set.
-        *
-        * @return boolean TRUE if a value was set, otherwise FALSE
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function isValue() {
-               return $this->value !== NULL;
-       }
-
-       /**
-        * Sets a short help message for this argument. Mainly used at the command line, but maybe
-        * used elsewhere, too.
-        *
-        * @param string $message: A short help message
-        * @return TX_EXTMVC_Controller_Argument                $this
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function setShortHelpMessage($message) {
-               if (!is_string($message)) throw new InvalidArgumentException('The help message must be of type string, ' . gettype($message) . 'given.', 1187958170);
-               $this->shortHelpMessage = $message;
-               return $this;
-       }
-
-       /**
-        * Returns the short help message
-        *
-        * @return string The short help message
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function getShortHelpMessage() {
-               return $this->shortHelpMessage;
-       }
-
-       /**
-        * Set the validity status of the argument
-        *
-        * @param boolean TRUE if the argument is valid, FALSE otherwise
-        * @return void
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function setValidity($isValid) {
-               $this->isValid = $isValid;
-       }
-
-       /**
-        * Returns TRUE when the argument is valid
-        *
-        * @return boolean TRUE if the argument is valid
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function isValid() {
-               return $this->isValid;
-       }
-
-       /**
-        * Add an initialization error (e.g. a mapping error)
-        *
-        * @param F3_FLOW3_Error_Error An error object
-        * @return void
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function addError(F3_FLOW3_Error_Error $error) {
-               $this->errors[] = $error;
-       }
-
-       /**
-        * Get all initialization errors
-        *
-        * @return array An array containing F3_FLOW3_Error_Error objects
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        * @see addError(F3_FLOW3_Error_Error $error)
-        */
-       public function getErrors() {
-               return $this->errors;
-       }
-
-       /**
-        * Add an initialization warning (e.g. a mapping warning)
-        *
-        * @param F3_FLOW3_Error_Warning A warning object
-        * @return void
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function addWarning(F3_FLOW3_Error_Warning $warning) {
-               $this->warnings[] = $warning;
-       }
-
-       /**
-        * Get all initialization warnings
-        *
-        * @return array An array containing F3_FLOW3_Error_Warning objects
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        * @see addWarning(F3_FLOW3_Error_Warning $warning)
-        */
-       public function getWarnings() {
-               return $this->warnings;
-       }
-
-       /**
-        * Set an additional validator
-        *
-        * @param string Class name of a validator
-        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function setValidator($className) {
-               $this->validator = $this->objectManager->getObject($className);
-               return $this;
-       }
-
-       /**
-        * Returns the set validator
-        *
-        * @return F3_FLOW3_Validation_ValidatorInterface The set validator, NULL if none was set
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function getValidator() {
-               return $this->validator;
-       }
-
-       /**
-        * Returns the set datatype validator
-        *
-        * @return F3_FLOW3_Validation_ValidatorInterface The set datatype validator
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function getDatatypeValidator() {
-               return $this->datatypeValidator;
-       }
-
-       /**
-        * Set a filter
-        *
-        * @param string Class name of a filter
-        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function setFilter($className) {
-               $this->filter = $this->objectManager->getObject($className);
-               return $this;
-       }
-
-       /**
-        * Create and set a filter chain
-        *
-        * @param array Class names of the filters
-        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function setNewFilterChain(array $classNames) {
-               $this->filter = $this->createNewFilterChainObject();
-
-               foreach ($classNames as $className) {
-                       if (!$this->objectManager->isObjectRegistered($className)) $className = 'F3_FLOW3_Validation_Filter\\' . $className;
-                       $this->filter->addFilter($this->objectManager->getObject($className));
-               }
-
-               return $this;
-       }
-
-       /**
-        * Create and set a validator chain
-        *
-        * @param array Class names of the validators
-        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function setNewValidatorChain(array $classNames) {
-               $this->validator = $this->createNewValidatorChainObject();
-
-               foreach ($classNames as $className) {
-                       if (!$this->objectManager->isObjectRegistered($className)) $className = 'F3_FLOW3_Validation_Validator\\' . $className;
-                       $this->validator->addValidator($this->objectManager->getObject($className));
-               }
-
-               return $this;
-       }
-
-       /**
-        * Returns the set filter
-        *
-        * @return F3_FLOW3_Validation_FilterInterface The set filter, NULL if none was set
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function getFilter() {
-               return $this->filter;
-       }
-
-       /**
-        * Set a property converter
-        *
-        * @param string Class name of a property converter
-        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function setPropertyConverter($className) {
-               if (is_string($className)) {
-                       $this->propertyConverter = $this->objectFactory->create($className);
-               } else {
-                       $this->propertyConverter = $className;
-               }
-               return $this;
-       }
-
-       /**
-        * Returns the set property converter
-        *
-        * @return F3_FLOW3_Property_ConverterInterface The set property convertr, NULL if none was set
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function getPropertyConverter() {
-               return $this->propertyConverter;
-       }
-
-       /**
-        * Set a property converter input format
-        *
-        * @param string Input format the property converter should use
-        * @return TX_EXTMVC_Controller_Argument Returns $this (used for fluent interface)
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function setPropertyConverterInputFormat($format) {
-               $this->propertyConverterInputFormat = $format;
-               return $this;
-       }
-
-       /**
-        * Returns the set property converter input format
-        *
-        * @return string The set property converter input format
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function getPropertyConverterInputFormat() {
-               return $this->propertyConverterInputFormat;
-       }
-
-       /**
-        * Set the identifier for the argument.
-        *
-        * @param string $identifier The identifier for the argument.
-        * @return void
-        * @author Sebastian Kurfürst <sebastian@typo3.org>
-        */
-       public function setIdentifier($identifier) {
-               $this->identifier = $identifier;
-       }
-
-       /**
-        * Get the identifier of the argument, if it has one.
-        *
-        * @return string Identifier of the argument. If none set, returns NULL.
-        * @author Sebastian Kurfürst <sebastian@typo3.org>
-        */
-       public function getIdentifier() {
-               return $this->identifier;
-       }
-
-       /**
-        * Factory method that creates a new filter chain
-        *
-        * @return F3_FLOW3_Validation_Filter_Chain A new filter chain
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function createNewFilterChainObject() {
-               return $this->objectFactory->create('F3_FLOW3_Validation_Filter_Chain');
-       }
-
-       /**
-        * Factory method that creates a new validator chain
-        *
-        * @return F3_FLOW3_Validation_Validator_Chain A new validator chain
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function createNewValidatorChainObject() {
-               return $this->objectFactory->create('F3_FLOW3_Validation_Validator_Chain');
-       }
-
-       /**
-        * Returns a string representation of this argument's value
-        *
-        * @return string
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function __toString() {
-               return (string)$this->value;
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_Arguments.php b/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_Arguments.php
deleted file mode 100644 (file)
index f3bce3f..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-<?php
-declare(ENCODING = 'utf-8');
-
-
-/*                                                                        *
- * This script belongs to the FLOW3 framework.                            *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- */
-
-/**
- * A composite of controller arguments
- *
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
- * @scope prototype
- */
-class Arguments extends ArrayObject {
-
-       /**
-        * @var F3_FLOW3_Object_FactoryInterface A reference to the object factory
-        */
-       protected $objectFactory;
-
-       /**
-        * @var F3_FLOW3_Object_ManagerInterface A reference to the object manager
-        */
-       protected $objectManager;
-
-       /**
-        * @var array Names of the arguments contained by this object
-        */
-       protected $argumentNames = array();
-
-       /**
-        * Constructs this Arguments object
-        *
-        * @param F3_FLOW3_Object_FactoryInterface $objectFactory
-        * @param F3_FLOW3_Object_ManagerInterface $objectManager
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function __construct(F3_FLOW3_Object_FactoryInterface $objectFactory, F3_FLOW3_Object_ManagerInterface $objectManager) {
-               $this->objectFactory = $objectFactory;
-               $this->objectManager = $objectManager;
-               parent::__construct();
-       }
-
-       /**
-        * Adds or replaces the argument specified by $value. The argument's name is taken from the
-        * argument object itself, therefore the $offset does not have any meaning in this context.
-        *
-        * @param mixed $offset Offset - not used here
-        * @param mixed $value The argument.
-        * @return void
-        * @throws InvalidArgumentException if the argument is not a valid Controller Argument object
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function offsetSet($offset, $value) {
-               if (!$value instanceof TX_EXTMVC_Controller_Argument) throw new InvalidArgumentException('Controller arguments must be valid TX_EXTMVC_Controller_Argument objects.', 1187953786);
-
-               $argumentName = $value->getName();
-               parent::offsetSet($argumentName, $value);
-               $this->argumentNames[$argumentName] = TRUE;
-       }
-
-       /**
-        * Sets an argument, aliased to offsetSet()
-        *
-        * @param mixed $value The value
-        * @return void
-        * @throws InvalidArgumentException if the argument is not a valid Controller Argument object
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function append($value) {
-               if (!$value instanceof TX_EXTMVC_Controller_Argument) throw new InvalidArgumentException('Controller arguments must be valid TX_EXTMVC_Controller_Argument objects.', 1187953786);
-               $this->offsetSet(NULL, $value);
-       }
-
-       /**
-        * Unsets an argument
-        *
-        * @param mixed $offset Offset
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function offsetUnset($offset) {
-               $translatedOffset = $this->translateToLongArgumentName($offset);
-               parent::offsetUnset($translatedOffset);
-
-               unset($this->argumentNames[$translatedOffset]);
-               if ($offset != $translatedOffset) {
-                       unset($this->argumentShortNames[$offset]);
-               }
-       }
-
-       /**
-        * Returns whether the requested index exists
-        *
-        * @param mixed $offset Offset
-        * @return boolean
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function offsetExists($offset) {
-               $translatedOffset = $this->translateToLongArgumentName($offset);
-               return parent::offsetExists($translatedOffset);
-       }
-
-       /**
-        * Returns the value at the specified index
-        *
-        * @param mixed $offset Offset
-        * @return TX_EXTMVC_Controller_Argument The requested argument object
-        * @throws TX_EXTMVC_Exception_NoSuchArgument if the argument does not exist
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function offsetGet($offset) {
-               $translatedOffset = $this->translateToLongArgumentName($offset);
-               if ($translatedOffset === '') throw new TX_EXTMVC_Exception_NoSuchArgument('The argument "' . $offset . '" does not exist.', 1216909923);
-               return parent::offsetGet($translatedOffset);
-       }
-
-       /**
-        * Creates, adds and returns a new controller argument to this composite object.
-        * If an argument with the same name exists already, it will be replaced by the
-        * new argument object.
-        *
-        * If $dataType is an object registered at the Object Manager, it sets the default property converter to map this property.
-        *
-        * @param string $name Name of the argument
-        * @param string $dataType Name of one of the built-in data types
-        * @param boolean $isRequired TRUE if this argument should be marked as required
-        * @return TX_EXTMVC_Controller_Argument The new argument
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function addNewArgument($name, $dataType = 'Text', $isRequired = FALSE) {
-               $argument = $this->objectFactory->create('F3_FLOW3_MVC_Controller_Argument', $name, $dataType);
-               $argument->setRequired($isRequired);
-
-               if ($this->objectManager->isObjectRegistered($dataType)) {
-                       $propertyConverter = $this->objectFactory->create('F3_FLOW3_Property_Converter_DomainObjectConverter', $dataType);
-                       $argument->setPropertyConverter($propertyConverter)->setPropertyConverterInputFormat('array');
-               }
-               $this->addArgument($argument);
-               return $argument;
-       }
-
-       /**
-        * Adds the specified controller argument to this composite object.
-        * If an argument with the same name exists already, it will be replaced by the
-        * new argument object.
-        *
-        * Note that the argument will be cloned, not referenced.
-        *
-        * @param TX_EXTMVC_Controller_Argument $argument The argument to add
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function addArgument(TX_EXTMVC_Controller_Argument $argument) {
-               $this->offsetSet(NULL, $argument);
-       }
-
-       /**
-        * Returns an argument specified by name
-        *
-        * @param string $argumentName Name of the argument to retrieve
-        * @return TX_EXTMVC_Controller_Argument
-        * @throws TX_EXTMVC_Exception_NoSuchArgument
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function getArgument($argumentName) {
-               if (!$this->offsetExists($argumentName)) throw new TX_EXTMVC_Exception_NoSuchArgument('An argument "' . $argumentName . '" does not exist.', 1195815178);
-               return $this->offsetGet($argumentName);
-       }
-
-       /**
-        * Checks if an argument with the specified name exists
-        *
-        * @param string $argumentName Name of the argument to check for
-        * @return boolean TRUE if such an argument exists, otherwise FALSE
-        * @see offsetExists()
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function hasArgument($argumentName) {
-               return $this->offsetExists($argumentName);
-       }
-
-       /**
-        * Returns the names of all arguments contained in this object
-        *
-        * @return array Argument names
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function getArgumentNames() {
-               return array_keys($this->argumentNames);
-       }
-
-       /**
-        * Returns the short names of all arguments contained in this object that have one.
-        *
-        * @return array Argument short names
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function getArgumentShortNames() {
-               $argumentShortNames = array();
-               foreach ($this as $argument) {
-                       $argumentShortNames[$argument->getShortName()] = TRUE;
-               }
-               return array_keys($argumentShortNames);
-       }
-
-       /**
-        * Magic setter method for the argument values. Each argument
-        * value can be set by just calling the setArgumentName() method.
-        *
-        * @param string $methodName Name of the method
-        * @param array $arguments Method arguments
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function __call($methodName, array $arguments) {
-               if (F3_PHP6_Functions::substr($methodName, 0, 3) !== 'set') throw new LogicException('Unknown method "' . $methodName . '".', 1210858451);
-
-               $firstLowerCaseArgumentName = $this->translateToLongArgumentName(F3_PHP6_Functions::strtolower($methodName{3}) . F3_PHP6_Functions::substr($methodName, 4));
-               $firstUpperCaseArgumentName = $this->translateToLongArgumentName(F3_PHP6_Functions::ucfirst(F3_PHP6_Functions::substr($methodName, 3)));
-
-               if (in_array($firstLowerCaseArgumentName, $this->getArgumentNames())) {
-                       $argument = parent::offsetGet($firstLowerCaseArgumentName);
-                       $argument->setValue($arguments[0]);
-               } elseif (in_array($firstUpperCaseArgumentName, $this->getArgumentNames())) {
-                       $argument = parent::offsetGet($firstUpperCaseArgumentName);
-                       $argument->setValue($arguments[0]);
-               }
-       }
-
-       /**
-        * Translates a short argument name to its corresponding long name. If the
-        * specified argument name is a real argument name already, it will be returned again.
-        *
-        * If an argument with the specified name or short name does not exist, an empty
-        * string is returned.
-        *
-        * @param string argument name
-        * @return string long argument name or empty string
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       protected function translateToLongArgumentName($argumentName) {
-
-               if (in_array($argumentName, $this->getArgumentNames())) return $argumentName;
-
-               foreach ($this as $argument) {
-                       if ($argumentName === $argument->getShortName()) return $argument->getName();
-               }
-               return '';
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_ArgumentsValidator.php b/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_ArgumentsValidator.php
deleted file mode 100644 (file)
index ff215a9..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-<?php
-declare(ENCODING = 'utf-8');
-
-
-/*                                                                        *
- * This script belongs to the FLOW3 framework.                            *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- */
-
-/**
- * Validator for the controller arguments object
- *
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
- * @scope prototype
- */
-class ArgumentsValidator implements F3_FLOW3_Validation_ObjectValidatorInterface {
-
-       /**
-        * @var F3_FLOW3_Object_FactoryInterface The object factory
-        */
-       protected $objectFactory;
-
-       /**
-        * @var TX_EXTMVC_Controller_Arguments The registered arguments with the specified property validators
-        */
-       protected $registeredArguments;
-
-       /**
-        * Constructor
-        *
-        * @param TX_EXTMVC_Controller_Arguments The registered arguments with the specified property editors
-        * @param F3_FLOW3_Object_FactoryInterface The object factory
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       public function __construct(TX_EXTMVC_Controller_Arguments $registeredArguments, F3_FLOW3_Object_FactoryInterface $objectFactory) {
-               $this->objectFactory = $objectFactory;
-               $this->registeredArguments = $registeredArguments;
-       }
-
-       /**
-        * Checks if classes of the given type can be validated with this
-        * validator.
-        *
-        * @param  string $className: Specifies the class type which is supposed to be validated. The check succeeds if this validator can handle the specified class or any subclass of it.
-        * @return boolean TRUE if this validator can validate the class type or FALSE if it can't
-        */
-       public function canValidate($className) {
-               return ($className === 'F3_FLOW3_MVC_Controller_Arguments');
-       }
-
-       /**
-        * Validates the given object. Any errors will be stored in the passed errors
-        * object. If validation succeeds completely, this method returns TRUE. If at
-        * least one error occurred, the result is FALSE.
-        *
-        * @param object $object: The object which is supposed to be validated.
-        * @param F3_FLOW3_Validation_Errors $errors: Here any occured validation error is stored
-        * @return boolean TRUE if validation succeeded completely, FALSE if at least one error occurred.
-        * @throws F3_FLOW3_Validation_Exception_InvalidSubject if this validator cannot validate the given subject or the subject is not an object.
-        */
-       public function validate($object, F3_FLOW3_Validation_Errors &$errors) {
-               if (!$object instanceof TX_EXTMVC_Controller_Arguments) throw new F3_FLOW3_Validation_Exception_InvalidSubject('The specified object cannot be validated by this validator.', 1216720829);
-
-               $isValid = TRUE;
-               foreach ($object as $argument) {
-                       if ($argument->isRequired()) $isValid &= $this->validateProperty($object, $argument->getName(), $errors);
-               }
-
-               return (boolean)$isValid;
-       }
-
-       /**
-        * Validates a specific property ($propertyName) of the given object. Any errors will be stored
-        * in the given errors object. If validation succeeds, this method returns TRUE, else it will return FALSE.
-        * It also invokes any registered property editors.
-        *
-        * @param object $object: The object of which the property should be validated
-        * @param string $propertyName: The name of the property that should be validated
-        * @param F3_FLOW3_Validation_Errors $errors: Here any occured validation error is stored
-        * @return boolean TRUE if the property could be validated, FALSE if an error occured
-        * @throws F3_FLOW3_Validation_Exception_InvalidSubject if this validator cannot validate the given subject or the subject is not an object.
-        */
-       public function validateProperty($object, $propertyName, F3_FLOW3_Validation_Errors &$errors) {
-               if (!$object instanceof TX_EXTMVC_Controller_Arguments) throw new F3_FLOW3_Validation_Exception_InvalidSubject('The specified object cannot be validated by this validator.', 1216720830);
-
-               $propertyValidatorErrors = $this->createNewValidationErrorsObject();
-
-               $isValid = TRUE;
-               if ($object[$propertyName]->getValidator() != NULL) $isValid &= $object[$propertyName]->getValidator()->isValidProperty($object[$propertyName]->getValue(), $propertyValidatorErrors);
-               $datatypeValidator = $object[$propertyName]->getDatatypeValidator();
-               $isValid &= $datatypeValidator->isValidProperty($object[$propertyName]->getValue(), $propertyValidatorErrors);
-
-               if (!$isValid) $errors[$propertyName] = $propertyValidatorErrors;
-
-               return (boolean)$isValid;
-       }
-
-       /**
-        * Returns TRUE, if the given property ($proptertyValue) is a valid value for the property ($propertyName) of the class ($className).
-        * Any errors will be stored in the given errors object. If at least one error occurred, the result is FALSE.
-        *
-        * @param string $className: The propterty's class name
-        * @param string $propertyName: The name of the property for wich the value should be validated
-        * @param object $propertyValue: The value that should be validated
-        * @return boolean TRUE if the value could be validated for the given property, FALSE if an error occured
-        */
-       public function isValidProperty($className, $propertyName, $propertyValue, F3_FLOW3_Validation_Errors &$errors) {
-               $propertyValidatorErrors = $this->createNewValidationErrorsObject();
-
-               $isValid = TRUE;
-               if ($this->registeredArguments[$propertyName]->getValidator() != NULL) $isValid &= $this->registeredArguments[$propertyName]->getValidator()->isValidProperty($propertyValue->getValue(), $propertyValidatorErrors);
-               $isValid &= $this->registeredArguments[$propertyName]->getDatatypeValidator()->isValidProperty($propertyValue, $propertyValidatorErrors);
-
-               if (!$isValid) $errors[$propertyName] = $propertyValidatorErrors;
-
-               return (boolean)$isValid;
-       }
-
-       /**
-        * This is a factory method to get a clean validation errors object
-        *
-        * @return F3_FLOW3_Validation_Errors An empty errors object
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        */
-       protected function createNewValidationErrorsObject() {
-               return $this->objectFactory->create('F3_FLOW3_Validation_Errors');
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_DefaultController.php b/typo3/sysext/extbase/Controller/TX_EXTMVC_Controller_DefaultController.php
deleted file mode 100755 (executable)
index be65985..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-declare(ENCODING = 'utf-8');
-
-
-/*                                                                        *
- * This script belongs to the FLOW3 framework.                            *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- */
-
-/**
- * A Special Case of a Controller: If no controller could be resolved or no
- * controller has been specified in the request, this controller is chosen.
- *
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
- */
-class DefaultController extends TX_EXTMVC_Controller_RequestHandlingController {
-
-       /**
-        * @var TX_EXTMVC_View_DefaultView
-        */
-       protected $defaultView;
-
-       /**
-        * Injects the default view
-        *
-        * @param TX_EXTMVC_View_DefaultView $defaultView The default view
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function injectDefaultView(TX_EXTMVC_View_DefaultView $defaultView) {
-               $this->defaultView = $defaultView;
-       }
-
-       /**
-        * Processes a generic request and returns a response
-        *
-        * @param TX_EXTMVC_Request $request: The request
-        * @param TX_EXTMVC_Response $response: The response
-        * @author Robert Lemke <robert@typo3.org>
-        */
-       public function processRequest(TX_EXTMVC_Request $request, TX_EXTMVC_Response $response) {
-               $request->setDispatched(TRUE);
-               switch (get_class($request)) {
-                       case 'F3_FLOW3_MVC_Web_Request' :
-                               $this->processWebRequest($request, $response);
-                               break;