* added common extension files
authorJochen Rau <j.rau@web.de>
Tue, 20 Jan 2009 21:31:47 +0000 (21:31 +0000)
committerJochen Rau <j.rau@web.de>
Tue, 20 Jan 2009 21:31:47 +0000 (21:31 +0000)
* some general clean up (FLOW3 related comments etc.)
* first hands on dispatcher, request, and response

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

index 0f7d228..ebf2e10 100755 (executable)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 1d9a5b5..ae77817 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index ac2c5c3..a5f2ba2 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
index f3bce3f..80eb6ab 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
index ff215a9..e16272e 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
index be65985..166e6db 100755 (executable)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,18 +21,10 @@ declare(ENCODING = 'utf-8');
  * 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
  */
@@ -70,11 +61,11 @@ class DefaultController extends TX_EXTMVC_Controller_RequestHandlingController {
                                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" .
+                                       "\nWelcome to TYPO3!\n\n" .
+                                       "This is the default view of the TYPO3 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"
+                                       "Have fun! The TYPO3 Development Team\n"
                                );
                }
        }
index c54140f..1bcb069 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index c8397d1..8731182 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
@@ -140,7 +131,7 @@ class RequestHandlingController extends TX_EXTMVC_Controller_AbstractController
                $this->request->setDispatched(FALSE);
                $this->request->setControllerActionName($actionName);
                if ($controllerName !== NULL) $this->request->setControllerName($controllerName);
-               if ($packageKey !== NULL) $this->request->setControllerPackageKey($packageKey);
+               if ($packageKey !== NULL) $this->request->setControllerExtensionKey($packageKey);
                if ($arguments !== NULL) $this->request->setArguments($arguments);
                throw new TX_EXTMVC_Exception_StopAction();
        }
index ed007e3..02d222c 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 164f1bd..977acaf 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 9d740c1..de5e48e 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 664c94f..728ca67 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 9d29c29..7095e53 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 796769f..bcdc9dd 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 418cee1..5003dc4 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 8e6aab9..29e8e9d 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 5998348..0f8ef36 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 6578a9e..f472aff 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -23,20 +22,12 @@ declare(ENCODING = 'utf-8');
  *                                                                        */
 
 /**
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- */
-
-/**
- * An "Invalid Package Key" exception
+ * An "Invalid Extension 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 {
+class InvalidExtensionKey extends TX_EXTMVC_Exception {
 
 }
 
index c8a2115..4bc9fcb 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 17e8941..26befa3 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 018813d..ea50ad5 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index a746104..343301e 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index fdad9b8..e87690e 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index d2930c4..6eaf508 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index c562c51..0ef2249 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index af9c9d8..2bb1666 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 103dfc4..0a4d6ac 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index bb42108..c5b690f 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,12 +21,6 @@ declare(ENCODING = 'utf-8');
  * 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
@@ -36,8 +29,6 @@ declare(ENCODING = 'utf-8');
  *
  * 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
  */
index 1114449..56c7b40 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index d48e6c5..1fa69e5 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 678a2d5..730f733 100644 (file)
@@ -23,8 +23,6 @@ namespace F3_FLOW3_MVC;
  *                                                                        */
 
 /**
- * @package FLOW3
- * @subpackage MVC
  * @version $Id: F3_FLOW3_MVC_DefaultRequestHandler.php 1749 2009-01-15 15:06:30Z k-fish $
  */
 
@@ -32,8 +30,6 @@ namespace F3_FLOW3_MVC;
  * 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
  */
index cf1a784..696a5ec 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 61f84b8..bd523e2 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,62 +21,37 @@ declare(ENCODING = 'utf-8');
  * 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 {
+class TX_EXTMVC_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';
+       protected $controllerObjectNamePattern = 'TX_@package_Controller_@controllerController';
 
        /**
         * Pattern after which the view object name is built
         *
         * @var string
         */
-       protected $viewObjectNamePattern = 'F3_@package_View_@controller@action@format';
+       protected $viewObjectNamePattern = 'TX_@package_View_@controller@action@format';
 
        /**
-        * Package key of the controller which is supposed to handle this request.
+        * Extension 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;
+       protected $controllerExtensionKey = 'EXTMVC';
 
        /**
         * @var string Object name of the controller which is supposed to handle this request.
@@ -113,28 +87,6 @@ class Request {
                $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
         *
@@ -160,7 +112,7 @@ class Request {
        }
 
        /**
-        * Returns the object name of the controller defined by the package key and
+        * Returns the object name of the controller defined by the extension key and
         * controller name
         *
         * @return string The controller's Object Name
@@ -168,8 +120,7 @@ class Request {
         * @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 = str_replace('@package', $this->controllerExtensionKey, $this->controllerObjectNamePattern);
                $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);
@@ -181,7 +132,7 @@ class Request {
         * 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.
+        * by the real extension key and controller name.
         *
         * @param string $pattern The pattern
         * @return void
@@ -234,7 +185,7 @@ class Request {
         */
        public function getViewObjectName() {
                $possibleViewName = $this->viewObjectNamePattern;
-               $possibleViewName = str_replace('@package', $this->controllerPackageKey, $possibleViewName);
+               $possibleViewName = str_replace('@package', $this->controllerExtensionKey, $possibleViewName);
                $possibleViewName = str_replace('@subpackage', $this->controllerSubpackageKey, $possibleViewName);
                $possibleViewName = str_replace('@controller', $this->controllerName, $possibleViewName);
                $possibleViewName = str_replace('@action', $this->controllerActionName, $possibleViewName);
@@ -247,48 +198,27 @@ class Request {
        }
 
        /**
-        * Sets the package key of the controller.
+        * Sets the extension key of the controller.
         *
-        * @param string $packageKey The package key.
+        * @param string $packageKey The extension key.
         * @return void
-        * @throws TX_EXTMVC_Exception_InvalidPackageKey if the package key is not valid
+        * @throws TX_EXTMVC_Exception_InvalidExtensionKey if the extension 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;
+       public function setControllerExtensionKey($packageKey) {
+               $upperCamelCasedExtensionKey = $this->packageManager->getCaseSensitiveExtensionKey($packageKey);
+               if ($upperCamelCasedExtensionKey === FALSE) throw new TX_EXTMVC_Exception_InvalidExtensionKey('"' . $packageKey . '" is not a valid extension key.', 1217961104);
+               $this->controllerExtensionKey = $upperCamelCasedExtensionKey;
        }
 
        /**
-        * Returns the package key of the specified controller.
+        * Returns the extension key of the specified controller.
         *
-        * @return string The package key
+        * @return string The extension 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;
+       public function getControllerExtensionKey() {
+               return $this->controllerExtensionKey;
        }
 
        /**
index 6207719..542205f 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
index b49fcad..474e4d0 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 277c95c..fb67a64 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,18 +21,10 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index b6d107b..3dae656 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,18 +21,10 @@ declare(ENCODING = 'utf-8');
  * 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
index ba28cfb..547f72c 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
index 9eb7fa1..e784c0c 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index a9c8460..24dd2c4 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index c2fe68a..861ec30 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
@@ -89,7 +80,7 @@ class URIHelper extends TX_EXTMVC_View_Helper_AbstractHelper {
                $routeValues = $arguments;
                $routeValues['@action'] = $actionName;
                $routeValues['@controller'] = ($controllerName === NULL) ? $this->request->getControllerName() : $controllerName;
-               $routeValues['@package'] = ($packageKey === NULL) ? $this->request->getControllerPackageKey() : $packageKey;
+               $routeValues['@package'] = ($packageKey === NULL) ? $this->request->getControllerExtensionKey() : $packageKey;
                $currentSubpackageKey = $this->request->getControllerSubpackageKey();
                if ($subpackageKey === NULL && strlen($currentSubpackageKey)) {
                        $routeValues['@subpackage'] = $currentSubpackageKey;
index 3bbd41f..a95ed68 100755 (executable)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index ef8d4b2..4dc2cd0 100755 (executable)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index ac0424c..46c9642 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -24,16 +23,12 @@ declare(ENCODING = 'utf-8');
 
 /**
  *
- * @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
  */
index 39bb1fc..461876c 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
index 214bf4d..05eaa62 100755 (executable)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  *
@@ -40,6 +31,14 @@ declare(ENCODING = 'utf-8');
  */
 class Request extends TX_EXTMVC_Request {
 
+       const REQUEST_METHOD_UNKNOWN = NULL;
+       const REQUEST_METHOD_GET = 'GET';
+       const REQUEST_METHOD_POST = 'POST';
+       const REQUEST_METHOD_HEAD = 'HEAD';
+       const REQUEST_METHOD_OPTIONS = 'OPTIONS';
+       const REQUEST_METHOD_PUT = 'PUT';
+       const REQUEST_METHOD_DELETE = 'DELETE';
+
        /**
         * @var string The requested representation format
         */
@@ -79,20 +78,20 @@ class Request extends TX_EXTMVC_Request {
        /**
         * Sets the request method
         *
-        * @param string $method Name of the request method - one of the F3_FLOW3_Utility_Environment::REQUEST_METHOD_* constants
+        * @param string $method Name of the request method - one of the self::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
+                               self::REQUEST_METHOD_GET,
+                               self::REQUEST_METHOD_POST,
+                               self::REQUEST_METHOD_DELETE,
+                               self::REQUEST_METHOD_PUT,
+                               self::REQUEST_METHOD_HEAD,
+                               self::REQUEST_METHOD_OPTIONS,
+                               self::REQUEST_METHOD_UNKNOWN
                        )) === FALSE) throw new TX_EXTMVC_Exception_InvalidRequestMethod('The request method "' . $method . '" is not supported.', 1217778382);
                $this->method = $method;
        }
index 5e661a3..2546ff4 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index a4e2e1b..26f9dc5 100755 (executable)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
  */
index 4463e19..14eb9df 100755 (executable)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -22,17 +21,9 @@ declare(ENCODING = 'utf-8');
  * 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
diff --git a/typo3/sysext/extbase/ext_emconf.php b/typo3/sysext/extbase/ext_emconf.php
new file mode 100644 (file)
index 0000000..5138d7d
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+
+########################################################################
+# Extension Manager/Repository config file for ext: "extmvc"
+#
+# Auto generated 
+#
+# Manual updates:
+# Only the data in the array - anything else is removed by next write.
+# "version" and "dependencies" must not be touched!
+########################################################################
+
+$EM_CONF[$_EXTKEY] = array(
+       'title' => 'MVC Framework for Extensions',
+       'description' => 'A MVC framework to build extensions: It\'s based on the MVC framework of FLOW3.',
+       'category' => 'plugin',
+       'author' => 'Jochen Rau',
+       'author_email' => 'jochen.rau@typoplanet.de',
+       'shy' => '',
+       'dependencies' => '',
+       'conflicts' => '',
+       'priority' => '',
+       'module' => '',
+       'state' => 'beta',
+       'internal' => '',
+       'uploadfolder' => 1,
+       'createDirs' => '',
+       'modify_tables' => '',
+       'clearCacheOnLoad' => 1,
+       'lockType' => '',
+       'author_company' => '',
+       'version' => '1.0.0',
+       'constraints' => array(
+               'depends' => array(
+                       'php' => '5.1.0-0.0.0',
+                       'typo3' => '4.3.0-4.3.99',
+               ),
+               'conflicts' => array(
+               ),
+               'suggests' => array(
+               ),
+       ),
+       '_md5_values_when_last_written' => '',
+       'suggests' => array(
+       ),
+);
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/ext_icon.gif b/typo3/sysext/extbase/ext_icon.gif
new file mode 100644 (file)
index 0000000..334ca6e
Binary files /dev/null and b/typo3/sysext/extbase/ext_icon.gif differ
diff --git a/typo3/sysext/extbase/ext_localconf.php b/typo3/sysext/extbase/ext_localconf.php
new file mode 100644 (file)
index 0000000..0c8ccbe
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/ext_typoscript_setup.txt b/typo3/sysext/extbase/ext_typoscript_setup.txt
new file mode 100644 (file)
index 0000000..c9f005e
--- /dev/null
@@ -0,0 +1,3 @@
+plugin.tx_extmvc {
+       
+}
\ No newline at end of file
index ca38b1d..ee0897c 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 declare(ENCODING = 'utf-8');
 
-
 /*                                                                        *
  * This script belongs to the FLOW3 framework.                            *
  *                                                                        *
@@ -23,112 +22,64 @@ declare(ENCODING = 'utf-8');
  *                                                                        */
 
 /**
- * @package FLOW3
- * @subpackage MVC
- * @version $Id:$
- */
-
-/**
- * Dispatches requests to the controller which was specified by the request and
- * returns the response the controller generated.
+ * Creates a request an dispatches it to the controller which was specified by TS Setup, Flexform,
+ * or Extension Configuration (ExtConf), and returns the content to the v4 framework.
  *
- * @package FLOW3
- * @subpackage MVC
  * @version $Id:$
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class TX_EXTMVC_Dispatcher {
 
        /**
-        * @var F3_FLOW3_Object_ManagerInterface A reference to the object manager
-        */
-       protected $objectManager;
-
-       /**
-        * @var F3_FLOW3_Security_ContextHolderInterface A reference to the security contextholder
-        */
-       protected $securityContextHolder;
-
-       /**
-        * @var F3_FLOW3_Security_Auhtorization_FirewallInterface A reference to the firewall
-        */
-       protected $firewall;
-
-       /**
-        * @var F3_FLOW3_Configuration_Manager A reference to the configuration manager
+        * @var TX_EXTMVC_Configuration_Manager A reference to the configuration manager
         */
        protected $configurationManager;
 
        /**
-        * Constructs the global dispatcher
-        *
-        * @param F3_FLOW3_Object_ManagerInterface $objectManager A reference to the object manager
-        * @author Robert Lemke <robert@typo3.org>
+        * @var TX_EXTMVC_Web_RequestBuilder
         */
-       public function __construct(F3_FLOW3_Object_ManagerInterface $objectManager) {
-               $this->objectManager = $objectManager;
-       }
+       protected $requestBuilder;
 
        /**
-        * Injects the security context holder
-        *
-        * @param F3_FLOW3_Security_ContextHolderInterface $securityContextHolder
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
+        * @var ArrayObject The raw GET parameters
         */
-       public function injectSecurityContextHolder(F3_FLOW3_Security_ContextHolderInterface $securityContextHolder) {
-               $this->securityContextHolder = $securityContextHolder;
-       }
+       protected $getParameters;
 
        /**
-        * Injects the authorization firewall
-        *
-        * @param F3_FLOW3_Security_Authorization_FirewallInterface $firewall
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
+        * @var ArrayObject The raw POST parameters
         */
-       public function injectFirewall(F3_FLOW3_Security_Authorization_FirewallInterface $firewall) {
-               $this->firewall = $firewall;
-       }
+       protected $postParameters;
 
        /**
-        * Injects the configuration manager
+        * Constructs this dispatcher
         *
-        * @param F3_FLOW3_Configuration_Manager $configurationManager
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
+        * @author Jochen Rau <jochen.rau@typoplanet.de>
         */
-       public function injectConfigurationManager(F3_FLOW3_Configuration_Manager $configurationManager) {
-               $this->configurationManager = $configurationManager;
+       public function __construct() {
+               $this->arguments = new ArrayObject;
        }
 
        /**
-        * Dispatches a request to a controller and initializes the security framework.
+        * Creates a request an dispatches it to a controller.
         *
         * @param String $content The content
-        * @param array $configuration The TS configuration array
+        * @param array|NULL $configuration The TS configuration array
         * @return String $content The processed content
         * @author Robert Lemke <robert@typo3.org>
         * @author Andreas Förthner <andreas.foerthner@netlogix.de>    
+        * @author Jochen Rau <jochen.rau@typoplanet.de>
         */
-       public function dispatch(TX_EXTMVC_Request $request, TX_EXTMVC_Response $response) {
-               $dispatchLoopCount = 0;
-               while (!$request->isDispatched()) {
-                       $dispatchLoopCount ++;
-                       if ($dispatchLoopCount > 99) throw new TX_EXTMVC_Exception_InfiniteLoop('Could not ultimately dispatch the request after '  . $dispatchLoopCount . ' iterations.', 1217839467);
-
-                       $settings = $this->configurationManager->getSettings('FLOW3');
-                       if ($settings['security']['enable'] === TRUE) {
-                               $this->securityContextHolder->initializeContext($request);
-                               $this->firewall->blockIllegalRequests($request);
-                       }
-
-                       try {
-                               $controller = $this->getPreparedController($request, $response);
-                               $controller->processRequest($request, $response);
-                       } catch (TX_EXTMVC_Exception_StopAction $ignoredException) {
-                       }
-               }
+       public function dispatch($content, $configuration) {            
+               // TODO instantiate the configurationManager
+               // TODO intantiate a request object
+               // TODO intantiate a response object
+               $getParameters = t3lib_div::_GET();
+               $postParameters = t3lib_div::_POST();
+               $settings = $this->configurationManager->getSettings($extensionKey);
+
+               $controller = $this->getPreparedController($request, $response);
+               $controller->processRequest($request, $response);
+               return $response->getContent();
        }
 
        /**
@@ -139,29 +90,15 @@ class TX_EXTMVC_Dispatcher {
         * @return TX_EXTMVC_Controller_RequestHandlingController The controller
         * @throws TX_EXTMVC_Exception_NoSuchController, TX_EXTMVC_Exception_InvalidController
         * @author Robert Lemke <robert@typo3.org>
-        * @todo Implement proper mechanism for handling authentication exceptions
+        * @author Jochen Rau <jochen.rau@typoplanet.de>
         */
        protected function getPreparedController(TX_EXTMVC_Request $request, TX_EXTMVC_Response $response) {
                $controllerObjectName = $request->getControllerObjectName();
-
-               try {
-                       $controller = $this->objectManager->getObject($controllerObjectName);
-               } catch (F3_FLOW3_Security_Exception_AuthenticationRequired $exception) {
-                       if (!$request instanceof TX_EXTMVC_Web_Request) throw $exception;
-                       $request->setDispatched(TRUE);
-
-                       $settings = $this->configurationManager->getSettings('FLOW3');
-                       $uri = (string)$request->getBaseURI() . $settings['security']['loginPageURIForDemoPurposes'];
-                       $escapedUri = htmlentities($uri, ENT_QUOTES, 'utf-8');
-                       $response->setContent('<html><head><meta http-equiv="refresh" content="0;url=' . $escapedUri . '"/></head></html>');
-                       $response->setStatus(303);
-                       $response->setHeader('Location', (string)$uri);
-                       throw new TX_EXTMVC_Exception_StopAction();
-               }
-
+               $controller = t3lib_div::makeInstance($controllerObjectName);
+               
                if (!$controller instanceof TX_EXTMVC_Controller_RequestHandlingController) throw new TX_EXTMVC_Exception_InvalidController('Invalid controller "' . $controllerObjectName . '". The controller must be a valid request handling controller.', 1202921619);
 
-               $controller->setSettings($this->configurationManager->getSettings($request->getControllerPackageKey()));
+               $controller->setSettings($this->configurationManager->getSettings($request->getControllerExtensionKey()));
                return $controller;
        }
 }