* Raised Extbase and Fluid versions to 1.2.0beta1
authorSebastian Kurfürst <sebastian.kurfuerst@typo3.org>
Sun, 2 May 2010 13:08:22 +0000 (13:08 +0000)
committerSebastian Kurfürst <sebastian.kurfuerst@typo3.org>
Sun, 2 May 2010 13:08:22 +0000 (13:08 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7504 709f56b5-9817-0410-a4d7-c38de5d9e867

431 files changed:
typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Configuration/Exception.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Configuration/Exception/ContainerIsLocked.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Configuration/Exception/InvalidConfigurationType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Configuration/Exception/NoSuchFile.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Configuration/Exception/NoSuchOption.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Configuration/Exception/ParseError.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Dispatcher.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Domain/Model/FrontendUser.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Domain/Model/FrontendUserGroup.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserGroupRepository.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserRepository.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/DomainObject/AbstractEntity.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/DomainObject/AbstractValueObject.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/DomainObject/DomainObjectInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Error/Error.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Exception.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Controller/AbstractController.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Controller/ActionController.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Controller/Argument.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Controller/ArgumentError.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Controller/Arguments.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Controller/ArgumentsValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Controller/ControllerContext.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Controller/ControllerInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Controller/FlashMessages.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InfiniteLoop.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidActionName.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidArgumentName.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidArgumentType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidArgumentValue.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidController.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidControllerName.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidExtensionName.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidMarker.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidOrNoRequestHash.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidRequestMethod.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidRequestType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidTemplateResource.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidUriPattern.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/InvalidViewHelper.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/NoSuchAction.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/NoSuchArgument.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/NoSuchController.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/StopAction.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Exception/UnsupportedRequestType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Request.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/RequestInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Response.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/ResponseInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/View/AbstractView.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/MVC/View/EmptyView.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/View/ViewInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/MVC/Web/Request.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/MVC/Web/RequestBuilder.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/MVC/Web/Response.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/MVC/Web/Routing/UriBuilder.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/CannotBuildObject.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/CannotReconstituteObject.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/InvalidClass.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/InvalidObject.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/InvalidObjectConfiguration.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/ObjectAlreadyRegistered.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/UnknownClass.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/UnknownInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/UnknownObject.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/UnresolvedDependencies.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Exception/WrongScope.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/Manager.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/ManagerInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/RegistryInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Object/TransientRegistry.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Backend.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/BackendInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/CleanStateNotMemorized.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/IllegalObjectType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/InvalidClass.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/InvalidNumberOfConstraints.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/InvalidPropertyType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/MissingBackend.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/RepositoryException.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/TooDirty.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/UnexpectedTypeException.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/UnknownObject.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/UnsupportedMethod.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/UnsupportedOrder.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Exception/UnsupportedRelation.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/IdentityMap.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/LazyLoadingProxy.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/LazyObjectStorage.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/LoadingStrategyInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Manager.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/ManagerInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Mapper/ColumnMap.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Mapper/DataMap.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapFactory.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/PropertyType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/AndInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/BindVariableValue.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/BindVariableValueInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/Comparison.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/ComparisonInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/Constraint.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/ConstraintInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/DynamicOperand.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/DynamicOperandInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/EquiJoinCondition.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/EquiJoinConditionInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/Join.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/JoinConditionInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/JoinInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/LogicalAnd.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/LogicalNot.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/LogicalOr.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/LowerCase.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/LowerCaseInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/NotInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/Operand.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/OperandInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/OrInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/Ordering.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/OrderingInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/PropertyValue.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/PropertyValueInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/QueryObjectModelConstantsInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/QueryObjectModelFactory.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/QueryObjectModelFactoryInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/Selector.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/SelectorInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/SourceInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/Statement.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/StaticOperand.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/StaticOperandInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/UpperCase.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/UpperCaseInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Query.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QueryFactory.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QueryFactoryInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QueryInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QuerySettingsInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Repository.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/RepositoryInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Session.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Storage/BackendInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Storage/Exception/BadConstraint.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Storage/Exception/SqlError.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/Typo3QuerySettings.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Property/Exception.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Property/Exception/FormatNotSupported.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Property/Exception/InvalidDataType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Property/Exception/InvalidFormat.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Property/Exception/InvalidProperty.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Property/Exception/InvalidSource.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/Property/Exception/InvalidTarget.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/Property/Mapper.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Property/MappingResults.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Reflection/ClassReflection.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Reflection/ClassSchema.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Reflection/DocCommentParser.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Reflection/Exception.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Reflection/Exception/InvalidPropertyType.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Reflection/MethodReflection.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Reflection/ObjectAccess.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Reflection/ParameterReflection.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Reflection/PropertyReflection.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Reflection/Service.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Security/Channel/RequestHashService.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Security/Cryptography/HashService.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Security/Exception.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Security/Exception/InvalidArgumentForHashGeneration.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Security/Exception/InvalidArgumentForRequestHashGeneration.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Security/Exception/SyntacticallyWrongRequestHash.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Utility/Arrays.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Utility/Cache.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Utility/ClassLoader.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Utility/ExtbaseRequirementsCheck.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Utility/Extension.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Utility/Localization.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Utility/TypeHandling.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Utility/TypoScript.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Error.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Exception.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Exception/InvalidSubject.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/Validation/Exception/InvalidValidationConfiguration.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Exception/InvalidValidationOptions.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/Validation/Exception/NoSuchValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Exception/NoValidatorFound.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/PropertyError.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/AbstractCompositeValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/AbstractObjectValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/AbstractValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/AlphanumericValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/ConjunctionValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/DateTimeValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/DisjunctionValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/EmailAddressValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/FloatValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/GenericObjectValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/IntegerValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/NotEmptyValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/NumberRangeValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/NumberValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/ObjectValidatorInterface.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/Validation/Validator/RawValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/RegularExpressionValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/StringLengthValidator.php [new file with mode: 0755]
typo3/sysext/extbase/Classes/Validation/Validator/StringValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/TextValidator.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/Validator/ValidatorInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php [new file with mode: 0644]
typo3/sysext/extbase/Documentation/README.txt [new file with mode: 0644]
typo3/sysext/extbase/RELEASE_NOTES.txt [new file with mode: 0644]
typo3/sysext/extbase/Resources/Private/.htaccess [new file with mode: 0644]
typo3/sysext/extbase/Resources/Private/Language/locallang_db.xml [new file with mode: 0644]
typo3/sysext/extbase/Tests/BaseTestCase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Configuration/BackendConfigurationManager_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Configuration/FrontendConfigurationManager_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/DomainObject/AbstractEntity_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Fixtures/Entity.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/MVC/Controller/AbstractController_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/MVC/Controller/ActionController_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/MVC/Controller/Argument_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/MVC/Controller/Arguments_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/MVC/Web/RequestBuilder_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/MVC/Web/Routing/UriBuilder_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/Mapper/DataMapFactory_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/ObjectStorage_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/Query_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/Session_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/Storage/Typo3DbBackend_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Reflection/Service_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Security/Channel/RequestHashService_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Security/Cryptography/HashService_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Utility/Extension_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Utility/TypoScript_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Validation/Validator/AlphanumericValidator_testcase.php [new file with mode: 0755]
typo3/sysext/extbase/Tests/Validation/Validator/ConjunctionValidator_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Validation/Validator/DateTimeValidator_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Validation/Validator/EmailAddressValidator_testcase.php [new file with mode: 0755]
typo3/sysext/extbase/Tests/Validation/Validator/FloatValidator_testcase.php [new file with mode: 0755]
typo3/sysext/extbase/Tests/Validation/Validator/GenericObjectValidator_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Validation/Validator/IntegerValidator_testcase.php [new file with mode: 0755]
typo3/sysext/extbase/Tests/Validation/Validator/NotEmptyValidator_testcase.php [new file with mode: 0755]
typo3/sysext/extbase/Tests/Validation/Validator/NumberRangeValidator_testcase.php [new file with mode: 0755]
typo3/sysext/extbase/Tests/Validation/Validator/NumberValidator_testcase.php [new file with mode: 0755]
typo3/sysext/extbase/Tests/Validation/Validator/RawValidator_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Validation/Validator/RegularExpressionValidator_testcase.php [new file with mode: 0755]
typo3/sysext/extbase/Tests/Validation/Validator/StringLengthValidator_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Validation/Validator/TextValidator_testcase.php [new file with mode: 0755]
typo3/sysext/extbase/Tests/Validation/ValidatorResolver_testcase.php [new file with mode: 0644]
typo3/sysext/extbase/ext_autoload.php [new file with mode: 0644]
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_tables.php [new file with mode: 0644]
typo3/sysext/extbase/ext_tables.sql [new file with mode: 0644]
typo3/sysext/extbase/ext_typoscript_setup.txt [new file with mode: 0644]
typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Compatibility/ObjectManager.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Compatibility/TemplateParserBuilder.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Exception.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/Configuration.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/Exception.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/Interceptor/Escape.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/InterceptorInterface.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/ParsedTemplateInterface.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/ParsingState.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ArrayNode.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NodeInterface.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RootNode.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ViewHelperNode.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/ArgumentDefinition.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/Exception.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/ChildNodeAccessInterface.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/PostParseInterface.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/TagBasedViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperInterface.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Exception.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Fluid.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/Service/DocbookGenerator.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/View/Exception.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/View/Exception/InvalidTemplateResourceException.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/View/TemplateView.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/View/TemplateViewInterface.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/AliasViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Be/AbstractBackendViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuItemViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Be/TableListViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/CycleViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/DebugViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/ElseViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/EscapeViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/ForViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/ErrorsViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/HiddenViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/PasswordViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/RadioViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/SubmitViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/TextareaViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/TextboxViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Format/Nl2brViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Format/NumberViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Format/PaddingViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Format/PrintfViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/GroupedForViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/IfViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/LayoutViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Link/EmailViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/RenderFlashMessagesViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/RenderViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/SectionViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/ThenViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ActionViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Uri/EmailViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Fixtures/TestViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/ChildNodeAccessFacetViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/PostParseFacetViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture01-shorthand-split.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture01-shorthand.html [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture06-split.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture06.html [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture14-split.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture14.html [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/Interceptor/EscapeTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/ParsingStateTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/AbstractNodeTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/TextNodeTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeComparatorTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/TagBasedViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/TagBuilderTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ArgumentDefinitionTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TemplateVariableContainerTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperVariableContainerTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/View/Fixtures/LayoutFixture.html [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/View/Fixtures/TemplateViewFixture.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/View/Fixtures/TemplateViewSectionFixture.html [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/View/Fixtures/TransparentSyntaxTreeNode.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/View/Fixtures/UnparsedTemplateFixture.html [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/AliasViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CycleViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ElseViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/ConstraintSyntaxTreeNode.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/IfFixture.html [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/IfThenElseFixture.html [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ForViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/ErrorsViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/EmptySyntaxTreeNode.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/Fixture_UserDomainClass.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextboxViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CurrencyViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/NumberViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PrintfViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/GroupedForViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/IfViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ThenViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/ExternalViewHelperTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php [new file with mode: 0644]
typo3/sysext/fluid/ext_autoload.php [new file with mode: 0644]
typo3/sysext/fluid/ext_emconf.php [new file with mode: 0755]
typo3/sysext/fluid/ext_icon.gif [new file with mode: 0644]

diff --git a/typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php b/typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php
new file mode 100644 (file)
index 0000000..2ebf284
--- /dev/null
@@ -0,0 +1,141 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * Abstract base class for a general purpose configuration manager
+ *
+ * @package Extbase
+ * @subpackage Configuration
+ * @version $ID:$
+ */
+abstract class Tx_Extbase_Configuration_AbstractConfigurationManager {
+
+       /**
+        * Default backend storage PID
+        */
+       const DEFAULT_BACKEND_STORAGE_PID = 0;
+
+       /**
+        * The TypoScript parser
+        *
+        * @var t3lib_TSparser
+        */
+       protected $typoScriptParser;
+
+       /**
+        * Storage for the settings, loaded by loadSettings()
+        *
+        * @var array
+        */
+       protected $settings;
+
+       /**
+        * Constructs the configuration manager
+        *
+        */
+       public function __construct() {
+               $this->typoScriptParser = t3lib_div::makeInstance('t3lib_TSparser');
+       }
+
+       /**
+        * Loads the Extbase Framework configuration.
+        *
+        * The Extbase framework configuration HAS TO be retrieved using this method, as they are come from different places than the normal settings.
+        * Framework configuration is, in contrast to normal settings, needed for the Extbase framework to operate correctly.
+        *
+        * @param array $pluginConfiguration The current incoming extbase configuration
+        * @return array the Extbase framework configuration
+        */
+       public function getFrameworkConfiguration($pluginConfiguration) {
+               $frameworkConfiguration = array();
+               $frameworkConfiguration['persistence']['storagePid'] = self::DEFAULT_BACKEND_STORAGE_PID;
+
+               $setup = $this->loadTypoScriptSetup();
+               $extbaseConfiguration = $setup['config.']['tx_extbase.'];
+               if (is_array($extbaseConfiguration)) {
+                       $extbaseConfiguration = Tx_Extbase_Utility_TypoScript::convertTypoScriptArrayToPlainArray($extbaseConfiguration);
+                       $frameworkConfiguration = t3lib_div::array_merge_recursive_overrule($frameworkConfiguration, $extbaseConfiguration);
+               }
+               
+               if (isset($pluginConfiguration['settings'])) {
+                       $pluginConfiguration = $this->resolveTyposcriptReference($pluginConfiguration, 'settings');
+               }
+               if (!is_array($pluginConfiguration['settings.'])) $pluginConfiguration['settings.'] = array(); // We expect that the settings are arrays on various places
+               if (isset($pluginConfiguration['persistence'])) {
+                       $pluginConfiguration = $this->resolveTyposcriptReference($pluginConfiguration, 'persistence');
+               }
+               if (isset($pluginConfiguration['view'])) {
+                       $pluginConfiguration = $this->resolveTyposcriptReference($pluginConfiguration, 'view');
+               }
+               if (isset($pluginConfiguration['_LOCAL_LANG'])) {
+                       $pluginConfiguration = $this->resolveTyposcriptReference($pluginConfiguration, '_LOCAL_LANG');
+               }
+               $frameworkConfiguration = t3lib_div::array_merge_recursive_overrule($frameworkConfiguration, Tx_Extbase_Utility_TypoScript::convertTypoScriptArrayToPlainArray($pluginConfiguration));
+
+               $frameworkConfiguration = $this->getContextSpecificFrameworkConfiguration($frameworkConfiguration);
+               return $frameworkConfiguration;
+       }
+
+       /**
+        * The context specific configuration returned by this method
+        * will override the framework configuration which was
+        * obtained from TypoScript. This can be used f.e. to override the storagePid
+        * with the value set inside the Plugin Instance.
+        *
+        * WARNING: Make sure this method ALWAYS returns an array!
+        *
+        * @param array $frameworkConfiguration The framework configuration until now
+        * @return array context specific configuration which will override the configuration obtained by TypoScript
+        */
+       abstract protected function getContextSpecificFrameworkConfiguration($frameworkConfiguration);
+
+       /**
+        * Returns TypoScript Setup array from current Environment.
+        *
+        * @return array the TypoScript setup
+        */
+       abstract public function loadTypoScriptSetup();
+
+       /**
+        * Resolves the TypoScript reference for $pluginConfiguration[$setting].
+        * In case the setting is a string and starts with "<", we know that this is a TypoScript reference which
+        * needs to be resolved separately.
+        *
+        * @param array $pluginConfiguration The whole plugin configuration
+        * @param string $setting The key inside the $pluginConfiguration to check
+        * @return array The modified plugin configuration
+        */
+       protected function resolveTyposcriptReference($pluginConfiguration, $setting) {
+               if (is_string($pluginConfiguration[$setting]) && substr($pluginConfiguration[$setting], 0, 1) === '<') {
+                       $key = trim(substr($pluginConfiguration[$setting], 1));
+                       $setup = $this->loadTypoScriptSetup();
+                       list(, $newValue) = $this->typoScriptParser->getVal($key, $setup);
+
+                       unset($pluginConfiguration[$setting]);
+                       $pluginConfiguration[$setting . '.'] = $newValue;
+               }
+               return $pluginConfiguration;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php b/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php
new file mode 100644 (file)
index 0000000..8156378
--- /dev/null
@@ -0,0 +1,98 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A general purpose configuration manager used in backend mode.
+ *
+ * @package Extbase
+ * @subpackage Configuration
+ * @version $ID:$
+ */
+class Tx_Extbase_Configuration_BackendConfigurationManager extends Tx_Extbase_Configuration_AbstractConfigurationManager implements t3lib_Singleton {
+
+       /**
+        * @var array
+        */
+       protected $typoScriptSetupCache = NULL;
+
+       /**
+        * Returns TypoScript Setup array from current Environment.
+        *
+        * @return array the TypoScript setup
+        */
+       public function loadTypoScriptSetup() {
+               if ($this->typoScriptSetupCache === NULL) {
+                       $template = t3lib_div::makeInstance('t3lib_TStemplate');
+                               // do not log time-performance information
+                       $template->tt_track = 0;
+                       $template->init();
+                               // Get the root line
+                       $sysPage = t3lib_div::makeInstance('t3lib_pageSelect');
+                               // get the rootline for the current page
+                       $rootline = $sysPage->getRootLine($this->getCurrentPageId());
+                               // This generates the constants/config + hierarchy info for the template.
+                       $template->runThroughTemplates($rootline, 0);
+                       $template->generateConfig();
+                       $this->typoScriptSetupCache = $template->setup;
+               }
+               return $this->typoScriptSetupCache;
+       }
+
+       /**
+        * Returns the page uid of the current page.
+        * If no page is selected, we'll return the uid of the first root page.
+        *
+        * @return integer current page id. If no page is selected current root page id is returned
+        */
+       protected function getCurrentPageId() {
+               $pageId = (integer)t3lib_div::_GP('id');
+               if ($pageId > 0) {
+                       return $pageId;
+               }
+
+                       // get root template
+               $rootTemplates = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('pid', 'sys_template', 'deleted=0 AND hidden=0 AND root=1', '', '', '1');
+               if (count($rootTemplates) > 0) {
+                       return $rootTemplates[0]['pid'];
+               }
+
+                       // get current site root
+               $rootPages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages', 'deleted=0 AND hidden=0 AND is_siteroot=1', '', '', '1');
+               if (count($rootPages) > 0) {
+                       return $rootPages[0]['uid'];
+               }
+
+                       // fallback
+               return self::DEFAULT_BACKEND_STORAGE_PID;
+       }
+
+       /**
+        * We do not want to override anything in the backend.
+        * @return array
+        */
+       protected function getContextSpecificFrameworkConfiguration($frameworkConfiguration) {
+               return $frameworkConfiguration;
+       }
+}
+?>
diff --git a/typo3/sysext/extbase/Classes/Configuration/Exception.php b/typo3/sysext/extbase/Classes/Configuration/Exception.php
new file mode 100644 (file)
index 0000000..da4529e
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A generic Configuration Exception
+ *
+ * @package Extbase
+ * @subpackage Configuration
+ * @version $ID:$
+ */
+class Tx_Extbase_Configuration_Exception extends Tx_Extbase_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Configuration/Exception/ContainerIsLocked.php b/typo3/sysext/extbase/Classes/Configuration/Exception/ContainerIsLocked.php
new file mode 100644 (file)
index 0000000..516bf51
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * @version $Id: ContainerIsLocked.php 1051 2009-08-05 20:42:09Z sebastian $
+ */
+
+/**
+ * A Container Is Locked exception
+ *
+ * @package Extbase
+ * @subpackage Configuration\Exception
+ * @version $ID:$
+ */
+class Tx_Extbase_Configuration_Exception_ContainerIsLocked extends Tx_Extbase_Configuration_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Configuration/Exception/InvalidConfigurationType.php b/typo3/sysext/extbase/Classes/Configuration/Exception/InvalidConfigurationType.php
new file mode 100644 (file)
index 0000000..5ddeea9
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * @version $Id: InvalidConfigurationType.php 1051 2009-08-05 20:42:09Z sebastian $
+ */
+
+/**
+ * An Invalid Configuration Type Exception
+ *
+ * @package Extbase
+ * @subpackage Configuration\Exception
+ * @version $ID:$
+ */
+class Tx_Extbase_Configuration_Exception_InvalidConfigurationType extends Tx_Extbase_Configuration_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Configuration/Exception/NoSuchFile.php b/typo3/sysext/extbase/Classes/Configuration/Exception/NoSuchFile.php
new file mode 100644 (file)
index 0000000..97fca5f
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * @version $Id: NoSuchFile.php 1051 2009-08-05 20:42:09Z sebastian $
+ */
+
+/**
+ * A No Such File exception
+ *
+ * @package Extbase
+ * @subpackage Configuration\Exception
+ * @version $ID:$
+ */
+class Tx_Extbase_Configuration_Exception_NoSuchFile extends Tx_Extbase_Configuration_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Configuration/Exception/NoSuchOption.php b/typo3/sysext/extbase/Classes/Configuration/Exception/NoSuchOption.php
new file mode 100644 (file)
index 0000000..71286de
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * @version $Id: NoSuchOption.php 1051 2009-08-05 20:42:09Z sebastian $
+ */
+
+/**
+ * A No Such Option exception
+ *
+ * @package Extbase
+ * @subpackage Configuration\Exception
+ * @version $ID:$
+ */
+class Tx_Extbase_Configuration_Exception_NoSuchOption extends Tx_Extbase_Configuration_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Configuration/Exception/ParseError.php b/typo3/sysext/extbase/Classes/Configuration/Exception/ParseError.php
new file mode 100644 (file)
index 0000000..52e111f
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * @version $Id: ParseError.php 1051 2009-08-05 20:42:09Z sebastian $
+ */
+
+/**
+ * A Parse Error exception
+ *
+ * @package Extbase
+ * @subpackage Configuration\Exception
+ * @version $ID:$
+ */
+class Tx_Extbase_Configuration_Exception_ParseError extends Tx_Extbase_Configuration_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php b/typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php
new file mode 100644 (file)
index 0000000..68e42f7
--- /dev/null
@@ -0,0 +1,235 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A general purpose configuration manager used in frontend mode.
+ *
+ * Should NOT be singleton, as a new configuration manager is needed per plugin.
+ *
+ * @package Extbase
+ * @subpackage Configuration
+ * @version $ID:$
+ */
+class Tx_Extbase_Configuration_FrontendConfigurationManager extends Tx_Extbase_Configuration_AbstractConfigurationManager {
+
+       /**
+        * @var tslib_cObj
+        */
+       protected $contentObject;
+
+       /**
+        * @param tslib_cObj $contentObject
+        * @return void
+        */
+       public function setContentObject(tslib_cObj $contentObject) {
+               $this->contentObject = $contentObject;
+       }
+
+       /**
+        * Returns TypoScript Setup array from current Environment.
+        *
+        * @return array the TypoScript setup
+        */
+       public function loadTypoScriptSetup() {
+               return $GLOBALS['TSFE']->tmpl->setup;
+       }
+
+       /**
+        * Get context specific framework configuration.
+        * - Overrides storage PID with setting "Startingpoint"
+        * - merge flexform configuration, if needed
+        *
+        * @param array $frameworkConfiguration The framework configuration to modify
+        * @return array the modified framework configuration
+        */
+       protected function getContextSpecificFrameworkConfiguration($frameworkConfiguration) {
+               $frameworkConfiguration = $this->overrideStoragePidIfStartingPointIsSet($frameworkConfiguration);
+               $frameworkConfiguration = $this->overrideConfigurationFromPlugin($frameworkConfiguration);
+               $frameworkConfiguration = $this->overrideConfigurationFromFlexform($frameworkConfiguration);
+
+               return $frameworkConfiguration;
+       }
+
+       /**
+        * Overrides the storage PID settings, in case the "Startingpoint" settings
+        * is set in the plugin configuration.
+        *
+        * @param array $frameworkConfiguration the framework configurations
+        * @return array the framework configuration with overriden storagePid
+        */
+       protected function overrideStoragePidIfStartingPointIsSet($frameworkConfiguration) {
+               $pages = $this->contentObject->data['pages'];
+               if (is_string($pages) && strlen($pages) > 0) {
+                       $list = array();
+                       if($this->contentObject->data['recursive'] > 0) {
+                               $explodedPages = t3lib_div::trimExplode(',', $pages);
+                               foreach($explodedPages as $pid) {
+                                       $list[] = trim($this->contentObject->getTreeList($pid, $this->contentObject->data['recursive']), ',');
+                               }
+                       }
+                       if (count($list) > 0) {
+                               $pages = $pages . ',' . implode(',', $list);
+                       }
+                       $frameworkConfiguration = t3lib_div::array_merge_recursive_overrule($frameworkConfiguration, array(
+                               'persistence' => array(
+                                       'storagePid' => $pages
+                               )
+                       ));
+               }
+               return $frameworkConfiguration;
+       }
+
+       /**
+        * Overrides configuration settings from the plugin typoscript (plugin.tx_myext_pi1.)
+        *
+        * @param array the framework configuration
+        * @return array the framework configuration with overridden data from typoscript
+        */
+       protected function overrideConfigurationFromPlugin(array $frameworkConfiguration) {
+               $setup = $this->loadTypoScriptSetup();
+               $pluginConfiguration =  $setup['plugin.']['tx_' . strtolower($frameworkConfiguration['extensionName'] . '_' . $frameworkConfiguration['pluginName']) . '.'];
+               if (is_array($pluginConfiguration)) {
+                       $pluginConfiguration = Tx_Extbase_Utility_TypoScript::convertTypoScriptArrayToPlainArray($pluginConfiguration);
+                       $frameworkConfiguration = $this->mergeConfigurationIntoFrameworkConfiguration($frameworkConfiguration, $pluginConfiguration, 'settings');
+                       $frameworkConfiguration = $this->mergeConfigurationIntoFrameworkConfiguration($frameworkConfiguration, $pluginConfiguration, 'persistence');
+                       $frameworkConfiguration = $this->mergeConfigurationIntoFrameworkConfiguration($frameworkConfiguration, $pluginConfiguration, 'view');
+               }
+               return $frameworkConfiguration;
+       }
+
+       /**
+        * Overrides configuration settings from flexforms.
+        * This merges the whole flexform data, and overrides switchable controller actions.
+        *
+        * @param array the framework configuration
+        * @return array the framework configuration with overridden data from flexform
+        */
+       protected function overrideConfigurationFromFlexform(array $frameworkConfiguration) {
+               if (strlen($this->contentObject->data['pi_flexform']) > 0) {
+                       $flexformConfiguration = $this->convertFlexformContentToArray($this->contentObject->data['pi_flexform']);
+
+                       $frameworkConfiguration = $this->mergeConfigurationIntoFrameworkConfiguration($frameworkConfiguration, $flexformConfiguration, 'settings');
+                       $frameworkConfiguration = $this->mergeConfigurationIntoFrameworkConfiguration($frameworkConfiguration, $flexformConfiguration, 'persistence');
+                       $frameworkConfiguration = $this->mergeConfigurationIntoFrameworkConfiguration($frameworkConfiguration, $flexformConfiguration, 'view');
+
+                       $frameworkConfiguration = $this->overrideSwitchableControllerActionsFromFlexform($frameworkConfiguration, $flexformConfiguration);
+               }
+               return $frameworkConfiguration;
+       }
+
+       /**
+        * Parses the FlexForm content recursivly and converts it to an array
+        * The resulting array will be multi-dimensional, as a value "bla.blubb"
+        * results in two levels, and a value "bla.blubb.bla" results in three levels.
+        *
+        * Note: multi-language FlexForms are not supported yet
+        *
+        * @param string $flexFormContent FlexForm xml string
+        * @return array the processed array
+        */
+       protected function convertFlexformContentToArray($flexFormContent) {
+               $settings = array();
+               $languagePointer = 'lDEF';
+               $valuePointer = 'vDEF';
+
+               $flexFormArray = t3lib_div::xml2array($flexFormContent);
+               $flexFormArray = isset($flexFormArray['data']) ? $flexFormArray['data'] : array();
+               foreach(array_values($flexFormArray) as $languages) {
+                       if (!is_array($languages[$languagePointer])) {
+                               continue;
+                       }
+                       foreach($languages[$languagePointer] as $valueKey => $valueDefinition) {
+                               if (strpos($valueKey, '.') === false) {
+                                       $settings[$valueKey] = $valueDefinition[$valuePointer];
+                               } else {
+                                       $valueKeyParts = explode('.', $valueKey);
+                                       $currentNode =& $settings;
+                                       foreach ($valueKeyParts as $valueKeyPart) {
+                                               $currentNode =& $currentNode[$valueKeyPart];
+                                       }
+                                       $currentNode = $valueDefinition[$valuePointer];
+                               }
+                       }
+               }
+               return $settings;
+       }
+
+       /**
+        * Merge a configuration into the framework configuration.
+        *
+        * @param array $frameworkConfiguration the framework configuration to merge the data on
+        * @param array $configuration The configuration
+        * @param string $configurationPartName The name of the configuration part which should be merged.
+        * @return array the processed framework configuration
+        */
+       protected function mergeConfigurationIntoFrameworkConfiguration($frameworkConfiguration, $configuration, $configurationPartName) {
+               if (is_array($frameworkConfiguration[$configurationPartName]) && is_array($configuration[$configurationPartName])) {
+                       $frameworkConfiguration[$configurationPartName] = t3lib_div::array_merge_recursive_overrule($frameworkConfiguration[$configurationPartName], $configuration[$configurationPartName]);
+               }
+               return $frameworkConfiguration;
+       }
+
+
+       /**
+        * Overrides the switchable controller actions from the flexform.
+        *
+        * @param $frameworkConfiguration The original framework configuration
+        * @param $flexformConfiguration The full flexform configuration
+        * @return array the modified framework configuration, if needed
+        * @todo: Check that the controller has been before inside the switchableControllerActions.
+        */
+       protected function overrideSwitchableControllerActionsFromFlexform($frameworkConfiguration, $flexformConfiguration) {
+               if (isset($flexformConfiguration['switchableControllerActions']) && !is_array($flexformConfiguration['switchableControllerActions'])) {
+
+                       // As "," is the flexform field value delimiter, we need to use ";" as in-field delimiter. That's why we need to replace ; by  , first.
+                       $switchableControllerActionPartsFromFlexform = t3lib_div::trimExplode(',', str_replace(';', ',', $flexformConfiguration['switchableControllerActions']));
+
+                       $newSwitchableControllerActionsFromFlexform = array();
+                       foreach ($switchableControllerActionPartsFromFlexform as $switchableControllerActionPartFromFlexform) {
+                               list($controller, $action) = explode('->', $switchableControllerActionPartFromFlexform);
+                               if (empty($controller) || empty($action)) {
+                                       throw new Tx_Extbase_Configuration_Exception_ParseError('Controller or action were empty when overriding switchableControllerActions from flexform.', 1257146403);
+                               }
+
+                               $newSwitchableControllerActionsFromFlexform[$controller][] = $action;
+                       }
+
+                       if (count($newSwitchableControllerActionsFromFlexform)) {
+                               $frameworkConfiguration['switchableControllerActions'] = array();
+                               foreach ($newSwitchableControllerActionsFromFlexform as $controller => $actions) {
+                                       $frameworkConfiguration['switchableControllerActions'][] = array(
+                                               'controller' => $controller,
+                                               'actions' => implode(',', $actions)
+                                       );
+                               }
+
+                               // We want the first controller/action be the default.
+                               unset($frameworkConfiguration['controller']);
+                               unset($frameworkConfiguration['action']);
+                       }
+               }
+               return $frameworkConfiguration;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Dispatcher.php b/typo3/sysext/extbase/Classes/Dispatcher.php
new file mode 100644 (file)
index 0000000..cfc721d
--- /dev/null
@@ -0,0 +1,547 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * Creates a request an dispatches it to the controller which was specified
+ * by TS Setup, Flexform and returns the content to the v4 framework.
+ *
+ * This class is the main entry point for extbase extensions.
+ *
+ * @package Extbase
+ * @version $ID:$
+ */
+class Tx_Extbase_Dispatcher {
+
+       /**
+        * Back reference to the parent content object
+        * This has to be public as it is set directly from TYPO3
+        *
+        * @var tslib_cObj
+        */
+       public $cObj;
+
+       /**
+        * @var Tx_Extbase_Utility_ClassLoader
+        */
+       protected $classLoader;
+
+       /**
+        * @var Tx_Extbase_Configuration_AbstractConfigurationManager
+        */
+       protected static $configurationManager;
+
+       /**
+        * @var t3lib_cache_Manager
+        */
+       protected $cacheManager;
+
+       /**
+        * @var Tx_Extbase_Reflection_Service
+        */
+       protected static $reflectionService;
+
+       /**
+        * @var Tx_Extbase_Persistence_Manager
+        */
+       protected static $persistenceManager;
+
+       /**
+        * The configuration for the Extbase framework
+        * @var array
+        */
+       protected static $extbaseFrameworkConfiguration;
+
+
+       /**
+        * Constructs this Dispatcher and registers the autoloader
+        */
+       public function __construct() {
+               t3lib_cache::initializeCachingFramework();
+               $this->initializeClassLoader();
+               $this->initializeCache();
+               $this->initializeReflection();
+       }
+
+       /**
+        * Creates a request an dispatches it to a controller.
+        *
+        * @param string $content The content
+        * @param array $configuration The TS configuration array
+        * @return string $content The processed content
+        */
+       public function dispatch($content, $configuration) {
+               // FIXME Remove the next lines. These are only there to generate the ext_autoload.php file
+               //$extutil = new Tx_Extbase_Utility_Extension;
+               //$extutil->createAutoloadRegistryForExtension('extbase', t3lib_extMgm::extPath('extbase'));
+               //$extutil->createAutoloadRegistryForExtension('fluid', t3lib_extMgm::extPath('fluid'));
+
+               $this->timeTrackPush('Extbase is called.','');
+               $this->timeTrackPush('Extbase gets initialized.','');
+
+               if (!is_array($configuration)) {
+                       t3lib_div::sysLog('Extbase was not able to dispatch the request. No configuration.', 'extbase', t3lib_div::SYSLOG_SEVERITY_ERROR);
+                       return $content;
+               }
+               
+               $this->initializeConfigurationManagerAndFrameworkConfiguration($configuration);
+
+               $requestBuilder = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_RequestBuilder');
+               $request = $requestBuilder->initialize(self::$extbaseFrameworkConfiguration);
+               $request = $requestBuilder->build();
+               if (isset($this->cObj->data) && is_array($this->cObj->data)) {
+                       // we need to check the above conditions as cObj is not available in Backend.
+                       $request->setContentObjectData($this->cObj->data);
+               }
+               $response = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Response');
+
+               // Request hash service
+               $requestHashService = t3lib_div::makeInstance('Tx_Extbase_Security_Channel_RequestHashService'); // singleton
+               $requestHashService->verifyRequest($request);
+
+               $persistenceManager = self::getPersistenceManager();
+
+               $this->timeTrackPull();
+
+               $this->timeTrackPush('Extbase dispatches request.','');
+               $dispatchLoopCount = 0;
+               while (!$request->isDispatched()) {
+                       if ($dispatchLoopCount++ > 99) throw new Tx_Extbase_MVC_Exception_InfiniteLoop('Could not ultimately dispatch the request after '  . $dispatchLoopCount . ' iterations.', 1217839467);
+                       $controller = $this->getPreparedController($request);
+                       try {
+                               $controller->processRequest($request, $response);
+                       } catch (Tx_Extbase_MVC_Exception_StopAction $ignoredException) {
+                       }
+               }
+               $this->timeTrackPull();
+
+               $this->timeTrackPush('Extbase persists all changes.','');
+               $flashMessages = t3lib_div::makeInstance('Tx_Extbase_MVC_Controller_FlashMessages'); // singleton
+               $flashMessages->persist();
+               $persistenceManager->persistAll();
+               $this->timeTrackPull();
+
+               self::$reflectionService->shutdown();
+               
+               if (substr($response->getStatus(), 0, 3) === '303') {
+                       $response->sendHeaders();
+                       exit;
+               }
+
+               if (count($response->getAdditionalHeaderData()) > 0) {
+                       $GLOBALS['TSFE']->additionalHeaderData[$request->getControllerExtensionName()] = implode("\n", $response->getAdditionalHeaderData());
+               }
+               $this->timeTrackPull();
+               return $response->getContent();
+       }
+
+       /**
+        * Initializes the autoload mechanism of Extbase. This is supplement to the core autoloader.
+        *
+        * @return void
+        */
+       protected function initializeClassLoader() {
+               if (!class_exists('Tx_Extbase_Utility_ClassLoader')) {
+                       require(t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php');
+               }
+
+               $classLoader = new Tx_Extbase_Utility_ClassLoader();
+               spl_autoload_register(array($classLoader, 'loadClass'));
+       }
+
+       /**
+        * Initializes the configuration manager and the Extbase settings
+        *
+        * @param $configuration The current incoming configuration
+        * @return void
+        */
+       protected function initializeConfigurationManagerAndFrameworkConfiguration($configuration) {
+               if (TYPO3_MODE === 'FE') {
+                       self::$configurationManager = t3lib_div::makeInstance('Tx_Extbase_Configuration_FrontendConfigurationManager');
+                       self::$configurationManager->setContentObject($this->cObj);
+               } else {
+                       self::$configurationManager = t3lib_div::makeInstance('Tx_Extbase_Configuration_BackendConfigurationManager');
+               }
+               self::$extbaseFrameworkConfiguration = self::$configurationManager->getFrameworkConfiguration($configuration);
+       }
+
+       /**
+        * Initializes the cache framework
+        *
+        * @return void
+        */
+       protected function initializeCache() {
+               $this->cacheManager = $GLOBALS['typo3CacheManager'];
+               try {
+                       $this->cacheManager->getCache('cache_extbase_reflection');
+               } catch (t3lib_cache_exception_NoSuchCache $exception) {
+                       $GLOBALS['typo3CacheFactory']->create(
+                               'cache_extbase_reflection',
+                               't3lib_cache_frontend_VariableFrontend',
+                               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_extbase_reflection']['backend'],
+                               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_extbase_reflection']['options']
+                       );
+               }
+       }
+
+       /**
+        * Initializes the Reflection Service
+        *
+        * @return void
+        */
+       protected function initializeReflection() {
+               self::$reflectionService = t3lib_div::makeInstance('Tx_Extbase_Reflection_Service');
+               self::$reflectionService->setCache($this->cacheManager->getCache('cache_extbase_reflection'));
+               if (!self::$reflectionService->isInitialized()) {
+                       self::$reflectionService->initialize();
+               }
+       }
+
+       /**
+        * Builds and returns a controller
+        *
+        * @param Tx_Extbase_MVC_Web_Request $request
+        * @return Tx_Extbase_MVC_Controller_ControllerInterface The prepared controller
+        */
+       protected function getPreparedController(Tx_Extbase_MVC_Web_Request $request) {
+               $controllerObjectName = $request->getControllerObjectName();
+               $controller = t3lib_div::makeInstance($controllerObjectName);
+               if (!$controller instanceof Tx_Extbase_MVC_Controller_ControllerInterface) {
+                       throw new Tx_Extbase_MVC_Exception_InvalidController('Invalid controller "' . $request->getControllerObjectName() . '". The controller must implement the Tx_Extbase_MVC_Controller_ControllerInterface.', 1202921619);
+               }
+               $propertyMapper = t3lib_div::makeInstance('Tx_Extbase_Property_Mapper');
+               $propertyMapper->injectReflectionService(self::$reflectionService);
+               $controller->injectPropertyMapper($propertyMapper);
+               
+               $controller->injectSettings(is_array(self::$extbaseFrameworkConfiguration['settings']) ? self::$extbaseFrameworkConfiguration['settings'] : array());
+
+               $flashMessageContainer = t3lib_div::makeInstance('Tx_Extbase_MVC_Controller_FlashMessages'); // singleton
+               $flashMessageContainer->reset();
+               $controller->injectFlashMessageContainer($flashMessageContainer);
+
+               $objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_Manager');
+               $validatorResolver = t3lib_div::makeInstance('Tx_Extbase_Validation_ValidatorResolver');
+               $validatorResolver->injectObjectManager($objectManager);
+               $validatorResolver->injectReflectionService(self::$reflectionService);
+               $controller->injectValidatorResolver($validatorResolver);
+               $controller->injectReflectionService(self::$reflectionService);
+               $controller->injectObjectManager($objectManager);
+               return $controller;
+       }
+
+       /**
+        * This function prepares and returns the Persistance Manager
+        *
+        * @return Tx_Extbase_Persistence_Manager A (singleton) instance of the Persistence Manager
+        */
+       public static function getPersistenceManager() {
+               if (self::$persistenceManager === NULL) {
+                       $identityMap = t3lib_div::makeInstance('Tx_Extbase_Persistence_IdentityMap');
+                       $persistenceSession = t3lib_div::makeInstance('Tx_Extbase_Persistence_Session'); // singleton
+
+                       $dataMapper = t3lib_div::makeInstance('Tx_Extbase_Persistence_Mapper_DataMapper'); // singleton
+                       $dataMapper->injectIdentityMap($identityMap);
+                       $dataMapper->injectSession($persistenceSession);
+                       $dataMapper->injectReflectionService(self::$reflectionService);
+                       $dataMapper->injectDataMapFactory(t3lib_div::makeInstance('Tx_Extbase_Persistence_Mapper_DataMapFactory'));
+                       
+                       
+                       $storageBackend = t3lib_div::makeInstance('Tx_Extbase_Persistence_Storage_Typo3DbBackend', $GLOBALS['TYPO3_DB']); // singleton
+                       $storageBackend->injectDataMapper($dataMapper);
+
+                       $qomFactory = t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_QueryObjectModelFactory', $storageBackend);
+                       
+                       $dataMapper->setQomFactory($qomFactory);
+
+                       $persistenceBackend = t3lib_div::makeInstance('Tx_Extbase_Persistence_Backend', $persistenceSession, $storageBackend); // singleton
+                       $persistenceBackend->injectDataMapper($dataMapper);
+                       $persistenceBackend->injectIdentityMap($identityMap);
+                       $persistenceBackend->injectReflectionService(self::$reflectionService);
+                       $persistenceBackend->injectQueryFactory(t3lib_div::makeInstance('Tx_Extbase_Persistence_QueryFactory'));
+                       $persistenceBackend->injectQomFactory($qomFactory);
+
+                       $objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_Manager'); // singleton
+
+                       $persistenceManager = t3lib_div::makeInstance('Tx_Extbase_Persistence_Manager'); // singleton
+                       $persistenceManager->injectBackend($persistenceBackend);
+                       $persistenceManager->injectSession($persistenceSession);
+                       $persistenceManager->injectObjectManager($objectManager);
+
+                       self::$persistenceManager = $persistenceManager;
+               }
+
+               return self::$persistenceManager;
+       }
+
+       /**
+        * This function returns the Configuration Manager. It is instanciated for
+        * each call to dispatch() only once.
+        *
+        * @return Tx_Extbase_Configuration_Manager An instance of the Configuration Manager
+        */
+       public static function getConfigurationManager() {
+               return self::$configurationManager;
+       }
+
+       /**
+        * This function returns the settings of Extbase
+        *
+        * @return array The settings
+        */
+       public static function getExtbaseFrameworkConfiguration() {
+               return self::$extbaseFrameworkConfiguration;
+       }
+
+       /**
+        * Calls an Extbase Backend module.
+        *
+        * @param string $module The name of the module
+        * @return void
+        */
+       public function callModule($module) {
+               if (isset($GLOBALS['TBE_MODULES'][$module])) {
+                       $config = $GLOBALS['TBE_MODULES'][$module];
+
+                       // Check permissions and exit if the user has no permission for entry
+                       $GLOBALS['BE_USER']->modAccess($config, TRUE);
+                       if (t3lib_div::_GP('id')) {
+                               // Check page access
+                               $id = t3lib_div::_GP('id');
+                               $permClause = $GLOBALS['BE_USER']->getPagePermsClause(TRUE);
+                               $access = is_array(t3lib_BEfunc::readPageAccess($id, $permClause));
+                               if (!$access) {
+                                       t3lib_BEfunc::typo3PrintError('No Access', 'You don\'t have access to this page', 0);
+                               }
+                       }
+
+                       // Resolve the controller/action to use
+                       $controllerAction = $this->resolveControllerAction($module);
+
+                       // As for SCbase modules, output of the controller/action pair should be echoed
+                       echo $this->transfer($module, $controllerAction['controllerName'], $controllerAction['actionName']);
+                       return TRUE;
+               } else {
+                       return FALSE;
+               }
+       }
+
+       /**
+        * Resolves the controller and action to use for current call.
+        * This takes into account any function menu that has being called.
+        *
+        * @param string $module The name of the module
+        * @return array The controller/action pair to use for current call
+        */
+       protected function resolveControllerAction($module) {
+               $configuration = $GLOBALS['TBE_MODULES'][$module];
+               $fallbackControllerAction = $this->getFallbackControllerAction($configuration);
+
+                       // Extract dispatcher settings from request
+               $argumentPrefix = strtolower('tx_' . $configuration['extensionName'] . '_' . $configuration['name']);
+               $dispatcherParameters = t3lib_div::_GPmerged($argumentPrefix);
+               $dispatcherControllerAction = $this->getDispatcherControllerAction($configuration, $dispatcherParameters);
+
+                       // Extract module function settings from request
+               $moduleFunctionControllerAction = $this->getModuleFunctionControllerAction($module, $fallbackControllerAction['controllerName']);
+
+                       // Dispatcher controller/action has precedence over default controller/action
+               $controllerAction = t3lib_div::array_merge_recursive_overrule($fallbackControllerAction, $dispatcherControllerAction, FALSE, FALSE);
+                       // Module function controller/action has precedence
+               $controllerAction = t3lib_div::array_merge_recursive_overrule($controllerAction, $moduleFunctionControllerAction, FALSE, FALSE);
+
+               return $controllerAction;
+       }
+
+       /**
+        * Returns the fallback controller/action pair to be used when request does not contain
+        * any controller/action to be used or the provided parameters are not valid.
+        *
+        * @param array $configuration The module configuration
+        * @return array The controller/action pair
+        */
+       protected function getFallbackControllerAction($configuration) {
+                       // Extract module settings from its registration in ext_tables.php
+               $controllers = array_keys($configuration['controllerActions']);
+               $defaultController = array_shift($controllers);
+               $actions = t3lib_div::trimExplode(',', $configuration['controllerActions'][$defaultController], TRUE);
+               $defaultAction = $actions[0];
+
+               return array(
+                       'controllerName' => $defaultController,
+                       'actionName' => $defaultAction,
+               );
+       }
+
+       /**
+        * Returns the controller/action pair that was specified by the request if it is valid,
+        * otherwise, will just return a blank controller/action pair meaning the default
+        * controller/action should be used instead.
+        *
+        * @param array $configuration The module configuration
+        * @param array $dispatcherParameters The dispatcher parameters
+        * @return array The controller/action pair
+        */
+       protected function getDispatcherControllerAction($configuration, $dispatcherParameters) {
+               $controllerAction = array(
+                       'controllerName' => '',
+                       'actionName' => '',
+               );
+
+               if (!isset($dispatcherParameters['controllerName'])) {
+                               // Early return: should use fallback controller/action
+                       return $controllerAction;
+               }
+
+                       // Extract configured controllers from module's registration in ext_tables.php
+               $controllers = array_keys($configuration['controllerActions']);
+
+               $controller = $dispatcherParameters['controllerName'];
+               if (in_array($controller, $controllers)) {
+                               // Update return value as selected controller is valid
+                       $controllerAction['controllerName'] = $controller;
+                       $actions = t3lib_div::trimExplode(',', $configuration['controllerActions'][$controller], TRUE);
+                       if (isset($dispatcherParameters['actionName'])) {
+                                       // Extract configured actions for selected controllers
+                               $action = $dispatcherParameters['actionName'];
+                               if (in_array($action, $actions)) {
+                                               // Requested action is valid for selected controller
+                                       $controllerAction['actionName'] = $action;
+                               } else {
+                                               // Use first action of selected controller as fallback action
+                                       $controllerAction['actionName'] = $actions[0];
+                               }
+                       } else {
+                                       // Use first action of selected controller as fallback action
+                               $controllerAction['actionName'] = $actions[0];
+                       }
+               }
+
+               return $controllerAction;
+       }
+
+       /**
+        * Returns the controller/action pair to use if a module function parameter is found
+        * in the request, otherwise, will just return a blank controller/action pair.
+        *
+        * @param string $module The name of the module
+        * @param string $defaultController The module's default controller
+        * @return array The controller/action pair
+        */
+       protected function getModuleFunctionControllerAction($module, $defaultController) {
+               $controllerAction = array(
+                       'controllerName' => '',
+                       'actionName' => '',
+               );
+
+               $set = t3lib_div::_GP('SET');
+               if (!$set) {
+                               // Early return
+                       return $controllerAction;
+               }
+
+               $moduleFunction = $set['function'];
+               $matches = array();
+               if (preg_match('/^(.*)->(.*)$/', $moduleFunction, $matches)) {
+                       $controllerAction['controllerName'] = $matches[1];
+                       $controllerAction['actionName'] = $matches[2];
+               } else {
+                               // Support for external SCbase module function rendering
+                       $functions = $GLOBALS['TBE_MODULES_EXT'][$module]['MOD_MENU']['function'];
+                       if (isset($functions[$moduleFunction])) {
+                               $controllerAction['controllerName'] = $defaultController;
+                               $controllerAction['actionName'] = 'extObj';
+                       }
+               }
+
+               return $controllerAction;
+       }
+
+       /**
+        * Transfers the request to an Extbase backend module, calling
+        * a given controller/action.
+        *
+        * @param string $module The name of the module
+        * @param string $controller The controller to use
+        * @param string $action The controller's action to execute
+        * @return string The module rendered view
+        */
+       protected function transfer($module, $controller, $action) {
+               $config = $GLOBALS['TBE_MODULES'][$module];
+
+               $extbaseConfiguration = array(
+                       'userFunc' => 'tx_extbase_dispatcher->dispatch',
+                       'pluginName' => $module,
+                       'extensionName' => $config['extensionName'],
+                       'controller' => $controller,
+                       'action' => $action,
+                       'switchableControllerActions.' => array(),
+                       'settings' => '< module.tx_' . strtolower($config['extensionName']) . '.settings',
+                       'persistence' => '< module.tx_' . strtolower($config['extensionName']) . '.persistence',
+                       'view' => '< module.tx_' . strtolower($config['extensionName']) . '.view',
+               );
+
+               $i = 1;
+               foreach ($config['controllerActions'] as $controller => $actions) {
+                               // Add an "extObj" action for the default controller to handle external
+                               // SCbase modules which add function menu entries
+                       if ($i == 1) {
+                               $actions .= ',extObj';
+                       }
+                       $extbaseConfiguration['switchableControllerActions.'][$i++ . '.'] = array(
+                               'controller' => $controller,
+                               'actions' => $actions,
+                       );
+               }
+
+                       // BACK_PATH is the path from the typo3/ directory from within the
+                       // directory containing the controller file. We are using mod.php dispatcher
+                       // and thus we are already within typo3/ because we call typo3/mod.php
+               $GLOBALS['BACK_PATH'] = '';
+               return $this->dispatch('', $extbaseConfiguration);
+       }
+
+       /**
+        * Push some information to time tracking if in Frontend
+        *
+        * @param string $name
+        * @todo correct variable names
+        * @return void
+        */
+       protected function timeTrackPush($name, $param2) {
+               if (isset($GLOBALS['TT'])) {
+                       $GLOBALS['TT']->push($name, $param2);
+               }
+       }
+
+       /**
+        * Time track pull
+        * @todo complete documentation of this method.
+        */
+       protected function timeTrackPull() {
+               if (isset($GLOBALS['TT'])) {
+                       $GLOBALS['TT']->pull();
+               }
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Domain/Model/FrontendUser.php b/typo3/sysext/extbase/Classes/Domain/Model/FrontendUser.php
new file mode 100644 (file)
index 0000000..3266f22
--- /dev/null
@@ -0,0 +1,619 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * A Frontend User
+ *
+ * @package Extbase
+ * @subpackage Domain\Model
+ * @version $Id: FrontendUser.php 1949 2010-03-04 06:40:56Z jocrau $
+ * @scope prototype
+ * @entity
+ * @api
+ */
+class Tx_Extbase_Domain_Model_FrontendUser extends Tx_Extbase_DomainObject_AbstractEntity {
+
+       /**
+        * @var string
+        */
+       protected $username;
+
+       /**
+        * @var string
+        */
+       protected $password;
+
+       /**
+        * @var Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup>
+        */
+       protected $usergroup;
+
+       /**
+        * @var string
+        */
+       protected $name;
+
+       /**
+        * @var string
+        */
+       protected $firstName;
+
+       /**
+        * @var string
+        */
+       protected $middleName;
+
+       /**
+        * @var string
+        */
+       protected $lastName;
+
+       /**
+        * @var string
+        */
+       protected $address = '';
+
+       /**
+        * @var string
+        */
+       protected $telephone = '';
+
+       /**
+        * @var string
+        */
+       protected $fax = '';
+
+       /**
+        * @var string
+        */
+       protected $email = '';
+
+       /**
+        * @var string
+        */
+       protected $lockToDomain = '';
+
+       /**
+        * @var string
+        */
+       protected $title = '';
+
+       /**
+        * @var string
+        */
+       protected $zip = '';
+
+       /**
+        * @var string
+        */
+       protected $city = '';
+
+       /**
+        * @var string
+        */
+       protected $country = '';
+
+       /**
+        * @var string
+        */
+       protected $www = '';
+
+       /**
+        * @var string
+        */
+       protected $company = '';
+
+       /**
+        * @var string
+        */
+       protected $image = '';
+
+       /**
+        * @var DateTime
+        */
+       protected $lastlogin = '';
+
+       /**
+        * @var DateTime
+        */
+       protected $isOnline = '';
+
+       /**
+        * Constructs a new Front-End User
+        *
+        * @api
+        */
+       public function __construct($username = '', $password = '') {
+               $this->username = $username;
+               $this->password = $password;
+               $this->usergroup = new Tx_Extbase_Persistence_ObjectStorage();
+       }
+
+       /**
+        * Sets the username value
+        *
+        * @param string $username
+        * @return void
+        * @api
+        */
+       public function setUsername($username) {
+               $this->username = $username;
+       }
+
+       /**
+        * Returns the username value
+        *
+        * @return string
+        * @api
+        */
+       public function getUsername() {
+               return $this->username;
+       }
+
+       /**
+        * Sets the password value
+        *
+        * @param string $password
+        * @return void
+        * @api
+        */
+       public function setPassword($password) {
+               $this->password = $password;
+       }
+
+       /**
+        * Returns the password value
+        *
+        * @return string
+        * @api
+        */
+       public function getPassword() {
+               return $this->password;
+       }
+
+       /**
+        * Sets the usergroups. Keep in mind that the property is called "usergroup"
+        * although it can hold several usergroups.
+        *
+        * @param Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup> $usergroup An object storage containing the usergroups to add
+        * @return void
+        * @api
+        */
+       public function setUsergroup(Tx_Extbase_Persistence_ObjectStorage $usergroup) {
+               $this->usergroup = $usergroup;
+       }
+
+       /**
+        * Adds a usergroup to the frontend user
+        *
+        * @param Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup
+        * @return void
+        * @api
+        */
+       public function addUsergroup(Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup) {
+               $this->usergroup->attach($usergroup);
+       }
+
+       /**
+        * Removes a usergroup from the frontend user
+        *
+        * @param Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup
+        * @return void
+        * @api
+        */
+       public function removeUsergroup(Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup) {
+               $this->usergroup->detach($usergroup);
+       }
+
+       /**
+        * Returns the usergroups. Keep in mind that the property is called "usergroup"
+        * although it can hold several usergroups.
+        *
+        * @return Tx_Extbase_Persistence_ObjectStorage An object storage containing the usergroup
+        * @api
+        */
+       public function getUsergroups() {
+               return $this->usergroup;
+       }
+
+       /**
+        * Sets the name value
+        *
+        * @param string $name
+        * @return void
+        * @api
+        */
+       public function setName($name) {
+               $this->name = $name;
+       }
+
+       /**
+        * Returns the name value
+        *
+        * @return string
+        * @api
+        */
+       public function getName() {
+               return $this->name;
+       }
+
+       /**
+        * Sets the firstName value
+        *
+        * @param string $firstName
+        * @return void
+        * @api
+        */
+       public function setFirstName($firstName) {
+               $this->firstName = $firstName;
+       }
+
+       /**
+        * Returns the firstName value
+        *
+        * @return string
+        * @api
+        */
+       public function getFirstName() {
+               return $this->firstName;
+       }
+
+       /**
+        * Sets the middleName value
+        *
+        * @param string $middleName
+        * @return void
+        * @api
+        */
+       public function setMiddleName($middleName) {
+               $this->middleName = $middleName;
+       }
+
+       /**
+        * Returns the middleName value
+        *
+        * @return string
+        * @api
+        */
+       public function getMiddleName() {
+               return $this->middleName;
+       }
+
+       /**
+        * Sets the lastName value
+        *
+        * @param string $lastName
+        * @return void
+        * @api
+        */
+       public function setLastName($lastName) {
+               $this->lastName = $lastName;
+       }
+
+       /**
+        * Returns the lastName value
+        *
+        * @return string
+        * @api
+        */
+       public function getLastName() {
+               return $this->lastName;
+       }
+
+       /**
+        * Sets the address value
+        *
+        * @param string $address
+        * @return void
+        * @api
+        */
+       public function setAddress($address) {
+               $this->address = $address;
+       }
+
+       /**
+        * Returns the address value
+        *
+        * @return string
+        * @api
+        */
+       public function getAddress() {
+               return $this->address;
+       }
+
+       /**
+        * Sets the telephone value
+        *
+        * @param string $telephone
+        * @return void
+        * @api
+        */
+       public function setTelephone($telephone) {
+               $this->telephone = $telephone;
+       }
+
+       /**
+        * Returns the telephone value
+        *
+        * @return string
+        * @api
+        */
+       public function getTelephone() {
+               return $this->telephone;
+       }
+
+       /**
+        * Sets the fax value
+        *
+        * @param string $fax
+        * @return void
+        * @api
+        */
+       public function setFax($fax) {
+               $this->fax = $fax;
+       }
+
+       /**
+        * Returns the fax value
+        *
+        * @return string
+        * @api
+        */
+       public function getFax() {
+               return $this->fax;
+       }
+
+       /**
+        * Sets the email value
+        *
+        * @param string $email
+        * @return void
+        * @api
+        */
+       public function setEmail($email) {
+               $this->email = $email;
+       }
+
+       /**
+        * Returns the email value
+        *
+        * @return string
+        * @api
+        */
+       public function getEmail() {
+               return $this->email;
+       }
+
+       /**
+        * Sets the lockToDomain value
+        *
+        * @param string $lockToDomain
+        * @return void
+        * @api
+        */
+       public function setLockToDomain($lockToDomain) {
+               $this->lockToDomain = $lockToDomain;
+       }
+
+       /**
+        * Returns the lockToDomain value
+        *
+        * @return string
+        * @api
+        */
+       public function getLockToDomain() {
+               return $this->lockToDomain;
+       }
+
+       /**
+        * Sets the title value
+        *
+        * @param string $title
+        * @return void
+        * @api
+        */
+       public function setTitle($title) {
+               $this->title = $title;
+       }
+
+       /**
+        * Returns the title value
+        *
+        * @return string
+        * @api
+        */
+       public function getTitle() {
+               return $this->title;
+       }
+
+       /**
+        * Sets the zip value
+        *
+        * @param string $zip
+        * @return void
+        * @api
+        */
+       public function setZip($zip) {
+               $this->zip = $zip;
+       }
+
+       /**
+        * Returns the zip value
+        *
+        * @return string
+        * @api
+        */
+       public function getZip() {
+               return $this->zip;
+       }
+
+       /**
+        * Sets the city value
+        *
+        * @param string $city
+        * @return void
+        * @api
+        */
+       public function setCity($city) {
+               $this->city = $city;
+       }
+
+       /**
+        * Returns the city value
+        *
+        * @return string
+        * @api
+        */
+       public function getCity() {
+               return $this->city;
+       }
+
+       /**
+        * Sets the country value
+        *
+        * @param string $country
+        * @return void
+        * @api
+        */
+       public function setCountry($country) {
+               $this->country = $country;
+       }
+
+       /**
+        * Returns the country value
+        *
+        * @return string
+        * @api
+        */
+       public function getCountry() {
+               return $this->country;
+       }
+
+       /**
+        * Sets the www value
+        *
+        * @param string $www
+        * @return void
+        * @api
+        */
+       public function setWww($www) {
+               $this->www = $www;
+       }
+
+       /**
+        * Returns the www value
+        *
+        * @return string
+        * @api
+        */
+       public function getWww() {
+               return $this->www;
+       }
+
+       /**
+        * Sets the company value
+        *
+        * @param string $company
+        * @return void
+        * @api
+        */
+       public function setCompany($company) {
+               $this->company = $company;
+       }
+
+       /**
+        * Returns the company value
+        *
+        * @return string
+        * @api
+        */
+       public function getCompany() {
+               return $this->company;
+       }
+
+       /**
+        * Sets the image value
+        *
+        * @param string $image
+        * @return void
+        * @api
+        */
+       public function setImage($image) {
+               $this->image = $image;
+       }
+
+       /**
+        * Returns the image value
+        *
+        * @return string
+        * @api
+        */
+       public function getImage() {
+               return $this->image;
+       }
+
+       /**
+        * Sets the lastLogin value
+        *
+        * @param DateTime $lastLogin
+        * @return void
+        * @api
+        */
+       public function setLastLogin(DateTime $lastLogin) {
+               $this->lastLogin = $lastLogin;
+       }
+
+       /**
+        * Returns the lastLogin value
+        *
+        * @return DateTime
+        * @api
+        */
+       public function getLastLogin() {
+               return $this->lastLogin;
+       }
+
+       /**
+        * Sets the isOnline value
+        *
+        * @param DateTime $isOnline
+        * @return void
+        * @api
+        */
+       public function setIsOnline($isOnline) {
+               $this->isOnline = $isOnline;
+       }
+
+       /**
+        * Returns the isOnline value
+        *
+        * @return DateTime
+        * @api
+        */
+       public function getIsOnline() {
+               return $this->isOnline;
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Domain/Model/FrontendUserGroup.php b/typo3/sysext/extbase/Classes/Domain/Model/FrontendUserGroup.php
new file mode 100644 (file)
index 0000000..a24b1f6
--- /dev/null
@@ -0,0 +1,175 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * A Frontend User Group
+ *
+ * @package Extbase
+ * @subpackage Domain\Model
+ * @version $Id: FrontendUserGroup.php 2143 2010-03-30 09:28:26Z jocrau $
+ * @scope prototype
+ * @entity
+ * @api
+ */
+class Tx_Extbase_Domain_Model_FrontendUserGroup extends Tx_Extbase_DomainObject_AbstractEntity {
+
+       /**
+        * @var string
+        */
+       protected $title;
+
+       /**
+        * @var string
+        */
+       protected $lockToDomain;
+
+       /**
+        * @var string
+        */
+       protected $description;
+
+       /**
+        * @var Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup>
+        */
+       protected $subgroup;
+
+       /**
+        * Constructs a new Frontend User Group
+        *
+        */
+       public function __construct($title) {
+               $this->setTitle($title);
+               $this->subgroup = new Tx_Extbase_Persistence_ObjectStorage();
+       }
+
+       /**
+        * Sets the title value
+        *
+        * @param string $title
+        * @return void
+        * @api
+        */
+       public function setTitle($title) {
+               $this->title = $title;
+       }
+
+       /**
+        * Returns the title value
+        *
+        * @return string
+        * @api
+        */
+       public function getTitle() {
+               return $this->title;
+       }
+
+       /**
+        * Sets the lockToDomain value
+        *
+        * @param string $lockToDomain
+        * @return void
+        * @api
+        */
+       public function setLockToDomain($lockToDomain) {
+               $this->lockToDomain = $lockToDomain;
+       }
+
+       /**
+        * Returns the lockToDomain value
+        *
+        * @return string
+        * @api
+        */
+       public function getLockToDomain() {
+               return $this->lockToDomain;
+       }
+
+       /**
+        * Sets the description value
+        *
+        * @param string $description
+        * @return void
+        * @api
+        */
+       public function setDescription($description) {
+               $this->description = $description;
+       }
+
+       /**
+        * Returns the description value
+        *
+        * @return string
+        * @api
+        */
+       public function getDescription() {
+               return $this->description;
+       }
+
+       /**
+        * Sets the subgroups. Keep in mind that the property is called "subgroup"
+        * although it can hold several subgroups.
+        *
+        * @param Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup> $subgroup An object storage containing the subgroups to add
+        * @return void
+        * @api
+        */
+       public function setSubgroup(Tx_Extbase_Persistence_ObjectStorage $subgroup) {
+               $this->subgroup = $subgroup;
+       }
+
+       /**
+        * Adds a subgroup to the frontend user
+        *
+        * @param Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup
+        * @return void
+        * @api
+        */
+       public function addSubgroup(Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup) {
+               $this->subgroup->attach($subgroup);
+       }
+
+       /**
+        * Removes a subgroup from the frontend user group
+        *
+        * @param Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup
+        * @return void
+        * @api
+        */
+       public function removeSubgroup(Tx_Extbase_Domain_Model_FrontendUserGroup $subgroup) {
+               $this->subgroup->detach($subgroup);
+       }
+
+       /**
+        * Returns the subgroups. Keep in mind that the property is called "subgroup"
+        * although it can hold several subgroups.
+        *
+        * @return Tx_Extbase_Persistence_ObjectStorage An object storage containing the subgroups
+        * @api
+        */
+       public function getSubgroup() {
+               return $this->subgroups;
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserGroupRepository.php b/typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserGroupRepository.php
new file mode 100644 (file)
index 0000000..57f4fea
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * A Frontend User Group Repository
+ *
+ * @package Extbase
+ * @subpackage Domain\Repository
+ * @version $Id: FrontendUserGroupRepository.php 1729 2009-11-25 21:37:20Z stucki $
+ * @api
+ */
+class Tx_Extbase_Domain_Repository_FrontendUserGroupRepository extends Tx_Extbase_Persistence_Repository {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserRepository.php b/typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserRepository.php
new file mode 100644 (file)
index 0000000..bd1326f
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * A Frontend User repository
+ *
+ * @package Extbase
+ * @subpackage Domain\Repository
+ * @version $Id: FrontendUserRepository.php 1729 2009-11-25 21:37:20Z stucki $
+ * @api
+ */
+class Tx_Extbase_Domain_Repository_FrontendUserRepository extends Tx_Extbase_Persistence_Repository {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php b/typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php
new file mode 100644 (file)
index 0000000..2a5f020
--- /dev/null
@@ -0,0 +1,207 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A generic Domain Object.
+ *
+ * All Model domain objects need to inherit from either AbstractEntity or AbstractValueObject, as this provides important framework information.
+ *
+ * @package Extbase
+ * @subpackage DomainObject
+ * @version $ID:$
+ */
+abstract class Tx_Extbase_DomainObject_AbstractDomainObject implements Tx_Extbase_DomainObject_DomainObjectInterface {
+
+       /**
+        * @var int The uid
+        */
+       protected $uid;
+
+       /**
+        * @var int The uid of the localized record. In TYPO3 v4.x the property "uid" holds the uid of the record in default language (the translationOrigin).
+        */
+       protected $_localizedUid;
+
+       /**
+        * @var int The uid of the language of the object. In TYPO3 v4.x this is the uid of the language record in the table sys_language.
+        */
+       protected $_languageUid;
+
+       /**
+        * TRUE if the object is a clone
+        * @var boolean
+        */
+       private $_isClone = FALSE;
+
+       /**
+        * The generic constructor. If you want to implement your own __constructor() method in your Domain Object you have to call
+        * $this->initializeObject() in the first line of your constructor.
+        *
+        * @var array
+        */
+       public function __construct() {
+               $this->initializeObject();
+       }
+
+       /**
+        * This is the magic __wakeup() method. It's invoked by the unserialize statement in the reconstitution process
+        * of the object. If you want to implement your own __wakeup() method in your Domain Object you have to call
+        * parent::__wakeup() first!
+        *
+        * @return void
+        */
+       public function __wakeup() {
+               $this->initializeObject();
+       }
+
+       /**
+        * A template method to initialize an object. This can be used to manipulate the object after
+        * reconstitution and before the clean state of it's properties is stored.
+        *
+        * @return void
+        */
+       protected function initializeObject() {
+       }
+
+       /**
+        * Getter for uid.
+        *
+        * @return int the uid or NULL if none set yet.
+        */
+       final public function getUid() {
+               if ($this->uid !== NULL) {
+                       return (int)$this->uid;
+               } else {
+                       return NULL;
+               }
+       }
+       
+       /**
+        * Reconstitutes a property. Only for internal use.
+        *
+        * @param string $propertyName
+        * @param string $value
+        * @return void
+        */
+       public function _setProperty($propertyName, $propertyValue) {
+               if ($this->_hasProperty($propertyName)) {
+                       $this->$propertyName = $propertyValue;
+                       return TRUE;
+               }
+               return FALSE;
+       }
+
+       /**
+        * Returns the property value of the given property name. Only for internal use.
+        *
+        * @return mixed The propertyValue
+        */
+       public function _getProperty($propertyName) {
+               return $this->$propertyName;
+       }
+
+       /**
+        * Returns a hash map of property names and property values. Only for internal use.
+        *
+        * @return array The properties
+        */
+       public function _getProperties() {
+               $properties = get_object_vars($this);
+               foreach ($properties as $propertyName => $propertyValue) {
+                       if ($propertyName{0} === '_') {
+                               unset($properties[$propertyName]);
+                       }
+               }
+               return $properties;
+       }
+       
+       /**
+        * Returns the property value of the given property name. Only for internal use.
+        *
+        * @return boolean TRUE bool true if the property exists, FALSE if it doesn't exist or
+        * NULL in case of an error.
+        */
+       public function _hasProperty($propertyName) {
+               return property_exists($this, $propertyName);
+       }
+
+       /**
+        * Returns TRUE if the object is new (the uid was not set, yet). Only for internal use
+        *
+        * @return boolean
+        */
+       public function _isNew() {
+               return $this->uid === NULL;
+       }
+
+       /**
+        * Register an object's clean state, e.g. after it has been reconstituted
+        * from the database
+        *
+        * @return void
+        */
+       public function _memorizeCleanState() {
+       }
+       
+       /**
+        * Returns TRUE if the properties were modified after reconstitution. However, value objects can be never updated.
+        *
+        * @return boolean
+        */
+       public function _isDirty($propertyName = NULL) {
+               return FALSE;
+       }
+
+       /**
+        * Returns TRUE if the object has been clonesd, cloned, FALSE otherwise.
+        *
+        * @return boolean TRUE if the object has been cloned
+        */
+       public function _isClone() {
+               return $this->_isClone;
+       }
+
+       /**
+        * Setter whether this Domain Object is a clone of another one.
+        * NEVER SET THIS PROPERTY DIRECTLY. We currently need it to make the
+        * _isDirty check inside AbstractEntity work, but it is just a work-
+        * around right now.
+        *
+        * @param boolean $clone
+        */
+       public function _setClone($clone) {
+               $this->_isClone = (boolean)$clone;
+       }
+
+       /**
+        * Clone method. Sets the _isClone property.
+        *
+        * @return void
+        */
+       public function __clone() {
+               $this->_isClone = TRUE;
+       }
+       
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/DomainObject/AbstractEntity.php b/typo3/sysext/extbase/Classes/DomainObject/AbstractEntity.php
new file mode 100644 (file)
index 0000000..69d57d4
--- /dev/null
@@ -0,0 +1,148 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An abstract Entity. An Entity is an object fundamentally defined not by its attributes,
+ * but by a thread of continuity and identity (e.g. a person).
+ *
+ * @package Extbase
+ * @subpackage DomainObject
+ * @version $ID:$
+ */
+abstract class Tx_Extbase_DomainObject_AbstractEntity extends Tx_Extbase_DomainObject_AbstractDomainObject {
+
+       /**
+        * @var An array holding the clean property values. Set right after reconstitution of the object
+        */
+       private $_cleanProperties = array();
+
+       /**
+        * Register an object's clean state, e.g. after it has been reconstituted
+        * from the database.
+        *
+        * @param string $propertyName The name of the property to be memorized. If omitted all persistable properties are memorized.
+        * @return void
+        */
+       public function _memorizeCleanState($propertyName = NULL) {
+               if ($propertyName !== NULL) {
+                       $this->_memorizePropertyCleanState($propertyName);
+               } else {
+                       $this->_cleanProperties = array();
+                       $properties = get_object_vars($this);
+                       foreach ($properties as $propertyName => $propertyValue) {
+                               if ($propertyName[0] === '_') continue; // Do not memorize "internal" properties
+                               $this->_memorizePropertyCleanState($propertyName);
+                       }
+               }
+       }
+
+       /**
+        * Register an properties's clean state, e.g. after it has been reconstituted
+        * from the database.
+        *
+        * @param string $propertyName The name of the property to be memorized. If omittet all persistable properties are memorized.
+        * @return void
+        */
+       public function _memorizePropertyCleanState($propertyName) {
+               $propertyValue = $this->$propertyName;
+               if (is_object($propertyValue)) {
+                       $this->_cleanProperties[$propertyName] = clone($propertyValue);
+
+                       // We need to make sure the clone and the original object
+                       // are identical when compared with == (see _isDirty()).
+                       // After the cloning, the Domain Object will have the property
+                       // "isClone" set to TRUE, so we manually have to set it to FALSE
+                       // again. Possible fix: Somehow get rid of the "isClone" property,
+                       // which is currently needed in Fluid.
+                       if ($propertyValue instanceof Tx_Extbase_DomainObject_AbstractDomainObject) {
+                               $this->_cleanProperties[$propertyName]->_setClone(FALSE);
+                       }
+               } else {
+                       $this->_cleanProperties[$propertyName] = $propertyValue;
+               }
+       }
+
+       /**
+        * Returns a hash map of clean properties and $values.
+        *
+        * @return array
+        */
+       public function _getCleanProperties() {
+               return $this->_cleanProperties;
+       }
+
+       /**
+        * Returns the clean value of the given property. The returned value will be NULL if the clean state was not memorized before, or
+        * if the clean value is NULL.
+        *
+        * @param string $propertyName The name of the property to be memorized. If omittet all persistable properties are memorized.
+        * @return mixed The clean property value or NULL
+        */
+       public function _getCleanProperty($propertyName) {
+               if (is_array($this->_cleanProperties)) {
+                       return isset($this->_cleanProperties[$propertyName]) ? $this->_cleanProperties[$propertyName] : NULL;
+               } else {
+                       return NULL;
+               }
+       }
+       
+       /**
+        * Returns TRUE if the properties were modified after reconstitution
+        *
+        * @param string $propertyName An optional name of a property to be checked if its value is dirty
+        * @return boolean
+        */
+       public function _isDirty($propertyName = NULL) {
+               if (empty($this->_cleanProperties)) return TRUE;
+               // if (!is_array($this->_cleanProperties)) throw new Tx_Extbase_Persistence_Exception_CleanStateNotMemorized('The clean state of the object "' . get_class($this) . '" has not been memorized before asking _isDirty().', 1233309106);
+               if ($this->uid !== NULL && $this->uid != $this->_cleanProperties['uid']) throw new Tx_Extbase_Persistence_Exception_TooDirty('The uid "' . $this->uid . '" has been modified, that is simply too much.', 1222871239);
+               $result = FALSE;
+               if ($propertyName !== NULL) {
+                       if (is_object($this->$propertyName)) {
+                               // In case it is an object, we do a simple comparison (!=) as we want cloned objects to return the same values.
+                               $result = $this->_cleanProperties[$propertyName] != $this->$propertyName;
+                       } else {
+                               $result = $this->_cleanProperties[$propertyName] !== $this->$propertyName;
+                       }
+               } else {
+                       foreach ($this->_cleanProperties as $propertyName => $propertyValue) {
+                               if (is_object($this->$propertyName)) {
+                                       // In case it is an object, we do a simple comparison (!=) as we want cloned objects to return the same values.
+                                       if ($this->$propertyName != $propertyValue) {
+                                               $result = TRUE;
+                                               break;
+                                       }
+                               } else {
+                                       if ($this->$propertyName !== $propertyValue) {
+                                               $result = TRUE;
+                                               break;
+                                       }
+                               }
+                       }
+               }
+               return $result;
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/DomainObject/AbstractValueObject.php b/typo3/sysext/extbase/Classes/DomainObject/AbstractValueObject.php
new file mode 100644 (file)
index 0000000..aa13d6e
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A abstract Value Object. A Value Object is an object that describes some characteristic
+ * or attribute (e.g. a color) but carries no concept of identity.
+ *
+ * @package Extbase
+ * @subpackage DomainObject
+ * @version $ID:$
+ */
+abstract class Tx_Extbase_DomainObject_AbstractValueObject extends Tx_Extbase_DomainObject_AbstractDomainObject {
+
+       /**
+        * Returns the value of the Value Object. Must be overwritten by a concrete value object.
+        *
+        * @return void
+        */
+       public function getValue() {
+               return $this->__toString();
+       }
+       
+       /**
+        * Clone method. Sets the _isClone property.
+        *
+        * @return void
+        */
+       public function __clone() {
+               $this->uid = NULL;
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/DomainObject/DomainObjectInterface.php b/typo3/sysext/extbase/Classes/DomainObject/DomainObjectInterface.php
new file mode 100644 (file)
index 0000000..a104723
--- /dev/null
@@ -0,0 +1,92 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A Domain Object Interface. All domain objects which should be persisted need to implement the below interface.
+ * Usually you will need to subclass Tx_Extbase_DomainObject_AbstractEntity and Tx_Extbase_DomainObject_AbstractValueObject
+ * instead.
+ *
+ * @see Tx_Extbase_DomainObject_AbstractEntity
+ * @see Tx_Extbase_DomainObject_AbstractValueObject
+ *
+ * @package Extbase
+ * @subpackage DomainObject
+ * @version $ID:$
+ */
+interface Tx_Extbase_DomainObject_DomainObjectInterface {
+
+       /**
+        * Getter for uid.
+        *
+        * @return int the uid or NULL if none set yet.
+        */
+       public function getUid();
+
+       /**
+        * Register an object's clean state, e.g. after it has been reconstituted
+        * from the database
+        *
+        * @return void
+        */
+       public function _memorizeCleanState();
+
+       /**
+        * Returns TRUE if the object is new (the uid was not set, yet). Only for internal use
+        *
+        * @return boolean
+        */
+       public function _isNew();
+
+       /**
+        * Returns TRUE if the properties were modified after reconstitution
+        *
+        * @return boolean
+        */
+       public function _isDirty();
+
+       /**
+        * Reconstitutes a property. Only for internal use.
+        *
+        * @param string $propertyName
+        * @param string $value
+        * @return void
+        */
+       public function _setProperty($propertyName, $value);
+
+       /**
+        * Returns the property value of the given property name. Only for internal use.
+        *
+        * @return mixed The propertyValue
+        */
+       public function _getProperty($propertyName);
+
+       /**
+        * Returns a hash map of property names and property values
+        *
+        * @return array The properties
+        */
+       public function _getProperties();
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Error/Error.php b/typo3/sysext/extbase/Classes/Error/Error.php
new file mode 100644 (file)
index 0000000..9a991b4
--- /dev/null
@@ -0,0 +1,90 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+/**
+ * An object representation of a generic error. Subclass this to create
+ * more specific errors if necessary.
+ *
+ * @package Extbase
+ * @subpackage Error
+ * @version $Id: Error.php 1729 2009-11-25 21:37:20Z stucki $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope prototype
+ * @api
+ */
+class Tx_Extbase_Error_Error {
+
+       /**
+        * @var string The default (english) error message.
+        */
+       protected $message = 'Unknown error';
+
+       /**
+        * @var string The error code
+        */
+       protected $code;
+
+       /**
+        * Constructs this error
+        *
+        * @param string $message: An english error message which is used if no other error message can be resolved
+        * @param integer $code: A unique error code
+        * @api
+        */
+       public function __construct($message, $code) {
+               $this->message = $message;
+               $this->code = $code;
+       }
+
+       /**
+        * Returns the error message
+        * @return string The error message
+        * @api
+        */
+       public function getMessage() {
+               return $this->message;
+       }
+
+       /**
+        * Returns the error code
+        * @return string The error code
+        * @api
+        */
+       public function getCode() {
+               return $this->code;
+       }
+
+       /**
+        * Converts this error into a string
+        *
+        * @return string
+        * @api
+        */
+       public function __toString() {
+               return $this->message . ' (#' . $this->code . ')';
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/Exception.php b/typo3/sysext/extbase/Classes/Exception.php
new file mode 100644 (file)
index 0000000..5a45468
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A generic Extbase exception
+ *
+ * @package Extbase
+ * @version $ID: $
+ */
+class Tx_Extbase_Exception extends Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Controller/AbstractController.php b/typo3/sysext/extbase/Classes/MVC/Controller/AbstractController.php
new file mode 100644 (file)
index 0000000..b4c8091
--- /dev/null
@@ -0,0 +1,400 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An abstract base class for Controllers
+ *
+ * @package Extbase
+ * @subpackage MVC\Controller
+ * @version $ID:$
+ * @api
+ */
+abstract class Tx_Extbase_MVC_Controller_AbstractController implements Tx_Extbase_MVC_Controller_ControllerInterface {
+
+       /**
+        * @var Tx_Extbase_Object_ManagerInterface
+        */
+       protected $objectManager;
+
+       /**
+        * @var Tx_Extbase_MVC_Web_Routing_UriBuilder
+        */
+       protected $uriBuilder;
+
+       /**
+        * @var string Key of the extension this controller belongs to
+        */
+       protected $extensionName;
+
+       /**
+        * Contains the settings of the current extension
+        *
+        * @var array
+        * @api
+        */
+       protected $settings;
+
+       /**
+        * The current request.
+        *
+        * @var Tx_Extbase_MVC_Request
+        * @api
+        */
+       protected $request;
+
+       /**
+        * The response which will be returned by this action controller
+        *
+        * @var Tx_Extbase_MVC_Response
+        * @api
+        */
+       protected $response;
+
+       /**
+        * @var Tx_Extbase_Property_Mapper
+        */
+       protected $propertyMapper;
+
+       /**
+        * @var Tx_Extbase_Validation_ValidatorResolver
+        */
+       protected $validatorResolver;
+
+       /**
+        * @var Tx_Extbase_MVC_Controller_Arguments Arguments passed to the controller
+        */
+       protected $arguments;
+
+       /**
+        * The results of the mapping of request arguments to controller arguments
+        * @var Tx_Extbase_Property_MappingResults
+        * @api
+        */
+       protected $argumentsMappingResults;
+
+       /**
+        * 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.
+        * @var array
+        */
+       protected $supportedRequestTypes = array('Tx_Extbase_MVC_Request');
+
+       /**
+        * The flash messages. DEPRECATED. Use $this->flashMessageContainer instead.
+        *
+        * @var Tx_Extbase_MVC_Controller_FlashMessages
+        * @deprecated
+        */
+       protected $flashMessages;
+
+       /**
+        * The flash messages. Use $this->flashMessageContainer->add(...) to add a new Flash message.
+        *
+        * @var Tx_Extbase_MVC_Controller_FlashMessages
+        * @api
+        */
+       protected $flashMessageContainer;
+
+       /**
+        * Constructs the controller.
+        */
+       public function __construct() {
+               $this->initializeObjects();
+               list(, $this->extensionName) = explode('_', get_class($this));
+       }
+
+       /**
+        * Initializes objects this class depends on
+        *
+        * @return void
+        */
+       protected function initializeObjects() {
+               $this->objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_Manager');
+               $this->arguments = t3lib_div::makeInstance('Tx_Extbase_MVC_Controller_Arguments');
+               $this->arguments->injectPersistenceManager(Tx_Extbase_Dispatcher::getPersistenceManager());
+               $this->arguments->injectQueryFactory(t3lib_div::makeInstance('Tx_Extbase_Persistence_QueryFactory'));
+       }
+
+       /**
+        * Injects the property mapper
+        *
+        * @param Tx_Extbase_Property_Mapper $propertyMapper The property mapper
+        * @return void
+        */
+       public function injectPropertyMapper(Tx_Extbase_Property_Mapper $propertyMapper) {
+               $this->propertyMapper = $propertyMapper;
+       }
+
+       /**
+        * Injects the settings of the extension.
+        *
+        * @param array $settings Settings container of the current extension
+        * @return void
+        */
+       public function injectSettings(array $settings) {
+               $this->settings = $settings;
+       }
+
+       /**
+        * Injects the object manager
+        *
+        * @param Tx_Extbase_Object_ManagerInterface $objectManager
+        * @return void
+        */
+       public function injectObjectManager(Tx_Extbase_Object_ManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * Injects the validator resolver
+        *
+        * @param Tx_Extbase_Validation_ValidatorResolver $validatorResolver
+        * @return void
+        */
+       public function injectValidatorResolver(Tx_Extbase_Validation_ValidatorResolver $validatorResolver) {
+               $this->validatorResolver = $validatorResolver;
+       }
+
+       /**
+        * Injects the flash messages container
+        *
+        * @param Tx_Extbase_MVC_Controller_FlashMessages $flashMessages
+        * @return void
+        */
+       public function injectFlashMessageContainer(Tx_Extbase_MVC_Controller_FlashMessages $flashMessageContainer) {
+               $this->flashMessageContainer = $flashMessageContainer;
+               $this->flashMessages = $flashMessageContainer; // deprecated, but should still work.
+       }
+
+       /**
+        * 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_Extbase_MVC_Request $request The current request
+        * @return boolean TRUE if this request type is supported, otherwise FALSE
+        * @api
+        */
+       public function canProcessRequest(Tx_Extbase_MVC_Request $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_Extbase_MVC_Request $request The request object
+        * @param Tx_Extbase_MVC_Response $response The response, modified by this handler
+        * @return void
+        * @throws Tx_Extbase_MVC_Exception_UnsupportedRequestType if the controller doesn't support the current request type
+        * @api
+        */
+       public function processRequest(Tx_Extbase_MVC_Request $request, Tx_Extbase_MVC_Response $response) {
+               if (!$this->canProcessRequest($request)) throw new Tx_Extbase_MVC_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->uriBuilder = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Routing_UriBuilder');
+               $this->uriBuilder->setRequest($request);
+
+               $this->initializeControllerArgumentsBaseValidators();
+               $this->mapRequestArgumentsToControllerArguments();
+       }
+
+       /**
+        * Initialize the controller context
+        *
+        * @return Tx_Extbase_MVC_Controller_ControllerContext ControllerContext to be passed to the view
+        * @api
+        */
+       protected function buildControllerContext() {
+               $controllerContext = t3lib_div::makeInstance('Tx_Extbase_MVC_Controller_ControllerContext');
+               $controllerContext->setRequest($this->request);
+               $controllerContext->setResponse($this->response);
+               if ($this->arguments !== NULL) {
+                       $controllerContext->setArguments($this->arguments);
+               }
+               if ($this->argumentsMappingResults !== NULL) {
+                       $controllerContext->setArgumentsMappingResults($this->argumentsMappingResults);
+               }
+               $controllerContext->setUriBuilder($this->uriBuilder);
+               $controllerContext->setFlashMessageContainer($this->flashMessageContainer);
+               return $controllerContext;
+       }
+
+       /**
+        * Forwards the request to another controller.
+        *
+        * @param string $actionName Name of the action to forward to
+        * @param string $controllerName Unqualified object name of the controller to forward to. If not specified, the current controller is used.
+        * @param string $extensionName Name of the extension containing the controller to forward to. If not specified, the current extension is assumed.
+        * @param Tx_Extbase_MVC_Controller_Arguments $arguments Arguments to pass to the target action
+        * @return void
+        * @throws Tx_Extbase_MVC_Exception_StopAction
+        * @api
+        */
+       public function forward($actionName, $controllerName = NULL, $extensionName = NULL, array $arguments = NULL) {
+               $this->request->setDispatched(FALSE);
+               $this->request->setControllerActionName($actionName);
+               if ($controllerName !== NULL) $this->request->setControllerName($controllerName);
+               if ($extensionName !== NULL) $this->request->setControllerExtensionName($extensionName);
+               if ($arguments !== NULL) $this->request->setArguments($arguments);
+               throw new Tx_Extbase_MVC_Exception_StopAction();
+       }
+
+       /**
+        * Forwards the request to another action and / or controller.
+        *
+        * NOTE: This method only supports web requests and will thrown an exception
+        * if used with other request types.
+        *
+        * @param string $actionName Name of the action to forward to
+        * @param string $controllerName Unqualified object name of the controller to forward to. If not specified, the current controller is used.
+        * @param string $extensionName Name of the extension containing the controller to forward to. If not specified, the current extension is assumed.
+        * @param Tx_Extbase_MVC_Controller_Arguments $arguments Arguments to pass to the target action
+        * @param integer $pageUid Target page uid. If NULL, the current page uid is used
+        * @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"
+        * @return void
+        * @throws Tx_Extbase_MVC_Exception_UnsupportedRequestType If the request is not a web request
+        * @throws Tx_Extbase_MVC_Exception_StopAction
+        * @api
+        */
+       protected function redirect($actionName, $controllerName = NULL, $extensionName = NULL, array $arguments = NULL, $pageUid = NULL, $delay = 0, $statusCode = 303) {
+               if (!$this->request instanceof Tx_Extbase_MVC_Web_Request) throw new Tx_Extbase_MVC_Exception_UnsupportedRequestType('redirect() only supports web requests.', 1220539734);
+
+               if ($controllerName === NULL) {
+                       $controllerName = $this->request->getControllerName();
+               }
+               if ($pageUid === NULL && isset($GLOBALS['TSFE'])) {
+                       $pageUid = $GLOBALS['TSFE']->id;
+               }
+
+               $uri = $this->uriBuilder
+                       ->reset()
+                       ->setTargetPageUid($pageUid)
+                       ->uriFor($actionName, $arguments, $controllerName, $extensionName);
+               $this->redirectToURI($uri, $delay, $statusCode);
+       }
+
+       /**
+        * 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 A string representation of a URI
+        * @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_Extbase_MVC_Exception_UnsupportedRequestType If the request is not a web request
+        * @throws Tx_Extbase_MVC_Exception_StopAction
+        * @api
+        */
+       protected function redirectToURI($uri, $delay = 0, $statusCode = 303) {
+               if (!$this->request instanceof Tx_Extbase_MVC_Web_Request) throw new Tx_Extbase_MVC_Exception_UnsupportedRequestType('redirect() only supports web requests.', 1220539734);
+
+               $uri = $this->addBaseUriIfNecessary($uri);
+               $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_Extbase_MVC_Exception_StopAction();
+       }
+       
+       /**
+        * Adds the base uri if not already in place.
+        *
+        * @param string $uri The URI
+        * @return void
+        */
+       protected function addBaseUriIfNecessary($uri) {
+               $baseUri = $this->request->getBaseURI();
+               if(stripos($uri, $baseUri) !== 0) {
+                       $uri = $baseUri . (string)$uri;
+               }
+               return $uri;
+       }
+
+       /**
+        * 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_Extbase_MVC_Exception_UnsupportedRequestType If the request is not a web request
+        * @throws Tx_Extbase_MVC_Exception_StopAction
+        * @api
+        */
+       public function throwStatus($statusCode, $statusMessage = NULL, $content = NULL) {
+               if (!$this->request instanceof Tx_Extbase_MVC_Web_Request) throw new Tx_Extbase_MVC_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_Extbase_MVC_Exception_StopAction();
+       }
+
+       /**
+        * Collects the base validators which were defined for the data type of each
+        * controller argument and adds them to the argument's validator chain.
+        *
+        * @return void
+        */
+       public function initializeControllerArgumentsBaseValidators() {
+               foreach ($this->arguments as $argument) {
+                       $validator = $this->validatorResolver->getBaseValidatorConjunction($argument->getDataType());
+                       if ($validator !== NULL) $argument->setValidator($validator);
+               }
+       }
+
+       /**
+        * Maps arguments delivered by the request object to the local controller arguments.
+        *
+        * @return void
+        */
+       protected function mapRequestArgumentsToControllerArguments() {
+               $optionalPropertyNames = array();
+               $allPropertyNames = $this->arguments->getArgumentNames();
+               foreach ($allPropertyNames as $propertyName) {
+                       if ($this->arguments[$propertyName]->isRequired() === FALSE) $optionalPropertyNames[] = $propertyName;
+               }
+
+               $validator = t3lib_div::makeInstance('Tx_Extbase_MVC_Controller_ArgumentsValidator');
+               $this->propertyMapper->mapAndValidate($allPropertyNames, $this->request->getArguments(), $this->arguments, $optionalPropertyNames, $validator);
+
+               $this->argumentsMappingResults = $this->propertyMapper->getMappingResults();
+       }
+}
+?>
diff --git a/typo3/sysext/extbase/Classes/MVC/Controller/ActionController.php b/typo3/sysext/extbase/Classes/MVC/Controller/ActionController.php
new file mode 100644 (file)
index 0000000..19c0675
--- /dev/null
@@ -0,0 +1,427 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A multi action controller. This is by far the most common base class for Controllers.
+ *
+ * @package Extbase
+ * @subpackage MVC\Controller
+ * @version $ID:$
+ * @api
+ */
+class Tx_Extbase_MVC_Controller_ActionController extends Tx_Extbase_MVC_Controller_AbstractController {
+
+       /**
+        * @var Tx_Extbase_Reflection_Service
+        */
+       protected $reflectionService;
+
+       /**
+        * By default a Fluid TemplateView is provided, if a template is available,
+        * then a view with the same name as the current action will be looked up.
+        * If none is available the $defaultViewObjectName will be used and finally
+        * an EmptyView will be created.
+        * @var Tx_Extbase_MVC_View_ViewInterface
+        * @api
+        */
+       protected $view = NULL;
+
+       /**
+        * Pattern after which the view object name is built if no Fluid template
+        * is found.
+        * @var string
+        * @api
+        */
+       protected $viewObjectNamePattern = 'Tx_@extension_View_@controller_@action@format';
+
+       /**
+        * The default view object to use if neither a Fluid template nor an action
+        * specific view object could be found.
+        * @var string
+        * @api
+        */
+       protected $defaultViewObjectName = NULL;
+
+       /**
+        * Name of the action method
+        * @var string
+        * @api
+        */
+       protected $actionMethodName = 'indexAction';
+
+       /**
+        * Name of the special error action method which is called in case of errors
+        * @var string
+        * @api
+        */
+       protected $errorMethodName = 'errorAction';
+
+       /**
+        * Injects the reflection service
+        *
+        * @param Tx_Extbase_Reflection_Service $reflectionService
+        * @return void
+        */
+       public function injectReflectionService(Tx_Extbase_Reflection_Service $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
+        * 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_Extbase_MVC_Request $request The current request
+        * @return boolean TRUE if this request type is supported, otherwise FALSE
+        */
+       public function canProcessRequest(Tx_Extbase_MVC_Request $request) {
+               return parent::canProcessRequest($request);
+
+       }
+
+       /**
+        * Handles a request. The result output is returned by altering the given response.
+        *
+        * @param Tx_Extbase_MVC_Request $request The request object
+        * @param Tx_Extbase_MVC_Response $response The response, modified by this handler
+        * @return void
+        */
+       public function processRequest(Tx_Extbase_MVC_Request $request, Tx_Extbase_MVC_Response $response) {
+               if (!$this->canProcessRequest($request)) throw new Tx_Extbase_MVC_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->uriBuilder = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Routing_UriBuilder');
+               $this->uriBuilder->setRequest($request);
+
+               $this->actionMethodName = $this->resolveActionMethodName();
+
+               $this->initializeActionMethodArguments();
+               $this->initializeActionMethodValidators();
+
+               $this->initializeAction();
+               $actionInitializationMethodName = 'initialize' . ucfirst($this->actionMethodName);
+               if (method_exists($this, $actionInitializationMethodName)) {
+                       call_user_func(array($this, $actionInitializationMethodName));
+               }
+
+               $this->mapRequestArgumentsToControllerArguments();
+               $this->checkRequestHash();
+               $this->view = $this->resolveView();
+               if ($this->view !== NULL) $this->initializeView($this->view);
+               $this->callActionMethod();
+       }
+
+       /**
+        * Implementation of the arguments initilization in the action controller:
+        * Automatically registers arguments of the current action
+        *
+        * Don't override this method - use initializeAction() instead.
+        *
+        * @return void
+        * @see initializeArguments()
+        */
+       protected function initializeActionMethodArguments() {
+               $methodParameters = $this->reflectionService->getMethodParameters(get_class($this), $this->actionMethodName);
+
+               foreach ($methodParameters as $parameterName => $parameterInfo) {
+                       $dataType = NULL;
+                       if (isset($parameterInfo['type'])) {
+                               $dataType = $parameterInfo['type'];
+                       } elseif ($parameterInfo['array']) {
+                               $dataType = 'array';
+                       }
+                       if ($dataType === NULL) throw new Tx_Extbase_MVC_Exception_InvalidArgumentType('The argument type for parameter "' . $parameterName . '" could not be detected.', 1253175643);
+
+                       $defaultValue = (isset($parameterInfo['defaultValue']) ? $parameterInfo['defaultValue'] : NULL);
+
+                       $this->arguments->addNewArgument($parameterName, $dataType, ($parameterInfo['optional'] === FALSE), $defaultValue);
+               }
+       }
+
+       /**
+        * Adds the needed valiators to the Arguments:
+        * - Validators checking the data type from the @param annotation
+        * - Custom validators specified with @validate.
+        *
+        * In case @dontvalidate is NOT set for an argument, the following two
+        * validators are also added:
+        * - Model-based validators (@validate annotations in the model)
+        * - Custom model validator classes
+        *
+        * @return void
+        */
+       protected function initializeActionMethodValidators() {
+               $parameterValidators = $this->validatorResolver->buildMethodArgumentsValidatorConjunctions(get_class($this), $this->actionMethodName);
+
+               $dontValidateAnnotations = array();
+               $methodTagsValues = $this->reflectionService->getMethodTagsValues(get_class($this), $this->actionMethodName);
+               if (isset($methodTagsValues['dontvalidate'])) {
+                       $dontValidateAnnotations = $methodTagsValues['dontvalidate'];
+               }
+
+               foreach ($this->arguments as $argument) {
+                       $validator = $parameterValidators[$argument->getName()];
+
+                       if (array_search('$' . $argument->getName(), $dontValidateAnnotations) === FALSE) {
+                               $baseValidatorConjunction = $this->validatorResolver->getBaseValidatorConjunction($argument->getDataType());
+                               if ($baseValidatorConjunction !== NULL) {
+                                       $validator->addValidator($baseValidatorConjunction);
+                               }
+                       }
+                       $argument->setValidator($validator);
+               }
+       }
+
+       /**
+        * Determines the action method and assures that the method exists.
+        *
+        * @return string The action method name
+        * @throws Tx_Extbase_MVC_Exception_NoSuchAction if the action specified in the request object does not exist (and if there's no default action either).
+        */
+       protected function resolveActionMethodName() {
+               $actionMethodName = $this->request->getControllerActionName() . 'Action';
+               if (!method_exists($this, $actionMethodName)) throw new Tx_Extbase_MVC_Exception_NoSuchAction('An action "' . $actionMethodName . '" does not exist in controller "' . get_class($this) . '".', 1186669086);
+               return $actionMethodName;
+       }
+
+       /**
+        * Calls the specified action method and passes the arguments.
+        *
+        * If the action returns a string, it is appended to the content in the
+        * response object. If the action doesn't return anything and a valid
+        * view exists, the view is rendered automatically.
+        *
+        * @param string $actionMethodName Name of the action method to call
+        * @return void
+        * @api
+        */
+       protected function callActionMethod() {
+               $argumentsAreValid = TRUE;
+               $preparedArguments = array();
+               foreach ($this->arguments as $argument) {
+                       $preparedArguments[] = $argument->getValue();
+               }
+
+               if ($this->argumentsMappingResults->hasErrors()) {
+                       $actionResult = call_user_func(array($this, $this->errorMethodName));
+               } else {
+                       $actionResult = call_user_func_array(array($this, $this->actionMethodName), $preparedArguments);
+               }
+               if ($actionResult === NULL && $this->view instanceof Tx_Extbase_MVC_View_ViewInterface) {
+                       $this->response->appendContent($this->view->render());
+               } elseif (is_string($actionResult) && 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
+        * @api
+        */
+       protected function resolveView() {
+               $view = $this->objectManager->getObject('Tx_Fluid_View_TemplateView');
+               $controllerContext = $this->buildControllerContext();
+               $view->setControllerContext($controllerContext);
+
+               // Template Path Override
+               $extbaseFrameworkConfiguration = Tx_Extbase_Dispatcher::getExtbaseFrameworkConfiguration();
+               if (isset($extbaseFrameworkConfiguration['view']['templateRootPath']) && strlen($extbaseFrameworkConfiguration['view']['templateRootPath']) > 0) {
+                       $view->setTemplateRootPath(t3lib_div::getFileAbsFileName($extbaseFrameworkConfiguration['view']['templateRootPath']));
+               }
+               if (isset($extbaseFrameworkConfiguration['view']['layoutRootPath']) && strlen($extbaseFrameworkConfiguration['view']['layoutRootPath']) > 0) {
+                       $view->setLayoutRootPath(t3lib_div::getFileAbsFileName($extbaseFrameworkConfiguration['view']['layoutRootPath']));
+               }
+               if (isset($extbaseFrameworkConfiguration['view']['partialRootPath']) && strlen($extbaseFrameworkConfiguration['view']['partialRootPath']) > 0) {
+                       $view->setPartialRootPath(t3lib_div::getFileAbsFileName($extbaseFrameworkConfiguration['view']['partialRootPath']));
+               }
+
+               if ($view->hasTemplate() === FALSE) {
+                       $viewObjectName = $this->resolveViewObjectName();
+                       if (class_exists($viewObjectName) === FALSE) $viewObjectName = 'Tx_Extbase_MVC_View_EmptyView';
+                       $view = $this->objectManager->getObject($viewObjectName);
+                       $view->setControllerContext($controllerContext);
+               }
+               if (method_exists($view, 'injectSettings')) {
+                       $view->injectSettings($this->settings);
+               }
+               $view->initializeView(); // In FLOW3, solved through Object Lifecycle methods, we need to call it explicitely
+               $view->assign('settings', $this->settings); // same with settings injection.
+               return $view;
+       }
+
+       /**
+        * Determines the fully qualified view object name.
+        *
+        * @return mixed The fully qualified view object name or FALSE if no matching view could be found.
+        * @api
+        */
+       protected function resolveViewObjectName() {
+               $possibleViewName = $this->viewObjectNamePattern;
+               $extensionName = $this->request->getControllerExtensionName();
+               $possibleViewName = str_replace('@extension', $extensionName, $possibleViewName);
+               $possibleViewName = str_replace('@controller', $this->request->getControllerName(), $possibleViewName);
+               $possibleViewName = str_replace('@action', ucfirst($this->request->getControllerActionName()), $possibleViewName);
+
+               $viewObjectName = str_replace('@format', ucfirst($this->request->getFormat()), $possibleViewName);
+               if (class_exists($viewObjectName) === FALSE) {
+                       $viewObjectName = str_replace('@format', '', $possibleViewName);
+               }
+               if (class_exists($viewObjectName) === FALSE && $this->defaultViewObjectName !== NULL) {
+                       $viewObjectName = $this->defaultViewObjectName;
+               }
+               return $viewObjectName;
+       }
+
+       /**
+        * Initializes the view before invoking an action method.
+        *
+        * Override this method to solve assign variables common for all actions
+        * or prepare the view in another way before the action is called.
+        *
+        * @param Tx_Extbase_View_ViewInterface $view The view to be initialized
+        * @return void
+        * @api
+        */
+       protected function initializeView(Tx_Extbase_MVC_View_ViewInterface $view) {
+       }
+
+       /**
+        * Initializes the controller before invoking an action method.
+        *
+        * Override this method to solve tasks which all actions have in
+        * common.
+        *
+        * @return void
+        * @api
+        */
+       protected function initializeAction() {
+       }
+
+       /**
+        * A special action which is called if the originally intended action could
+        * not be called, for example if the arguments were not valid.
+        *
+        * The default implementation sets a flash message, request errors and forwards back
+        * to the originating action. This is suitable for most actions dealing with form input.
+        *
+        * We clear the page cache by default on an error as well, as we need to make sure the
+        * data is re-evaluated when the user changes something.
+        *
+        * @return string
+        * @api
+        */
+       protected function errorAction() {
+               $this->request->setErrors($this->argumentsMappingResults->getErrors());
+               $this->clearCacheOnError();
+
+               $errorFlashMessage = $this->getErrorFlashMessage();
+               if ($errorFlashMessage !== FALSE) {
+                       $this->flashMessages->add($errorFlashMessage);
+               }
+
+               if ($this->request->hasArgument('__referrer')) {
+                       $referrer = $this->request->getArgument('__referrer');
+                       $this->forward($referrer['actionName'], $referrer['controllerName'], $referrer['extensionName'], $this->request->getArguments());
+               }
+
+               $message = 'An error occurred while trying to call ' . get_class($this) . '->' . $this->actionMethodName . '().' . PHP_EOL;
+               foreach ($this->argumentsMappingResults->getErrors() as $error) {
+                       $message .= 'Error:   ' . $error->getMessage() . PHP_EOL;
+               }
+               foreach ($this->argumentsMappingResults->getWarnings() as $warning) {
+                       $message .= 'Warning: ' . $warning->getMessage() . PHP_EOL;
+               }
+               return $message;
+       }
+
+       /**
+        * A template method for displaying custom error flash messages, or to
+        * display no flash message at all on errors. Override this to customize
+        * the flash message in your action controller.
+        *
+        * @return string|boolean The flash message or FALSE if no flash message should be set
+        * @api
+        */
+       protected function getErrorFlashMessage() {
+               return 'An error occurred while trying to call ' . get_class($this) . '->' . $this->actionMethodName . '()';
+       }
+
+       /**
+        * Checks the request hash (HMAC), if arguments have been touched by the property mapper.
+        *
+        * In case the @dontverifyrequesthash-Annotation has been set, this suppresses the exception.
+        *
+        * @return void
+        * @throws Tx_Extbase_MVC_Exception_InvalidOrNoRequestHash In case request hash checking failed
+        * @author Sebastian Kurfürst <sebastian@typo3.org>
+        */
+       protected function checkRequestHash() {
+               if (!($this->request instanceof Tx_Extbase_MVC_Web_Request)) return; // We only want to check it for now for web requests.
+               if ($this->request->isHmacVerified()) return; // all good
+
+               $verificationNeeded = FALSE;
+               foreach ($this->arguments as $argument) {
+                       if ($argument->getOrigin() == Tx_Extbase_MVC_Controller_Argument::ORIGIN_NEWLY_CREATED
+                        || $argument->getOrigin() == Tx_Extbase_MVC_Controller_Argument::ORIGIN_PERSISTENCE_AND_MODIFIED) {
+                               $verificationNeeded = TRUE;
+                       }
+               }
+               if ($verificationNeeded) {
+                       $methodTagsValues = $this->reflectionService->getMethodTagsValues(get_class($this), $this->actionMethodName);
+                       if (!isset($methodTagsValues['dontverifyrequesthash'])) {
+                               throw new Tx_Extbase_MVC_Exception_InvalidOrNoRequestHash('Request hash (HMAC) checking failed. The parameter __hmac was invalid or not set, and objects were modified.', 1255082824);
+                       }
+               }
+       }
+
+       /**
+        * Clear cache of current page on error. Needed because we want a re-evaluation of the data.
+        * Better would be just do delete the cache for the error action, but that is not possible right now.
+        *
+        * @return void
+        */
+       protected function clearCacheOnError() {
+               $extbaseSettings = Tx_Extbase_Dispatcher::getExtbaseFrameworkConfiguration();
+               if (isset($extbaseSettings['persistence']['enableAutomaticCacheClearing']) && $extbaseSettings['persistence']['enableAutomaticCacheClearing'] === '1') {
+                       if (isset($GLOBALS['TSFE'])) {
+                               $pageUid = $GLOBALS['TSFE']->id;
+                               Tx_Extbase_Utility_Cache::clearPageCache(array($pageUid));
+                       }
+               }
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Controller/Argument.php b/typo3/sysext/extbase/Classes/MVC/Controller/Argument.php
new file mode 100644 (file)
index 0000000..2c96c4b
--- /dev/null
@@ -0,0 +1,422 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A controller argument
+ *
+ * @package Extbase
+ * @subpackage MVC\Controller
+ * @version $ID:$
+ * @scope prototype
+ * @api
+ */
+class Tx_Extbase_MVC_Controller_Argument {
+
+       /**
+        * @var Tx_Extbase_Persistence_QueryFactory
+        */
+       protected $queryFactory;
+
+       /**
+        * @var Tx_Extbase_Property_Mapper
+        */
+       protected $propertyMapper;
+
+       /**
+        * @var Tx_Extbase_Reflection_Service
+        */
+       protected $reflectionService;
+
+       /**
+        * 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 = NULL;
+
+       /**
+        * If the data type is an object, the class schema of the data type class is resolved
+        * @var Tx_Extbase_Reflection_ClassSchema
+        */
+       protected $dataTypeClassSchema;
+
+       /**
+        * TRUE if this argument is required
+        * @var boolean
+        */
+       protected $isRequired = FALSE;
+
+       /**
+        * Actual value of this argument
+        * @var object
+        */
+       protected $value = NULL;
+
+       /**
+        * Default value. Used if argument is optional.
+        * @var mixed
+        */
+       protected $defaultValue = NULL;
+
+       /**
+        * A custom validator, used supplementary to the base validation
+        * @var Tx_Extbase_Validation_Validator_ValidatorInterface
+        */
+       protected $validator = NULL;
+
+       /**
+        * Uid for the argument, if it has one
+        * @var string
+        */
+       protected $uid = NULL;
+
+       const ORIGIN_CLIENT = 0;
+       const ORIGIN_PERSISTENCE = 1;
+       const ORIGIN_PERSISTENCE_AND_MODIFIED = 2;
+       const ORIGIN_NEWLY_CREATED = 3;
+
+       /**
+        * The origin of the argument value. This is only meaningful after argument mapping.
+        *
+        * One of the ORIGIN_* constants above
+        * @var integer
+        */
+       protected $origin = 0;
+
+       /**
+        * Constructs this controller argument
+        *
+        * @param string $name Name of this argument
+        * @param string $dataType The data type of this argument
+        * @throws InvalidArgumentException if $name is not a string or empty
+        * @api
+        */
+       public function __construct($name, $dataType) {
+               if (!is_string($name)) throw new InvalidArgumentException('$name must be of type string, ' . gettype($name) . ' given.', 1187951688);
+               if (strlen($name) === 0) throw new InvalidArgumentException('$name must be a non-empty string, ' . strlen($name) . ' characters given.', 1232551853);
+               $this->name = $name;
+               $this->dataType = $dataType;
+       }
+
+       /**
+        * Initializes this object
+        *
+        * @return void
+        */
+       public function initializeObject() {
+               $this->reflectionService = t3lib_div::makeInstance('Tx_Extbase_Reflection_Service');
+               $this->propertyMapper = t3lib_div::makeInstance('Tx_Extbase_Property_Mapper');
+               $this->propertyMapper->injectReflectionService($this->reflectionService);
+               $this->dataTypeClassSchema = (strstr($this->dataType, '_') !== FALSE) ? $this->reflectionService->getClassSchema($this->dataType) : NULL;
+       }
+
+       /**
+        * Injects the Persistence Manager
+        *
+        * @param Tx_Extbase_Persistence_ManagerInterface
+        * @return void
+        */
+       public function injectPersistenceManager(Tx_Extbase_Persistence_ManagerInterface $persistenceManager) {
+               $this->persistenceManager = $persistenceManager;
+       }
+
+       /**
+        * Injects a QueryFactory instance
+        *
+        * @param Tx_Extbase_Persistence_QueryFactoryInterface $queryFactory
+        * @return void
+        */
+       public function injectQueryFactory(Tx_Extbase_Persistence_QueryFactoryInterface $queryFactory) {
+               $this->queryFactory = $queryFactory;
+       }
+
+       /**
+        * Returns the name of this argument
+        *
+        * @return string This argument's name
+        * @api
+        */
+       public function getName() {
+               return $this->name;
+       }
+
+       /**
+        * Sets the short name of this argument.
+        *
+        * @param string $shortName A "short name" - a single character
+        * @return Tx_Extbase_MVC_Controller_Argument $this
+        * @throws InvalidArgumentException if $shortName is not a character
+        * @api
+        */
+       public function setShortName($shortName) {
+               if ($shortName !== NULL && (!is_string($shortName) || 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
+        * @api
+        */
+       public function getShortName() {
+               return $this->shortName;
+       }
+
+       /**
+        * Sets the data type of this argument's value
+        *
+        * @param string $dataType The data type. Can be either a built-in type such as "Text" or "Integer" or a fully qualified object name
+        * @return Tx_Extbase_MVC_Controller_Argument $this
+        * @api
+        */
+       public function setDataType($dataType) {
+               $this->dataType = $dataType;
+               $this->dataTypeClassSchema = $this->reflectionService->getClassSchema($dataType);
+               return $this;
+       }
+
+       /**
+        * Returns the data type of this argument's value
+        *
+        * @return string The data type
+        * @api
+        */
+       public function getDataType() {
+               return $this->dataType;
+       }
+
+       /**
+        * Marks this argument to be required
+        *
+        * @param boolean $required TRUE if this argument should be required
+        * @return Tx_Extbase_MVC_Controller_Argument $this
+        * @api
+        */
+       public function setRequired($required) {
+               $this->isRequired = (boolean)$required;
+               return $this;
+       }
+
+       /**
+        * Returns TRUE if this argument is required
+        *
+        * @return boolean TRUE if this argument is required
+        * @api
+        */
+       public function isRequired() {
+               return $this->isRequired;
+       }
+
+       /**
+        * Sets the default value of the argument
+        *
+        * @param mixed $defaultValue Default value
+        * @return void
+        * @api
+        */
+       public function setDefaultValue($defaultValue) {
+               $this->defaultValue = $defaultValue;
+       }
+
+       /**
+        * Returns the default value of this argument
+        *
+        * @return mixed The default value
+        * @api
+        */
+       public function getDefaultValue() {
+               return $this->defaultValue;
+       }
+
+       /**
+        * Sets a custom validator which is used supplementary to the base validation
+        *
+        * @param Tx_Extbase_Validation_Validator_ValidatorInterface $validator The actual validator object
+        * @return Tx_Extbase_MVC_Controller_Argument Returns $this (used for fluent interface)
+        * @api
+        */
+       public function setValidator(Tx_Extbase_Validation_Validator_ValidatorInterface $validator) {
+               $this->validator = $validator;
+               return $this;
+       }
+
+       /**
+        * Create and set a validator chain
+        *
+        * @param array Object names of the validators
+        * @return Tx_Extbase_MVC_Controller_Argument Returns $this (used for fluent interface)
+        * @api
+        */
+       public function setNewValidatorConjunction(array $objectNames) {
+               if ($this->validator === NULL) {
+                       $this->validator = t3lib_div::makeInstance('Tx_Extbase_Validation_Validator_ConjunctionValidator');
+               }
+               foreach ($objectNames as $objectName) {
+                       if (!class_exists($objectName)) $objectName = 'Tx_Extbase_Validation_Validator_' . $objectName;
+                       $this->validator->addValidator(t3lib_div::makeInstance($objectName));
+               }
+               return $this;
+       }
+
+       /**
+        * Returns the set validator
+        *
+        * @return Tx_Extbase_Validation_Validator_ValidatorInterface The set validator, NULL if none was set
+        * @api
+        */
+       public function getValidator() {
+               return $this->validator;
+       }
+
+       /**
+        * Get the origin of the argument value. This is only meaningful after argument mapping.
+        *
+        * @return integer one of the ORIGIN_* constants
+        * @author Sebastian Kurfürst <sebastian@typo3.org>
+        */
+       public function getOrigin() {
+               return $this->origin;
+       }
+
+       /**
+        * Sets the value of this argument.
+        *
+        * @param mixed $value: The value of this argument
+        * @return Tx_Extbase_MVC_Controller_Argument $this
+        * @throws Tx_Extbase_MVC_Exception_InvalidArgumentValue if the argument is not a valid object of type $dataType
+        */
+       public function setValue($value) {
+               $this->value = $this->transformValue($value);
+
+               return $this;
+       }
+
+       /**
+        * Checks if the value is a UUID or an array but should be an object, i.e.
+        * the argument's data type class schema is set. If that is the case, this
+        * method tries to look up the corresponding object instead.
+        *
+        * Additionally, it maps arrays to objects in case it is a normal object.
+        *
+        * @param mixed $value The value of an argument
+        * @return mixed
+        */
+       protected function transformValue($value) {
+               if ($value === NULL) {
+                       return NULL;
+               }
+               if (!class_exists($this->dataType)) {
+                       return $value;
+               }
+               $transformedValue = NULL;
+               if ($this->dataTypeClassSchema !== NULL) {
+                       // The target object is an Entity or ValueObject.
+                       if (is_numeric($value)) {
+                               $this->origin = self::ORIGIN_PERSISTENCE;
+                               $transformedValue = $this->findObjectByUid($value);
+                       } elseif (is_array($value)) {
+                               $this->origin = self::ORIGIN_PERSISTENCE_AND_MODIFIED;
+                               $transformedValue = $this->propertyMapper->map(array_keys($value), $value, $this->dataType);
+                       }
+               } else {
+                       if (!is_array($value)) {
+                               throw new Tx_Extbase_MVC_Exception_InvalidArgumentValue('The value was a simple type, so we could not map it to an object. Maybe the @entity or @valueobject annotations are missing?', 1251730701);
+                       }
+                       $this->origin = self::ORIGIN_NEWLY_CREATED;
+                       $transformedValue = $this->propertyMapper->map(array_keys($value), $value, $this->dataType);
+               }
+
+               if (!($transformedValue instanceof $this->dataType)) {
+                       throw new Tx_Extbase_MVC_Exception_InvalidArgumentValue('The value must be of type "' . $this->dataType . '", but was of type "' . (is_object($transformedValue) ? get_class($transformedValue) : gettype($transformedValue)) . '".', 1251730701);
+               }
+               return $transformedValue;
+       }
+
+       /**
+        * Finds an object from the repository by searching for its technical UID.
+        *
+        * @param int $uid The object's uid
+        * @return mixed Either the object matching the uid or, if none or more than one object was found, FALSE
+        */
+       protected function findObjectByUid($uid) {
+               $query = $this->queryFactory->create($this->dataType);
+               $query->getQuerySettings()->setRespectSysLanguage(FALSE);
+               $result = $query->matching($query->equals('uid', $uid))->execute();
+               $object = NULL;
+               if (count($result) > 0) {
+                       $object = current($result);
+               }
+               return $object;
+       }
+
+       /**
+        * Returns the value of this argument
+        *
+        * @return object The value of this argument - if none was set, NULL is returned
+        * @api
+        */
+       public function getValue() {
+               if ($this->value === NULL) {
+                       return $this->defaultValue;
+               } else {
+                       return $this->value;
+               }
+       }
+
+       /**
+        * Checks if this argument has a value set.
+        *
+        * @return boolean TRUE if a value was set, otherwise FALSE
+        */
+       public function isValue() {
+               return $this->value !== NULL;
+       }
+
+       /**
+        * Returns a string representation of this argument's value
+        *
+        * @return string
+        * @api
+        */
+       public function __toString() {
+               return (string)$this->value;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Controller/ArgumentError.php b/typo3/sysext/extbase/Classes/MVC/Controller/ArgumentError.php
new file mode 100644 (file)
index 0000000..4381d41
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+
+/**
+ * This object holds validation errors for one argument.
+ *
+ * @package Extbase
+ * @subpackage MVC\Controller
+ * @version $Id: ArgumentError.php 1729 2009-11-25 21:37:20Z stucki $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope prototype
+ */
+class Tx_Extbase_MVC_Controller_ArgumentError extends Tx_Extbase_Validation_PropertyError {
+
+       /**
+        * @var string The default (english) error message.
+        */
+       protected $message = 'Validation errors for argument "%s"';
+
+       /**
+        * @var string The error code
+        */
+       protected $code = 1245107351;
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Controller/Arguments.php b/typo3/sysext/extbase/Classes/MVC/Controller/Arguments.php
new file mode 100644 (file)
index 0000000..b016f39
--- /dev/null
@@ -0,0 +1,289 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A composite of controller arguments
+ *
+ * @package Extbase
+ * @subpackage MVC\Controller
+ * @version $ID:$
+ * @scope prototype
+ */
+class Tx_Extbase_MVC_Controller_Arguments extends ArrayObject {
+
+       /**
+        * @var Tx_Extbase_Persistence_ManagerInterface
+        */
+       protected $persistenceManager;
+
+       /**
+        * @var Tx_Extbase_Persistence_QueryFactory
+        */
+       protected $queryFactory;
+
+       /**
+        * @var array Names of the arguments contained by this object
+        */
+       protected $argumentNames = array();
+
+       /**
+        * Injects the persistence manager
+        *
+        * @param Tx_Extbase_Persistence_ManagerInterface $persistenceManager
+        * @return void
+        */
+       public function injectPersistenceManager(Tx_Extbase_Persistence_ManagerInterface $persistenceManager) {
+               $this->persistenceManager = $persistenceManager;
+       }
+
+       /**
+        * Injects a QueryFactory instance
+        *
+        * @param Tx_Extbase_Persistence_QueryFactoryInterface $queryFactory
+        * @return void
+        */
+       public function injectQueryFactory(Tx_Extbase_Persistence_QueryFactoryInterface $queryFactory) {
+               $this->queryFactory = $queryFactory;
+       }
+
+       /**
+        * 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
+        */
+       public function offsetSet($offset, $value) {
+               if (!$value instanceof Tx_Extbase_MVC_Controller_Argument) throw new InvalidArgumentException('Controller arguments must be valid Tx_Extbase_MVC_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
+        */
+       public function append($value) {
+               if (!$value instanceof Tx_Extbase_MVC_Controller_Argument) throw new InvalidArgumentException('Controller arguments must be valid Tx_Extbase_MVC_Controller_Argument objects.', 1187953786);
+               $this->offsetSet(NULL, $value);
+       }
+
+       /**
+        * Unsets an argument
+        *
+        * @param mixed $offset Offset
+        * @return void
+        */
+       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
+        */
+       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_Extbase_MVC_Controller_Argument The requested argument object
+        * @throws Tx_Extbase_MVC_Exception_NoSuchArgument if the argument does not exist
+        */
+       public function offsetGet($offset) {
+               $translatedOffset = $this->translateToLongArgumentName($offset);
+               if ($translatedOffset === '') throw new Tx_Extbase_MVC_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.
+        *
+        * @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
+        * @param mixed $defaultValue Default value of the argument. Only makes sense if $isRequired==FALSE
+        * @return Tx_Extbase_MVC_Controller_Argument The new argument
+        */
+       public function addNewArgument($name, $dataType = 'Text', $isRequired = FALSE, $defaultValue = NULL) {
+               $argument = $this->createArgument($name, $dataType);
+               $argument->setRequired($isRequired);
+               $argument->setDefaultValue($defaultValue);
+               $this->addArgument($argument);
+               return $argument;
+       }
+       
+       /**
+        * Creates a new argument. This is a replacement for $this->objectFactory->create() of FLOW3.
+        *
+        * @param string $name Name of the argument
+        * @param string $dataType Name of one of the built-in data types
+        * @return Tx_Extbase_MVC_Controller_Argument The created argument
+        */
+       protected function createArgument($name, $dataType) {
+               $argument = new Tx_Extbase_MVC_Controller_Argument($name, $dataType);
+               $argument->injectPersistenceManager($this->persistenceManager);
+               $argument->injectQueryFactory($this->queryFactory);
+               $argument->initializeObject();
+               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_Extbase_MVC_Controller_Argument $argument The argument to add
+        * @return void
+        */
+       public function addArgument(Tx_Extbase_MVC_Controller_Argument $argument) {
+               $this->offsetSet(NULL, $argument);
+       }
+
+       /**
+        * Returns an argument specified by name
+        *
+        * @param string $argumentName Name of the argument to retrieve
+        * @return Tx_Extbase_MVC_Controller_Argument
+        * @throws Tx_Extbase_MVC_Exception_NoSuchArgument
+        */
+       public function getArgument($argumentName) {
+               if (!$this->offsetExists($argumentName)) throw new Tx_Extbase_MVC_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()
+        */
+       public function hasArgument($argumentName) {
+               return $this->offsetExists($argumentName);
+       }
+
+       /**
+        * Returns the names of all arguments contained in this object
+        *
+        * @return array Argument names
+        */
+       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
+        */
+       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
+        */
+       public function __call($methodName, array $arguments) {
+               if (substr($methodName, 0, 3) !== 'set') throw new LogicException('Unknown method "' . $methodName . '".', 1210858451);
+
+               $firstLowerCaseArgumentName = $this->translateToLongArgumentName(strtolower($methodName{3}) . substr($methodName, 4));
+               $firstUpperCaseArgumentName = $this->translateToLongArgumentName(ucfirst(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
+        */
+       protected function translateToLongArgumentName($argumentName) {
+               if (in_array($argumentName, $this->getArgumentNames())) return $argumentName;
+
+               foreach ($this as $argument) {
+                       if ($argumentName === $argument->getShortName()) return $argument->getName();
+               }
+               return '';
+       }
+
+       /**
+        * Remove all arguments and resets this object
+        *
+        * @return void
+        */
+       public function removeAll() {
+               foreach ($this->argumentNames as $argumentName => $booleanValue) {
+                       parent::offsetUnset($argumentName);
+               }
+               $this->argumentNames = array();
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Controller/ArgumentsValidator.php b/typo3/sysext/extbase/Classes/MVC/Controller/ArgumentsValidator.php
new file mode 100644 (file)
index 0000000..847c7a9
--- /dev/null
@@ -0,0 +1,114 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A validator for controller arguments
+ *
+ * @package Extbase
+ * @subpackage MVC\Controller
+ * @version $ID:$
+ * @scope prototype
+ */
+class Tx_Extbase_MVC_Controller_ArgumentsValidator extends Tx_Extbase_Validation_Validator_AbstractObjectValidator {
+
+       /**
+        * Checks if the given value (ie. an Arguments object) is valid.
+        *
+        * If at least one error occurred, the result is FALSE and any errors can
+        * be retrieved through the getErrors() method.
+        *
+        * @param object $arguments The arguments object that should be validated
+        * @return boolean TRUE if all arguments are valid, FALSE if an error occured
+        */
+       public function isValid($arguments) {
+               if (!$arguments instanceof Tx_Extbase_MVC_Controller_Arguments) throw new InvalidArgumentException('Expected Tx_Extbase_MVC_Controller_Arguments, ' . gettype($arguments) . ' given.', 1241079561);
+               $this->errors = array();
+
+               $result = TRUE;
+               foreach ($arguments->getArgumentNames() as $argumentName) {
+                       if ($this->isPropertyValid($arguments, $argumentName) === FALSE) {
+                               $result = FALSE;
+                       }
+               }
+               return $result;
+       }
+
+       /**
+        * Checks the given object can be validated by the validator implementation
+        *
+        * @param object $object The object to be checked
+        * @return boolean TRUE if this validator can validate instances of the given object or FALSE if it can't
+        */
+       public function canValidate($object) {
+               return ($object instanceof Tx_Extbase_MVC_Controller_Arguments);
+       }
+
+       /**
+        * Checks if the specified property (ie. the argument) of the given arguments
+        * object is valid. Validity is checked by first invoking the validation chain
+        * defined in the argument object.
+        *
+        * If at least one error occurred, the result is FALSE.
+        *
+        * @param object $arguments The arguments object containing the property (argument) to validate
+        * @param string $argumentName Name of the property (ie. name of the argument) to validate
+        * @return boolean TRUE if the argument is valid, FALSE if an error occured
+        */
+       public function isPropertyValid($arguments, $argumentName) {
+               if (!$arguments instanceof Tx_Extbase_MVC_Controller_Arguments) throw new InvalidArgumentException('Expected Tx_Extbase_MVC_Controller_Arguments, ' . gettype($arguments) . ' given.', 1241079562);
+               $argument = $arguments[$argumentName];
+
+               $validatorConjunction = $argument->getValidator();
+               if ($validatorConjunction === NULL) return TRUE;
+
+               $argumentValue = $argument->getValue();
+               if ($argumentValue === $argument->getDefaultValue() && $argument->isRequired() === FALSE) return TRUE;
+
+               if ($validatorConjunction->isValid($argumentValue) === FALSE) {
+                       $this->addErrorsForArgument($validatorConjunction->getErrors(), $argumentName);
+                       return FALSE;
+               }
+               return TRUE;
+       }
+
+       /**
+        * Adds the given errors to $this->errors and creates an ArgumentError
+        * instance if needed.
+        *
+        * @param array $errors Array of \F3\FLOW3\Validation\Error
+        * @param string $argumentName Name of the argument to add errors for
+        * @return void
+        */
+       protected function addErrorsForArgument(array $errors, $argumentName) {
+               if (!isset($this->errors[$argumentName])) {
+                       $this->errors[$argumentName] = t3lib_div::makeInstance('Tx_Extbase_MVC_Controller_ArgumentError', $argumentName);
+               }
+               $this->errors[$argumentName]->addErrors($errors);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Controller/ControllerContext.php b/typo3/sysext/extbase/Classes/MVC/Controller/ControllerContext.php
new file mode 100644 (file)
index 0000000..73dceca
--- /dev/null
@@ -0,0 +1,196 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * The controller context contains information from the controller
+ *
+ * @package Extbase
+ * @subpackage MVC\Controller
+ * @version $Id: ControllerContext.php 2227 2010-04-16 08:33:35Z sebastian $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope prototype
+ * @api
+ */
+class Tx_Extbase_MVC_Controller_ControllerContext {
+
+       /**
+        * @var Tx_Extbase_MVC_Request
+        */
+       protected $request;
+
+       /**
+        * @var Tx_Extbase_MVC_Response
+        */
+       protected $response;
+
+       /**
+        * @var Tx_Extbase_MVC_Controller_Arguments
+        */
+       protected $arguments;
+
+       /**
+        * @var Tx_Extbase_Property_MappingResults
+        */
+       protected $argumentsMappingResults;
+
+       /**
+        * @var Tx_Extbase_MVC_Web_Routing_UriBuilder
+        */
+       protected $uriBuilder;
+
+       /**
+        * @var Tx_Extbase_MVC_Controller_FlashMessages
+        */
+       protected $flashMessageContainer;
+
+       /**
+        * Set the request of the controller
+        *
+        * @param Tx_Extbase_MVC_Request $request
+        * @return void
+        */
+       public function setRequest(Tx_Extbase_MVC_Request $request) {
+               $this->request = $request;
+       }
+
+       /**
+        * Get the request of the controller
+        *
+        * @return Tx_Extbase_MVC_Request
+        * @api
+        */
+       public function getRequest() {
+               return $this->request;
+       }
+
+       /**
+        * Set the response of the controller
+        *
+        * @param Tx_Extbase_MVC_Response $request
+        * @return void
+        */
+       public function setResponse(Tx_Extbase_MVC_Response $response) {
+               $this->response = $response;
+       }
+
+       /**
+        * Get the response of the controller
+        *
+        * @return Tx_Extbase_MVC_Request
+        * @api
+        */
+       public function getResponse() {
+               return $this->response;
+       }
+
+       /**
+        * Set the arguments of the controller
+        *
+        * @param Tx_Extbase_MVC_Controller_Arguments $arguments
+        * @return void
+        */
+       public function setArguments(Tx_Extbase_MVC_Controller_Arguments $arguments) {
+               $this->arguments = $arguments;
+       }
+
+       /**
+        * Get the arguments of the controller
+        *
+        * @return Tx_Extbase_MVC_Controller_Arguments
+        * @api
+        */
+       public function getArguments() {
+               return $this->arguments;
+       }
+
+       /**
+        * Set the arguments mapping results of the controller
+        *
+        * @param Tx_Extbase_Property_MappingResults $argumentsMappingResults
+        * @return void
+        */
+       public function setArgumentsMappingResults(Tx_Extbase_Property_MappingResults $argumentsMappingResults) {
+               $this->argumentsMappingResults = $argumentsMappingResults;
+       }
+
+       /**
+        * Get the arguments mapping results of the controller
+        *
+        * @return Tx_Extbase_Property_MappingResults
+        * @api
+        */
+       public function getArgumentsMappingResults() {
+               return $this->argumentsMappingResults;
+       }
+
+       /**
+        * Tx_Extbase_MVC_Web_Routing_UriBuilder $uriBuilder
+        * @return void
+        */
+       public function setUriBuilder(Tx_Extbase_MVC_Web_Routing_UriBuilder $uriBuilder) {
+               $this->uriBuilder = $uriBuilder;
+       }
+
+       /**
+        * @return Tx_Extbase_MVC_Web_Routing_UriBuilder
+        * @api
+        */
+       public function getUriBuilder() {
+               return $this->uriBuilder;
+       }
+
+       /**
+        * Set the flash messages
+        *
+        * @param Tx_Extbase_MVC_Controller_FlashMessages $flashMessages
+        * @return void
+        */
+       public function setFlashMessageContainer(Tx_Extbase_MVC_Controller_FlashMessages $flashMessageContainer) {
+               $this->flashMessageContainer = $flashMessageContainer;
+       }
+
+       /**
+        * Get the flash messages
+        *
+        * @return Tx_Extbase_MVC_Controller_FlashMessages
+        * @deprecated
+        */
+       public function getFlashMessages() {
+               return $this->flashMessageContainer;
+       }
+
+       /**
+        * Get the flash messages
+        *
+        * @return Tx_Extbase_MVC_Controller_FlashMessages
+        * @api
+        */
+       public function getFlashMessageContainer() {
+               return $this->flashMessageContainer;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Controller/ControllerInterface.php b/typo3/sysext/extbase/Classes/MVC/Controller/ControllerInterface.php
new file mode 100644 (file)
index 0000000..d4bd200
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * Interface for controllers
+ *
+ * @package Extbase
+ * @subpackage MVC\Controller
+ * @version $ID:$
+ * @api
+ */
+interface Tx_Extbase_MVC_Controller_ControllerInterface {
+
+       /**
+        * Sets / injects the settings of the package this controller belongs to.
+        *
+        * Needed to emulate settings injection.
+        *
+        * @param array $settings Settings container of the current package
+        * @return void
+        */
+       public function injectSettings(array $settings);
+
+       /**
+        * Checks if the current request type is supported by the controller.
+        *
+        * @param Tx_Extbase_MVC_Request $request The current request
+        * @return boolean TRUE if this request type is supported, otherwise FALSE
+        * @api
+        */
+       public function canProcessRequest(Tx_Extbase_MVC_Request $request);
+
+       /**
+        * Processes a general request. The result can be returned by altering the given response.
+        *
+        * @param Tx_Extbase_MVC_Request $request The request object
+        * @param Tx_Extbase_MVC_Response $response The response, modified by the controller
+        * @return void
+        * @throws Tx_Extbase_MVC_Exception_UnsupportedRequestType if the controller doesn't support the current request type
+        * @api
+        */
+       public function processRequest(Tx_Extbase_MVC_Request $request, Tx_Extbase_MVC_Response $response);
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Controller/FlashMessages.php b/typo3/sysext/extbase/Classes/MVC/Controller/FlashMessages.php
new file mode 100644 (file)
index 0000000..c4392b2
--- /dev/null
@@ -0,0 +1,170 @@
+<?php
+
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Sebastian Kurfürst <sebastian@typo3.org>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * This is a container for all Flash Messages. It is of scope session, but as Extbase
+ * has no session scope, we need to save it manually.
+ *
+ * @version $Id: FlashMessages.php 1729 2009-11-25 21:37:20Z stucki $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @scope session
+ * @api
+ */
+class Tx_Extbase_MVC_Controller_FlashMessages implements t3lib_Singleton {
+
+       /**
+        * The array of flash messages
+        * @var array<string>
+        */
+       protected $flashMessages = array();
+
+       /**
+        * If FALSE, flash message container still needs to be initialized.
+        * @var boolean
+        */
+       protected $initialized = FALSE;
+
+       /**
+        * The key from which the flash messages should be retrieved.
+        * We have to incorporate the PluginKey and the Extension Key in here, to make
+        * it working when multiple plugins are on the same page.
+        * @var string
+        */
+       protected $flashMessageStorageKey = NULL;
+
+       /**
+        * Add another flash message.
+        *
+        * @param string $message
+        * @return void
+        * @api
+        */
+       public function add($message) {
+               if (!is_string($message)) throw new InvalidArgumentException('The flash message must be string, ' . gettype($message) . ' given.', 1243258395);
+               $this->initialize();
+               $this->flashMessages[] = $message;
+       }
+
+       /**
+        * Get all flash messages currently available.
+        *
+        * @return array<string> An array of flash messages
+        * @api
+        */
+       public function getAll() {
+               $this->initialize();
+               return $this->flashMessages;
+       }
+
+       /**
+        * Reset all flash messages.
+        *
+        * @return void
+        * @api
+        */
+       public function flush() {
+               $this->initialize();
+               $this->flashMessages = array();
+       }
+
+       /**
+        * Get all flash messages currently available and delete them afterwards.
+        *
+        * @return array<string>
+        * @api
+        */
+       public function getAllAndFlush() {
+               $this->initialize();
+               $flashMessages = $this->flashMessages;
+               $this->flashMessages = array();
+               return $flashMessages;
+       }
+
+       /**
+        * Initialize the flash message
+        */
+       protected function initialize() {
+               if ($this->initialized) return;
+
+               $frameworkConfiguration = Tx_Extbase_Dispatcher::getExtbaseFrameworkConfiguration();
+               $this->flashMessageStorageKey = 'Tx_Extbase_MVC_Controller_FlashMessages_messages_' . $frameworkConfiguration['extensionName'] . $frameworkConfiguration['pluginName'];
+
+               $flashMessages = $this->loadFlashMessagesFromSession();
+               if (is_array($flashMessages)) {
+                       $this->flashMessages = $flashMessages;
+               }
+
+               $this->initialized = TRUE;
+       }
+
+       /**
+        * Loads the flash messages from the current user session.
+        */
+       protected function loadFlashMessagesFromSession() {
+               $flashMessages = NULL;
+               if (TYPO3_MODE === 'FE') {
+                       $flashMessages = $GLOBALS['TSFE']->fe_user->getKey('ses', $this->flashMessageStorageKey);
+               } else {
+                       $flashMessages = $GLOBALS['BE_USER']->uc[$this->flashMessageStorageKey];
+                       $GLOBALS['BE_USER']->writeUC();
+               }
+               return $flashMessages;
+       }
+
+       /**
+        * Reset the flash messages. Needs to be called at the beginning of a new rendering,
+        * to account when multiple plugins appear on the same page.
+        */
+       public function reset() {
+               $this->flashMessages = array();
+               $this->initialized = FALSE;
+               $this->flashMessageStorageKey = NULL;
+       }
+
+       /**
+        * Persist the flash messages in the session.
+        */
+       public function persist() {
+               if (!$this->initialized) {
+                       return;
+               }
+               if (TYPO3_MODE === 'FE') {
+                       $GLOBALS['TSFE']->fe_user->setKey(
+                               'ses',
+                               $this->flashMessageStorageKey,
+                               $this->flashMessages
+                       );
+                       $GLOBALS['TSFE']->fe_user->storeSessionData();
+               } else {
+                       $GLOBALS['BE_USER']->uc[$this->flashMessageStorageKey] = $this->flashMessages;
+                       $GLOBALS['BE_USER']->writeUc();
+               }
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception.php b/typo3/sysext/extbase/Classes/MVC/Exception.php
new file mode 100644 (file)
index 0000000..7fa12d0
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A generic MVC exception
+ *
+ * @package Extbase
+ * @subpackage MVC
+ * @version $ID:$
+ */
+class Tx_Extbase_MVC_Exception extends Tx_Extbase_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InfiniteLoop.php b/typo3/sysext/extbase/Classes/MVC/Exception/InfiniteLoop.php
new file mode 100644 (file)
index 0000000..4cb44a6
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Infinite Loop" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InfiniteLoop.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InfiniteLoop extends Tx_Extbase_MVC_Exception {
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidActionName.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidActionName.php
new file mode 100644 (file)
index 0000000..347ad80
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "invalid action name" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidActionName.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidActionName extends Tx_Extbase_MVC_Exception {
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidArgumentName.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidArgumentName.php
new file mode 100644 (file)
index 0000000..a781bbb
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Argument Name" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidArgumentName.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidArgumentName extends Tx_Extbase_MVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidArgumentType.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidArgumentType.php
new file mode 100644 (file)
index 0000000..ae3bb87
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Argument Type" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidArgumentType.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidArgumentType extends Tx_Extbase_MVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidArgumentValue.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidArgumentValue.php
new file mode 100644 (file)
index 0000000..78f13f5
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Argument Value" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidArgumentValue.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidArgumentValue extends Tx_Extbase_MVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidController.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidController.php
new file mode 100644 (file)
index 0000000..edef214
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Controller" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidController.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidController extends Tx_Extbase_MVC_Exception {
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidControllerName.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidControllerName.php
new file mode 100644 (file)
index 0000000..877bc34
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Controller Name" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidControllerName.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidControllerName extends Tx_Extbase_MVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidExtensionName.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidExtensionName.php
new file mode 100644 (file)
index 0000000..c171d56
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Extension Name" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidExtensionName.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidExtensionName extends Tx_Extbase_MVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidMarker.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidMarker.php
new file mode 100644 (file)
index 0000000..dea7eb4
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Marker" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidMarker.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidMarker extends Tx_Extbase_MVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidOrNoRequestHash.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidOrNoRequestHash.php
new file mode 100644 (file)
index 0000000..75fcda1
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Request Method" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidOrNoRequestHash.php 1729 2009-11-25 21:37:20Z stucki $
+ */
+class Tx_Extbase_MVC_Exception_InvalidOrNoRequestHash extends Tx_Extbase_MVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidRequestMethod.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidRequestMethod.php
new file mode 100644 (file)
index 0000000..7a3589c
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Request Method" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidRequestMethod.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidRequestMethod extends Tx_Extbase_MVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidRequestType.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidRequestType.php
new file mode 100644 (file)
index 0000000..9d16bd2
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Request Type" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidRequestType.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidRequestType extends Tx_Extbase_MVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidTemplateResource.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidTemplateResource.php
new file mode 100644 (file)
index 0000000..0b48eaa
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid Template Resource" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidTemplateResource.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidTemplateResource extends Tx_Extbase_MVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidUriPattern.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidUriPattern.php
new file mode 100644 (file)
index 0000000..a8ba7d5
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Invalid URI Pattern" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidUriPattern.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidUriPattern extends Tx_Extbase_MVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/InvalidViewHelper.php b/typo3/sysext/extbase/Classes/MVC/Exception/InvalidViewHelper.php
new file mode 100644 (file)
index 0000000..ef68ca2
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "invalid ViewHelper" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: InvalidViewHelper.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_InvalidViewHelper extends Tx_Extbase_MVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/NoSuchAction.php b/typo3/sysext/extbase/Classes/MVC/Exception/NoSuchAction.php
new file mode 100644 (file)
index 0000000..275967b
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A "No Such Action" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: NoSuchAction.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_NoSuchAction extends Tx_Extbase_MVC_Exception {
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/NoSuchArgument.php b/typo3/sysext/extbase/Classes/MVC/Exception/NoSuchArgument.php
new file mode 100644 (file)
index 0000000..da758d2
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A "No Such Argument" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: NoSuchArgument.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_NoSuchArgument extends Tx_Extbase_MVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/NoSuchController.php b/typo3/sysext/extbase/Classes/MVC/Exception/NoSuchController.php
new file mode 100644 (file)
index 0000000..43e17b1
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * A "No Such Controller" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: NoSuchController.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_NoSuchController extends Tx_Extbase_MVC_Exception {
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/StopAction.php b/typo3/sysext/extbase/Classes/MVC/Exception/StopAction.php
new file mode 100644 (file)
index 0000000..dbb2459
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * 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 redirectToURI() methods for more information.
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: StopAction.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_StopAction extends Tx_Extbase_MVC_Exception {
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Exception/UnsupportedRequestType.php b/typo3/sysext/extbase/Classes/MVC/Exception/UnsupportedRequestType.php
new file mode 100644 (file)
index 0000000..4e20648
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3. 
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * An "Unsupported Request Type" exception
+ *
+ * @package Extbase
+ * @subpackage MVC\Exception
+ * @version $Id: UnsupportedRequestType.php 1052 2009-08-05 21:51:32Z sebastian $
+ */
+class Tx_Extbase_MVC_Exception_UnsupportedRequestType extends Tx_Extbase_MVC_Exception {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Request.php b/typo3/sysext/extbase/Classes/MVC/Request.php
new file mode 100644 (file)
index 0000000..6a3fa7d
--- /dev/null
@@ -0,0 +1,337 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * Represents a generic request.
+ *
+ * @package Extbase
+ * @subpackage MVC
+ * @version $ID:$
+ * @scope prototype
+ * @api
+ */
+class Tx_Extbase_MVC_Request implements Tx_Extbase_MVC_RequestInterface {
+
+       const PATTERN_MATCH_FORMAT = '/^[a-z0-9]{1,5}$/';
+
+       /**
+        * Pattern after which the controller object name is built
+        *
+        * @var string
+        */
+       protected $controllerObjectNamePattern = 'Tx_@extension_Controller_@controllerController';
+
+       /**
+        * @var string Key of the plugin which identifies the plugin. It must be a string containing [a-z0-9]
+        */
+       protected $pluginName = '';
+
+       /**
+        * @var string Name of the extension which is supposed to handle this request. This is the extension name converted to UpperCamelCase
+        */
+       protected $controllerExtensionName = NULL;
+
+       /**
+        * @var string Object name of the controller which is supposed to handle this request.
+        */
+       protected $controllerName = 'Standard';
+
+       /**
+        * @var string Name of the action the controller is supposed to take.
+        */
+       protected $controllerActionName = 'index';
+
+       /**
+        * @var array The arguments for this request
+        */
+       protected $arguments = array();
+
+       /**
+        * @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;
+
+       /**
+        * @var array Errors that occured during this request
+        */
+       protected $errors = array();
+
+       /**
+        * Sets the dispatched flag
+        *
+        * @param boolean $flag If this request has been dispatched
+        * @return void
+        * @api
+        */
+       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
+        * @api
+        */
+       public function isDispatched() {
+               return $this->dispatched;
+       }
+
+       /**
+        * Returns the object name of the controller defined by the extension name and
+        * controller name
+        *
+        * @return string The controller's Object Name
+        * @throws Tx_Extbase_MVC_Exception_NoSuchController if the controller does not exist
+        * @api
+        */
+       public function getControllerObjectName() {
+               $lowercaseObjectName = str_replace('@extension', $this->controllerExtensionName, $this->controllerObjectNamePattern);
+               $lowercaseObjectName = str_replace('@controller', $this->controllerName, $lowercaseObjectName);
+               // TODO implement getCaseSensitiveObjectName()
+               $objectName = $lowercaseObjectName;
+               if ($objectName === FALSE) throw new Tx_Extbase_MVC_Exception_NoSuchController('The controller object "' . $lowercaseObjectName . '" does not exist.', 1220884009);
+
+               return $objectName;
+       }
+
+       /**
+        * Sets the plugin name.
+        *
+        * @param string $extensionName The plugin name.
+        * @return void
+        */
+       public function setPluginName($pluginName = NULL) {
+               if ($pluginName !== NULL) {
+                       $this->pluginName = $pluginName;
+               }
+       }
+
+       /**
+        * Returns the plugin key.
+        *
+        * @return string The plugin key
+        * @api
+        */
+       public function getPluginName() {
+               return $this->pluginName;
+       }
+
+       /**
+        * Sets the extension name of the controller.
+        *
+        * @param string $controllerExtensionName The extension name.
+        * @return void
+        * @throws Tx_Extbase_MVC_Exception_InvalidExtensionName if the extension name is not valid
+        */
+       public function setControllerExtensionName($controllerExtensionName) {
+               if ($controllerExtensionName !== NULL) {
+                       $this->controllerExtensionName = $controllerExtensionName;
+               }
+       }
+
+       /**
+        * Returns the extension name of the specified controller.
+        *
+        * @return string The extension name
+        * @api
+        */
+       public function getControllerExtensionName() {
+               return $this->controllerExtensionName;
+       }
+
+       /**
+        * Returns the extension name of the specified controller.
+        *
+        * @return string The extension key
+        * @api
+        */
+       public function getControllerExtensionKey() {
+               return Tx_Extbase_Utility_Extension::convertCamelCaseToLowerCaseUnderscored($this->controllerExtensionName);
+       }
+
+       /**
+        * 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
+        */
+       public function setControllerName($controllerName) {
+               if (!is_string($controllerName) && $controllerName !== NULL) throw new Tx_Extbase_MVC_Exception_InvalidControllerName('The controller name must be a valid string, ' . gettype($controllerName) . ' given.', 1187176358);
+               if (strpos($controllerName, '_') !== FALSE) throw new Tx_Extbase_MVC_Exception_InvalidControllerName('The controller name must not contain underscores.', 1217846412);
+               if ($controllerName !== NULL) {
+                       $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
+        * @api
+        */
+       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_Extbase_MVC_Exception_InvalidActionName if the action name is not valid
+        */
+       public function setControllerActionName($actionName) {
+               if (!is_string($actionName) && $actionName !== NULL) throw new Tx_Extbase_MVC_Exception_InvalidActionName('The action name must be a valid string, ' . gettype($actionName) . ' given (' . $actionName . ').', 1187176358);
+               if (($actionName{0} !== strtolower($actionName{0})) && $actionName !== NULL) throw new Tx_Extbase_MVC_Exception_InvalidActionName('The action name must start with a lower case letter, "' . $actionName . '" does not match this criteria.', 1218473352);
+               if ($actionName !== NULL) {
+                       $this->controllerActionName = $actionName;
+               }
+       }
+
+       /**
+        * Returns the name of the action the controller is supposed to execute.
+        *
+        * @return string Action name
+        * @api
+        */
+       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
+        */
+       public function setArgument($argumentName, $value) {
+               if (!is_string($argumentName) || strlen($argumentName) == 0) throw new Tx_Extbase_MVC_Exception_InvalidArgumentName('Invalid argument name.', 1210858767);
+               $this->arguments[$argumentName] = $value;
+       }
+
+       /**
+        * Sets the whole arguments array and therefore replaces any arguments
+        * which existed before.
+        *
+        * @param array $arguments An array of argument names and their values
+        * @return void
+        */
+       public function setArguments(array $arguments) {
+               $this->arguments = $arguments;
+       }
+
+       /**
+        * Returns an array of arguments and their values
+        *
+        * @return array Associative array of arguments and their values (which may be arguments and values as well)
+        * @api
+        */
+       public function getArguments() {
+               return $this->arguments;
+       }
+
+       /**
+        * Returns the value of the specified argument
+        *
+        * @param string $argumentName Name of the argument
+        * @return string Value of the argument
+        * @throws Tx_Extbase_MVC_Exception_NoSuchArgument if such an argument does not exist
+        * @api
+        */
+       public function getArgument($argumentName) {
+               if (!isset($this->arguments[$argumentName])) throw new Tx_Extbase_MVC_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
+        * @api
+        */
+       public function hasArgument($argumentName) {
+               return isset($this->arguments[$argumentName]);
+       }
+
+       /**
+        * Sets the requested representation format
+        *
+        * @param string $format The desired format, something like "html", "xml", "png", "json" or the like. Can even be something like "rss.xml".
+        * @return void
+        * @author Robert Lemke <robert@typo3.org>
+        */
+       public function setFormat($format) {
+               $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>
+        * @api
+        */
+       public function getFormat() {
+               return $this->format;
+       }
+
+       /**
+        * Set errors that occured during the request (e.g. argument mapping errors)
+        *
+        * @param array $errors An array of Tx_Extbase_Error_Error objects
+        * @return void
+        */
+       public function setErrors(array $errors) {
+               $this->errors = $errors;
+       }
+
+       /**
+        * Get errors that occured during the request (e.g. argument mapping errors)
+        *
+        * @return array The errors that occured during the request
+        */
+       public function getErrors() {
+               return $this->errors;
+       }
+
+}
diff --git a/typo3/sysext/extbase/Classes/MVC/RequestInterface.php b/typo3/sysext/extbase/Classes/MVC/RequestInterface.php
new file mode 100644 (file)
index 0000000..25761e5
--- /dev/null
@@ -0,0 +1,210 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * Contract for a request.
+ *
+ * @version $Id: RequestInterface.php 1729 2009-11-25 21:37:20Z stucki $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @author Robert Lemke <robert@typo3.org>
+ * @scope prototype
+ * @api
+ */
+interface Tx_Extbase_MVC_RequestInterface {
+
+       /**
+        * Sets the dispatched flag
+        *
+        * @param boolean $flag If this request has been dispatched
+        * @return void
+        * @api
+        */
+       public function setDispatched($flag);
+
+       /**
+        * 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 successfully
+        * @api
+        */
+       public function isDispatched();
+
+       /**
+        * Returns the object name of the controller defined by the package key and
+        * controller name
+        *
+        * @return string The controller's Object Name
+        * @throws Tx_Extbase_MVC_Exception_NoSuchController if the controller does not exist
+        * @api
+        */
+       public function getControllerObjectName();
+
+       /**
+       &n