[TASK] Replace @inject with inject methods in ext:extbase 70/42270/4
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 4 Aug 2015 21:05:39 +0000 (23:05 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Wed, 5 Aug 2015 12:28:53 +0000 (14:28 +0200)
Because of performance reasons we replace
the @inject annotations back to inject methods.

Resolves: #54605
Releases: master
Change-Id: I433e2ecccc2aa319ec8904dbc65b84f63e9959aa
Reviewed-on: http://review.typo3.org/42270
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
53 files changed:
typo3/sysext/extbase/Classes/Command/HelpCommandController.php
typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php
typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php
typo3/sysext/extbase/Classes/Configuration/ConfigurationManager.php
typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php
typo3/sysext/extbase/Classes/Core/ModuleRunner.php
typo3/sysext/extbase/Classes/Mvc/Cli/Command.php
typo3/sysext/extbase/Classes/Mvc/Cli/CommandManager.php
typo3/sysext/extbase/Classes/Mvc/Cli/Request.php
typo3/sysext/extbase/Classes/Mvc/Cli/RequestBuilder.php
typo3/sysext/extbase/Classes/Mvc/Cli/RequestHandler.php
typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php
typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php
typo3/sysext/extbase/Classes/Mvc/Controller/Argument.php
typo3/sysext/extbase/Classes/Mvc/Controller/Arguments.php
typo3/sysext/extbase/Classes/Mvc/Controller/CommandController.php
typo3/sysext/extbase/Classes/Mvc/Controller/ControllerContext.php
typo3/sysext/extbase/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php
typo3/sysext/extbase/Classes/Mvc/Dispatcher.php
typo3/sysext/extbase/Classes/Mvc/RequestHandlerResolver.php
typo3/sysext/extbase/Classes/Mvc/View/JsonView.php
typo3/sysext/extbase/Classes/Mvc/Web/AbstractRequestHandler.php
typo3/sysext/extbase/Classes/Mvc/Web/FrontendRequestHandler.php
typo3/sysext/extbase/Classes/Mvc/Web/Request.php
typo3/sysext/extbase/Classes/Mvc/Web/RequestBuilder.php
typo3/sysext/extbase/Classes/Mvc/Web/Response.php
typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php
typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php
typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php
typo3/sysext/extbase/Classes/Persistence/Generic/LazyObjectStorage.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Persistence/Generic/PersistenceManager.php
typo3/sysext/extbase/Classes/Persistence/Generic/Qom/QueryObjectModelFactory.php
typo3/sysext/extbase/Classes/Persistence/Generic/Query.php
typo3/sysext/extbase/Classes/Persistence/Generic/QueryFactory.php
typo3/sysext/extbase/Classes/Persistence/Generic/QueryResult.php
typo3/sysext/extbase/Classes/Persistence/Generic/Session.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php
typo3/sysext/extbase/Classes/Persistence/Repository.php
typo3/sysext/extbase/Classes/Property/PropertyMapper.php
typo3/sysext/extbase/Classes/Property/TypeConverter/AbstractFileCollectionConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/AbstractFileFolderConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/AbstractTypeConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/ObjectConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/PersistentObjectConverter.php
typo3/sysext/extbase/Classes/Reflection/ReflectionService.php
typo3/sysext/extbase/Classes/Scheduler/TaskExecutor.php
typo3/sysext/extbase/Classes/Service/ExtensionService.php
typo3/sysext/extbase/Classes/Service/ImageService.php
typo3/sysext/extbase/Classes/Validation/Validator/CollectionValidator.php
typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php

index 373f6c2..1a9e728 100644 (file)
@@ -23,7 +23,6 @@ class HelpCommandController extends \TYPO3\CMS\Extbase\Mvc\Controller\CommandCon
 
        /**
         * @var \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager
-        * @inject
         */
        protected $commandManager;
 
@@ -33,6 +32,13 @@ class HelpCommandController extends \TYPO3\CMS\Extbase\Mvc\Controller\CommandCon
        protected $commandsByExtensionsAndControllers = array();
 
        /**
+        * @param \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager $commandManager
+        */
+       public function injectCommandManager(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager $commandManager) {
+               $this->commandManager = $commandManager;
+       }
+
+       /**
         * Displays a short, general help message
         *
         * This only outputs the Extbase version number, context and some hint about how to
index c2e1314..7dd6e03 100644 (file)
@@ -38,13 +38,11 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\TypoScriptService
-        * @inject
         */
        protected $typoScriptService;
 
@@ -71,11 +69,31 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\TypoScriptService $typoScriptService
+        */
+       public function injectTypoScriptService(\TYPO3\CMS\Extbase\Service\TypoScriptService $typoScriptService) {
+               $this->typoScriptService = $typoScriptService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
         * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject
         * @return void
         */
index 1fb3e65..1684720 100644 (file)
@@ -23,7 +23,6 @@ class BackendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abstr
         * Needed to recursively fetch a page tree
         *
         * @var \TYPO3\CMS\Core\Database\QueryGenerator
-        * @inject
         */
        protected $queryGenerator;
 
@@ -39,6 +38,13 @@ class BackendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abstr
        protected $currentPageId;
 
        /**
+        * @param \TYPO3\CMS\Core\Database\QueryGenerator $queryGenerator
+        */
+       public function injectQueryGenerator(\TYPO3\CMS\Core\Database\QueryGenerator $queryGenerator) {
+               $this->queryGenerator = $queryGenerator;
+       }
+
+       /**
         * Returns TypoScript Setup array from current Environment.
         *
         * @return array the raw TypoScript setup
index 0b93e86..d86c904 100644 (file)
@@ -24,7 +24,6 @@ class ConfigurationManager implements \TYPO3\CMS\Extbase\Configuration\Configura
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
@@ -35,11 +34,24 @@ class ConfigurationManager implements \TYPO3\CMS\Extbase\Configuration\Configura
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
         * Initializes the object
         *
         * @return void
index ab6f17a..c32542f 100644 (file)
@@ -23,11 +23,17 @@ class FrontendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abst
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\FlexFormService
-        * @inject
         */
        protected $flexFormService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Service\FlexFormService $flexFormService
+        */
+       public function injectFlexFormService(\TYPO3\CMS\Extbase\Service\FlexFormService $flexFormService) {
+               $this->flexFormService = $flexFormService;
+       }
+
+       /**
         * Returns TypoScript Setup array from current Environment.
         *
         * @return array the raw TypoScript setup
index 2ab71b3..767c7cf 100644 (file)
@@ -21,11 +21,17 @@ class ModuleRunner implements ModuleRunnerInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManager
-        * @inject
         */
        protected $objectManager;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManager $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
         * This method forwards the call to Bootstrap's run() method. This method is invoked by the BackendModuleRequestHandler
         * function of TYPO3.
         *
index 41ebbfc..fc8bf76 100644 (file)
@@ -23,7 +23,6 @@ class Command {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
@@ -55,14 +54,25 @@ class Command {
        protected $extensionName;
 
        /**
-        * Reflection service
-        *
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
         * Constructor
         *
         * @param string $controllerClassName Class name of the controller providing the command
index be9f68a..7a4481b 100644 (file)
@@ -23,7 +23,6 @@ class CommandManager implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
@@ -38,6 +37,13 @@ class CommandManager implements \TYPO3\CMS\Core\SingletonInterface {
        protected $shortCommandIdentifiers = NULL;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
         * Returns an array of all commands
         *
         * @return Command[]
index 84c1496..4869e08 100644 (file)
@@ -24,7 +24,6 @@ class Request implements \TYPO3\CMS\Extbase\Mvc\RequestInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
@@ -78,6 +77,13 @@ class Request implements \TYPO3\CMS\Extbase\Mvc\RequestInterface {
        protected $callingScript;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
         * @param string $callingScript
         */
        public function setCallingScript($callingScript) {
index c13bfe1..7de74b7 100644 (file)
@@ -23,29 +23,53 @@ class RequestBuilder implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
        /**
         * @var \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager
-        * @inject
         */
        protected $commandManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager $commandManager
+        */
+       public function injectCommandManager(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager $commandManager) {
+               $this->commandManager = $commandManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
         * Builds a CLI request object from a command line.
         *
         * The given command line may be a string (e.g. "myextension:foo do-that-thing --force") or
index 05fd05d..42195d5 100644 (file)
@@ -23,29 +23,53 @@ class RequestHandler implements \TYPO3\CMS\Extbase\Mvc\RequestHandlerInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Mvc\Dispatcher
-        * @inject
         */
        protected $dispatcher;
 
        /**
         * @var \TYPO3\CMS\Extbase\Mvc\Cli\RequestBuilder
-        * @inject
         */
        protected $requestBuilder;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Mvc\Dispatcher $dispatcher
+        */
+       public function injectDispatcher(\TYPO3\CMS\Extbase\Mvc\Dispatcher $dispatcher) {
+               $this->dispatcher = $dispatcher;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Mvc\Cli\RequestBuilder $requestBuilder
+        */
+       public function injectRequestBuilder(\TYPO3\CMS\Extbase\Mvc\Cli\RequestBuilder $requestBuilder) {
+               $this->requestBuilder = $requestBuilder;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
         * Handles the request
         *
         * @return \TYPO3\CMS\Extbase\Mvc\ResponseInterface
index fd42d3e..872da5e 100644 (file)
@@ -28,7 +28,6 @@ abstract class AbstractController implements ControllerInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
-        * @inject
         */
        protected $signalSlotDispatcher;
 
@@ -73,7 +72,6 @@ abstract class AbstractController implements ControllerInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Validation\ValidatorResolver
-        * @inject
         */
        protected $validatorResolver;
 
@@ -83,6 +81,20 @@ abstract class AbstractController implements ControllerInterface {
        protected $arguments;
 
        /**
+        * @param \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher
+        */
+       public function injectSignalSlotDispatcher(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher) {
+               $this->signalSlotDispatcher = $signalSlotDispatcher;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Validation\ValidatorResolver $validatorResolver
+        */
+       public function injectValidatorResolver(\TYPO3\CMS\Extbase\Validation\ValidatorResolver $validatorResolver) {
+               $this->validatorResolver = $validatorResolver;
+       }
+
+       /**
         * 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.
index 72e7f62..85c0e66 100644 (file)
@@ -31,13 +31,11 @@ class ActionController extends AbstractController {
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\CacheService
-        * @inject
         */
        protected $cacheService;
 
@@ -93,7 +91,6 @@ class ActionController extends AbstractController {
 
        /**
         * @var \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService
-        * @inject
         * @api
         */
        protected $mvcPropertyMappingConfigurationService;
@@ -115,6 +112,27 @@ class ActionController extends AbstractController {
        protected $response;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\CacheService $cacheService
+        */
+       public function injectCacheService(\TYPO3\CMS\Extbase\Service\CacheService $cacheService) {
+               $this->cacheService = $cacheService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
+        */
+       public function injectMvcPropertyMappingConfigurationService(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService) {
+               $this->mvcPropertyMappingConfigurationService = $mvcPropertyMappingConfigurationService;
+       }
+
+       /**
         * Handles a request. The result output is returned by altering the given response.
         *
         * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request The request object
index 056b10a..0661892 100644 (file)
@@ -25,13 +25,11 @@ class Argument {
 
        /**
         * @var \TYPO3\CMS\Extbase\Property\PropertyMapper
-        * @inject
         */
        protected $propertyMapper;
 
        /**
-        * @var \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration
-        * @inject
+        * @var MvcPropertyMappingConfiguration
         */
        protected $propertyMappingConfiguration;
 
@@ -92,6 +90,20 @@ class Argument {
        protected $validationResults = NULL;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Property\PropertyMapper $propertyMapper
+        */
+       public function injectPropertyMapper(\TYPO3\CMS\Extbase\Property\PropertyMapper $propertyMapper) {
+               $this->propertyMapper = $propertyMapper;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration $propertyMappingConfiguration
+        */
+       public function injectPropertyMappingConfiguration(MvcPropertyMappingConfiguration $propertyMappingConfiguration) {
+               $this->propertyMappingConfiguration = $propertyMappingConfiguration;
+       }
+
+       /**
         * Constructs this controller argument
         *
         * @param string $name Name of this argument
index c804918..9e7b89c 100644 (file)
@@ -21,7 +21,6 @@ class Arguments extends \ArrayObject {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
@@ -36,6 +35,13 @@ class Arguments extends \ArrayObject {
        protected $argumentShortNames = array();
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
         * Constructor. If this one is removed, reflection breaks.
         */
        public function __construct() {
index 0fb18d9..15ae844 100644 (file)
@@ -76,7 +76,6 @@ class CommandController implements CommandControllerInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
@@ -102,6 +101,13 @@ class CommandController implements CommandControllerInterface {
        }
 
        /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
         * Checks if the current request type is supported by the controller.
         *
         * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request The current request
index 5fb8bf3..9ed48b1 100644 (file)
@@ -49,17 +49,29 @@ class ControllerContext {
 
        /**
         * @var \TYPO3\CMS\Core\Messaging\FlashMessageService
-        * @inject
         */
        protected $flashMessageService;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\ExtensionService
-        * @inject
         */
        protected $extensionService;
 
        /**
+        * @param \TYPO3\CMS\Core\Messaging\FlashMessageService $flashMessageService
+        */
+       public function injectFlashMessageService(\TYPO3\CMS\Core\Messaging\FlashMessageService $flashMessageService) {
+               $this->flashMessageService = $flashMessageService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\ExtensionService $extensionService
+        */
+       public function injectExtensionService(\TYPO3\CMS\Extbase\Service\ExtensionService $extensionService) {
+               $this->extensionService = $extensionService;
+       }
+
+       /**
         * Set the request of the controller
         *
         * @param \TYPO3\CMS\Extbase\Mvc\Request $request
index f1e1f3f..b409f65 100644 (file)
@@ -36,11 +36,17 @@ class MvcPropertyMappingConfigurationService implements \TYPO3\CMS\Core\Singleto
         * The hash service class to use
         *
         * @var \TYPO3\CMS\Extbase\Security\Cryptography\HashService
-        * @inject
         */
        protected $hashService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Security\Cryptography\HashService $hashService
+        */
+       public function injectHashService(\TYPO3\CMS\Extbase\Security\Cryptography\HashService $hashService) {
+               $this->hashService = $hashService;
+       }
+
+       /**
         * Generate a request hash for a list of form fields
         *
         * @param array $formFieldNames Array of form fields
index 0a47272..c105749 100644 (file)
@@ -27,13 +27,11 @@ class Dispatcher implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
        /**
         * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
-        * @inject
         */
        protected $signalSlotDispatcher;
 
@@ -43,6 +41,20 @@ class Dispatcher implements \TYPO3\CMS\Core\SingletonInterface {
        protected $settings = array();
 
        /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher
+        */
+       public function injectSignalSlotDispatcher(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher) {
+               $this->signalSlotDispatcher = $signalSlotDispatcher;
+       }
+
+       /**
         * Constructs the global dispatcher
         *
         * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager A reference to the object manager
index a06e0a3..f2dc06a 100644 (file)
@@ -21,23 +21,41 @@ class RequestHandlerResolver {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
         * Analyzes the raw request and tries to find a request handler which can handle
         * it. If none is found, an exception is thrown.
         *
index c3dd0c0..7c76769 100644 (file)
@@ -42,7 +42,6 @@ class JsonView extends AbstractView {
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
@@ -160,11 +159,24 @@ class JsonView extends AbstractView {
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface
-        * @inject
         */
        protected $persistenceManager;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager
+        */
+       public function injectPersistenceManager(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager) {
+               $this->persistenceManager = $persistenceManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
         * Specifies which variables this JsonView should render
         * By default only the variable 'value' will be rendered
         *
index 28ace56..139e5b6 100644 (file)
@@ -21,29 +21,53 @@ abstract class AbstractRequestHandler implements \TYPO3\CMS\Extbase\Mvc\RequestH
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Mvc\Dispatcher
-        * @inject
         */
        protected $dispatcher;
 
        /**
         * @var \TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder
-        * @inject
         */
        protected $requestBuilder;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Mvc\Dispatcher $dispatcher
+        */
+       public function injectDispatcher(\TYPO3\CMS\Extbase\Mvc\Dispatcher $dispatcher) {
+               $this->dispatcher = $dispatcher;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder $requestBuilder
+        */
+       public function injectRequestBuilder(\TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder $requestBuilder) {
+               $this->requestBuilder = $requestBuilder;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectExtensionService(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
         * This request handler can handle any web request.
         *
         * @return bool If the request is a web request, TRUE otherwise FALSE
index 3e6fc84..e0dd279 100644 (file)
@@ -21,17 +21,29 @@ class FrontendRequestHandler extends AbstractRequestHandler {
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\ExtensionService
-        * @inject
         */
        protected $extensionService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\ExtensionService $extensionService
+        */
+       public function injectExtensionService(\TYPO3\CMS\Extbase\Service\ExtensionService $extensionService) {
+               $this->extensionService = $extensionService;
+       }
+
+       /**
         * Handles the web request. The response will automatically be sent to the client.
         *
         * @return \TYPO3\CMS\Extbase\Mvc\ResponseInterface|NULL
index dc4035f..9df6f70 100644 (file)
@@ -23,7 +23,6 @@ class Request extends \TYPO3\CMS\Extbase\Mvc\Request {
 
        /**
         * @var \TYPO3\CMS\Extbase\Security\Cryptography\HashService
-        * @inject
         */
        protected $hashService;
 
@@ -54,17 +53,36 @@ class Request extends \TYPO3\CMS\Extbase\Mvc\Request {
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Security\Cryptography\HashService $hashService
+        */
+       public function injectHashService(\TYPO3\CMS\Extbase\Security\Cryptography\HashService $hashService) {
+               $this->hashService = $hashService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
         * Sets the request method
         *
         * @param string $method Name of the request method
index 916eade..d0176d3 100644 (file)
@@ -24,7 +24,6 @@ class RequestBuilder implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
@@ -72,23 +71,48 @@ class RequestBuilder implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\ExtensionService
-        * @inject
         */
        protected $extensionService;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\ExtensionService $extensionService
+        */
+       public function injectExtensionService(\TYPO3\CMS\Extbase\Service\ExtensionService $extensionService) {
+               $this->extensionService = $extensionService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
         * @throws MvcException
         * @return void
         */
index 48406f3..12133d3 100644 (file)
@@ -115,11 +115,17 @@ class Response extends \TYPO3\CMS\Extbase\Mvc\Response {
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
         * Sets the HTTP status code and (optionally) a customized message.
         *
         * @param int $code The status code
index f0ae3d5..338c552 100644 (file)
@@ -29,13 +29,11 @@ class UriBuilder {
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\ExtensionService
-        * @inject
         */
        protected $extensionService;
 
@@ -130,11 +128,31 @@ class UriBuilder {
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\ExtensionService $extensionService
+        */
+       public function injectExtensionService(\TYPO3\CMS\Extbase\Service\ExtensionService $extensionService) {
+               $this->extensionService = $extensionService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
         * Life-cycle method that is called by the DI container as soon as this object is completely built
         *
         * @return void
index c5d5daa..b2b79b0 100644 (file)
@@ -25,7 +25,6 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Session
-        * @inject
         */
        protected $session;
 
@@ -56,25 +55,21 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory
-        * @inject
         */
        protected $qomFactory;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface
-        * @inject
         */
        protected $storageBackend;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
-        * @inject
         */
        protected $dataMapper;
 
@@ -92,11 +87,52 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
 
        /**
         * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
-        * @inject
         */
        protected $signalSlotDispatcher;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Session $session
+        */
+       public function injectSession(\TYPO3\CMS\Extbase\Persistence\Generic\Session $session) {
+               $this->session = $session;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory $qomFactory
+        */
+       public function injectQomFactory(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory $qomFactory) {
+               $this->qomFactory = $qomFactory;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface $storageBackend
+        */
+       public function injectStorageBackend(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface $storageBackend) {
+               $this->storageBackend = $storageBackend;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper
+        */
+       public function injectDataMapper(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper) {
+               $this->dataMapper = $dataMapper;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher
+        */
+       public function injectSignalSlotDispatcher(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher) {
+               $this->signalSlotDispatcher = $signalSlotDispatcher;
+       }
+
+       /**
         * Constructs the backend
         *
         * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
index bb8c959..f04e9ac 100644 (file)
@@ -24,7 +24,6 @@ class LazyLoadingProxy implements \Iterator, \TYPO3\CMS\Extbase\Persistence\Gene
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
-        * @inject
         */
        protected $dataMapper;
 
@@ -50,6 +49,13 @@ class LazyLoadingProxy implements \Iterator, \TYPO3\CMS\Extbase\Persistence\Gene
        private $fieldValue;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper
+        */
+       public function injectDataMapper(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper) {
+               $this->dataMapper = $dataMapper;
+       }
+
+       /**
         * Constructs this proxy instance.
         *
         * @param DomainObjectInterface $parentObject The object instance this proxy is part of
index 0080ccb..d6c2663 100644 (file)
@@ -34,7 +34,6 @@ class LazyObjectStorage extends \TYPO3\CMS\Extbase\Persistence\ObjectStorage imp
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
-        * @inject
         */
        protected $dataMapper;
 
@@ -65,6 +64,13 @@ class LazyObjectStorage extends \TYPO3\CMS\Extbase\Persistence\ObjectStorage imp
        protected $isInitialized = FALSE;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper
+        */
+       public function injectDataMapper(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper) {
+               $this->dataMapper = $dataMapper;
+       }
+
+       /**
         * Returns the state of the initialization
         *
         * @return bool
index f6c2617..d56e851 100644 (file)
@@ -21,25 +21,21 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Core\Cache\CacheManager
-        * @inject
         */
        protected $cacheManager;
 
@@ -49,6 +45,34 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface {
        protected $dataMapCache;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Core\Cache\CacheManager $cacheManager
+        */
+       public function injectCacheManager(\TYPO3\CMS\Core\Cache\CacheManager $cacheManager) {
+               $this->cacheManager = $cacheManager;
+       }
+
+       /**
         * Lifecycle method
         *
         * @return void
index 05831da..fc94442 100644 (file)
@@ -27,19 +27,16 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory
-        * @inject
         */
        protected $qomFactory;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Session
-        * @inject
         */
        protected $persistenceSession;
 
@@ -59,13 +56,11 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory
-        * @inject
         */
        protected $dataMapFactory;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\QueryFactoryInterface
-        * @inject
         */
        protected $queryFactory;
 
@@ -78,17 +73,64 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
-        * @inject
         */
        protected $signalSlotDispatcher;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory $qomFactory
+        */
+       public function injectQomFactory(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory $qomFactory) {
+               $this->qomFactory = $qomFactory;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Session $persistenceSession
+        */
+       public function injectPersistenceSession(\TYPO3\CMS\Extbase\Persistence\Generic\Session $persistenceSession) {
+               $this->persistenceSession = $persistenceSession;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory $dataMapFactory
+        */
+       public function injectDataMapFactory(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory $dataMapFactory) {
+               $this->dataMapFactory = $dataMapFactory;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryFactoryInterface $queryFactory
+        */
+       public function injectQueryFactory(\TYPO3\CMS\Extbase\Persistence\Generic\QueryFactoryInterface $queryFactory) {
+               $this->queryFactory = $queryFactory;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher
+        */
+       public function injectSignalSlotDispatcher(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher) {
+               $this->signalSlotDispatcher = $signalSlotDispatcher;
+       }
+
+       /**
         * Maps the given rows on objects
         *
         * @param string $className The name of the class
index 88df164..8153101 100644 (file)
@@ -46,23 +46,41 @@ class PersistenceManager implements \TYPO3\CMS\Extbase\Persistence\PersistenceMa
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\QueryFactoryInterface
-        * @inject
         */
        protected $queryFactory;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
-        * @inject
         */
        protected $backend;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Session
-        * @inject
         */
        protected $persistenceSession;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryFactoryInterface $queryFactory
+        */
+       public function injectQueryFactory(\TYPO3\CMS\Extbase\Persistence\Generic\QueryFactoryInterface $queryFactory) {
+               $this->queryFactory = $queryFactory;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface $backend
+        */
+       public function injectBackend(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface $backend) {
+               $this->backend = $backend;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Session $persistenceSession
+        */
+       public function injectPersistenceSession(\TYPO3\CMS\Extbase\Persistence\Generic\Session $persistenceSession) {
+               $this->persistenceSession = $persistenceSession;
+       }
+
+       /**
         * Create new instance
         */
        public function __construct() {
index 2791fe8..3ca08f4 100644 (file)
@@ -21,11 +21,17 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
         * Selects a subset of the nodes in the repository based on node type.
         *
         * @param string $nodeTypeName the name of the required node type; non-null
index 1bfe11c..4e284aa 100644 (file)
@@ -50,25 +50,22 @@ class Query implements QueryInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
-        * @inject
         */
        protected $dataMapper;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface
-        * @inject
+
         */
        protected $persistenceManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory
-        * @inject
         */
        protected $qomFactory;
 
@@ -110,6 +107,34 @@ class Query implements QueryInterface {
        protected $querySettings;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper
+        */
+       public function injectDataMapper(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper) {
+               $this->dataMapper = $dataMapper;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager
+        */
+       public function injectPersistenceManager(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager) {
+               $this->persistenceManager = $persistenceManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory $qomFactory
+        */
+       public function injectQomFactory(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory $qomFactory) {
+               $this->qomFactory = $qomFactory;
+       }
+
+       /**
         * Constructs a query object working on the given class name
         *
         * @param string $type
index d70fce6..48b274f 100644 (file)
@@ -21,23 +21,41 @@ class QueryFactory implements QueryFactoryInterface, \TYPO3\CMS\Core\SingletonIn
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
-        * @inject
         */
        protected $dataMapper;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper
+        */
+       public function injectDataMapper(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper) {
+               $this->dataMapper = $dataMapper;
+       }
+
+       /**
         * Creates a query object working on the given class name
         *
         * @param string $className The class name
index 7ee1ba0..4353761 100644 (file)
@@ -25,13 +25,11 @@ class QueryResult implements QueryResultInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
-        * @inject
         */
        protected $dataMapper;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface
-        * @inject
         */
        protected $persistenceManager;
 
@@ -52,6 +50,20 @@ class QueryResult implements QueryResultInterface {
        protected $queryResult;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper
+        */
+       public function injectDataMapper(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper) {
+               $this->dataMapper = $dataMapper;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager
+        */
+       public function injectPersistenceManager(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager) {
+               $this->persistenceManager = $persistenceManager;
+       }
+
+       /**
         * Constructor
         *
         * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query
index 233fab4..3c27627 100644 (file)
@@ -49,11 +49,17 @@ class Session implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
         * Constructs a new Session
         */
        public function __construct() {
index 1310c73..0858476 100644 (file)
@@ -32,7 +32,6 @@ class Typo3DbBackend implements BackendInterface, \TYPO3\CMS\Core\SingletonInter
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
-        * @inject
         */
        protected $dataMapper;
 
@@ -52,19 +51,16 @@ class Typo3DbBackend implements BackendInterface, \TYPO3\CMS\Core\SingletonInter
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\CacheService
-        * @inject
         */
        protected $cacheService;
 
        /**
         * @var \TYPO3\CMS\Core\Cache\CacheManager
-        * @inject
         */
        protected $cacheManager;
 
@@ -80,13 +76,11 @@ class Typo3DbBackend implements BackendInterface, \TYPO3\CMS\Core\SingletonInter
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser
-        * @inject
         */
        protected $queryParser;
 
@@ -98,6 +92,48 @@ class Typo3DbBackend implements BackendInterface, \TYPO3\CMS\Core\SingletonInter
        protected $queryRuntimeCache = array();
 
        /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper
+        */
+       public function injectDataMapper(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper) {
+               $this->dataMapper = $dataMapper;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\CacheService $cacheService
+        */
+       public function injectCacheService(\TYPO3\CMS\Extbase\Service\CacheService $cacheService) {
+               $this->cacheService = $cacheService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Core\Cache\CacheManager $cacheManager
+        */
+       public function injectCacheManager(\TYPO3\CMS\Core\Cache\CacheManager $cacheManager) {
+               $this->cacheManager = $cacheManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser $queryParser
+        */
+       public function injectQueryParser(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser $queryParser) {
+               $this->queryParser = $queryParser;
+       }
+
+       /**
         * Constructor. takes the database handle from $GLOBALS['TYPO3_DB']
         */
        public function __construct() {
index 71fac7c..b1a6058 100644 (file)
@@ -34,7 +34,6 @@ class Typo3DbQueryParser implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
-        * @inject
         */
        protected $dataMapper;
 
@@ -47,7 +46,6 @@ class Typo3DbQueryParser implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Core\Cache\CacheManager
-        * @inject
         */
        protected $cacheManager;
 
@@ -58,11 +56,31 @@ class Typo3DbQueryParser implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper
+        */
+       public function injectDataMapper(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper $dataMapper) {
+               $this->dataMapper = $dataMapper;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Core\Cache\CacheManager $cacheManager
+        */
+       public function injectCacheManager(\TYPO3\CMS\Core\Cache\CacheManager $cacheManager) {
+               $this->cacheManager = $cacheManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
         * Constructor. takes the database handle from $GLOBALS['TYPO3_DB']
         */
        public function __construct() {
index 1561c2f..21a06ea 100644 (file)
@@ -25,7 +25,6 @@ class Repository implements RepositoryInterface, \TYPO3\CMS\Core\SingletonInterf
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface
-        * @inject
         */
        protected $persistenceManager;
 
@@ -50,6 +49,13 @@ class Repository implements RepositoryInterface, \TYPO3\CMS\Core\SingletonInterf
        protected $defaultQuerySettings = NULL;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager
+        */
+       public function injectPersistenceManager(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager) {
+               $this->persistenceManager = $persistenceManager;
+       }
+
+       /**
         * Constructs a new Repository
         *
         * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
index 289c964..dedeb9c 100644 (file)
@@ -34,13 +34,11 @@ class PropertyMapper implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationBuilder
-        * @inject
         */
        protected $configurationBuilder;
 
@@ -64,6 +62,20 @@ class PropertyMapper implements \TYPO3\CMS\Core\SingletonInterface {
        protected $messages;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationBuilder $configurationBuilder
+        */
+       public function injectConfigurationBuilder(\TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationBuilder $configurationBuilder) {
+               $this->configurationBuilder = $configurationBuilder;
+       }
+
+       /**
         * Lifecycle method, called after all dependencies have been injected.
         * Here, the typeConverter array gets initialized.
         *
index 65fa05d..3fc502f 100644 (file)
@@ -33,11 +33,17 @@ abstract class AbstractFileCollectionConverter extends \TYPO3\CMS\Extbase\Proper
 
        /**
         * @var \TYPO3\CMS\Core\Resource\ResourceFactory
-        * @inject
         */
        protected $fileFactory;
 
        /**
+        * @param \TYPO3\CMS\Core\Resource\ResourceFactory $fileFactory
+        */
+       public function injectFileFactory(\TYPO3\CMS\Core\Resource\ResourceFactory $fileFactory) {
+               $this->fileFactory = $fileFactory;
+       }
+
+       /**
         * Actually convert from $source to $targetType, taking into account the fully
         * built $convertedChildProperties and $configuration.
         *
index e812006..8dc222f 100644 (file)
@@ -33,11 +33,17 @@ abstract class AbstractFileFolderConverter extends \TYPO3\CMS\Extbase\Property\T
 
        /**
         * @var \TYPO3\CMS\Core\Resource\ResourceFactory
-        * @inject
         */
        protected $fileFactory;
 
        /**
+        * @param \TYPO3\CMS\Core\Resource\ResourceFactory $fileFactory
+        */
+       public function injectFileFactory(\TYPO3\CMS\Core\Resource\ResourceFactory $fileFactory) {
+               $this->fileFactory = $fileFactory;
+       }
+
+       /**
         * Actually convert from $source to $targetType, taking into account the fully
         * built $convertedChildProperties and $configuration.
         *
index 0da14b9..6e57d8a 100644 (file)
@@ -57,12 +57,18 @@ abstract class AbstractTypeConverter implements \TYPO3\CMS\Extbase\Property\Type
        protected $priority;
 
        /**
-        * @var \TYPO3\CMS\Extbase\Object\ObjectManager
-        * @inject
+        * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
         */
        protected $objectManager;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
         * Returns the list of source types the TypeConverter can handle.
         * Must be PHP simple types, classes or object is not allowed.
         *
index 7bcb261..08ffb16 100644 (file)
@@ -53,24 +53,30 @@ class ObjectConverter extends AbstractTypeConverter implements \TYPO3\CMS\Core\S
        protected $priority = 0;
 
        /**
-        * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
-        */
-       protected $objectManager;
-
-       /**
         * @var \TYPO3\CMS\Extbase\Object\Container\Container
-        * @inject
         */
        protected $objectContainer;
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\Container\Container $objectContainer
+        */
+       public function injectObjectContainer(\TYPO3\CMS\Extbase\Object\Container\Container $objectContainer) {
+               $this->objectContainer = $objectContainer;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
         * Only convert non-persistent types
         *
         * @param mixed $source
index 2144296..3d67533 100644 (file)
@@ -63,10 +63,16 @@ class PersistentObjectConverter extends ObjectConverter {
 
        /**
         * @var \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface
-        * @inject
         */
        protected $persistenceManager;
 
+               /**
+        * @param \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager
+        */
+       public function injectPersistenceManager(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager) {
+               $this->persistenceManager = $persistenceManager;
+       }
+
        /**
         * We can only convert if the $targetType is either tagged with entity or value object.
         *
index c3729fb..7d51025 100644 (file)
@@ -27,7 +27,6 @@ class ReflectionService implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
@@ -129,7 +128,6 @@ class ReflectionService implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
@@ -144,6 +142,20 @@ class ReflectionService implements \TYPO3\CMS\Core\SingletonInterface {
        protected $methodReflections = array();
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
         * Sets the data cache.
         *
         * The cache must be set before initializing the Reflection Service.
index de06db7..d899472 100644 (file)
@@ -39,23 +39,41 @@ class TaskExecutor implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager
-        * @inject
         */
        protected $commandManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager $commandManager
+        */
+       public function injectCommandManager(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager $commandManager) {
+               $this->commandManager = $commandManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
         * Initialize Dispatcher
         */
        public function initializeObject() {
index ad0ec42..8066609 100644 (file)
@@ -24,13 +24,11 @@ class ExtensionService implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
-        * @inject
         */
        protected $configurationManager;
 
@@ -41,6 +39,20 @@ class ExtensionService implements \TYPO3\CMS\Core\SingletonInterface {
        protected $targetPidPluginCache = array();
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
+        */
+       public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
+               $this->configurationManager = $configurationManager;
+       }
+
+       /**
         * Determines the plugin namespace of the specified plugin (defaults to "tx_[extensionname]_[pluginname]")
         * If plugin.tx_$pluginSignature.view.pluginNamespace is set, this value is returned
         * If pluginNamespace is not specified "tx_[extensionname]_[pluginname]" is returned.
index 7a516ec..ede1b94 100644 (file)
@@ -28,17 +28,29 @@ class ImageService implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Core\Resource\ResourceFactory
-        * @inject
         */
        protected $resourceFactory;
 
        /**
         * @var \TYPO3\CMS\Extbase\Service\EnvironmentService
-        * @inject
         */
        protected $environmentService;
 
        /**
+        * @param \TYPO3\CMS\Core\Resource\ResourceFactory $resourceFactory
+        */
+       public function injectResourceFactory(\TYPO3\CMS\Core\Resource\ResourceFactory $resourceFactory) {
+               $this->resourceFactory = $resourceFactory;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
+        */
+       public function injectEnvironmentService(\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService) {
+               $this->environmentService = $environmentService;
+       }
+
+       /**
         * Create a processed file
         *
         * @param File|FileReference $image
index c2e6c6d..81bf2c5 100644 (file)
@@ -32,11 +32,17 @@ class CollectionValidator extends GenericObjectValidator {
 
        /**
         * @var \TYPO3\CMS\Extbase\Validation\ValidatorResolver
-        * @inject
         */
        protected $validatorResolver;
 
        /**
+        * @param \TYPO3\CMS\Extbase\Validation\ValidatorResolver $validatorResolver
+        */
+       public function injectValidatorResolver(\TYPO3\CMS\Extbase\Validation\ValidatorResolver $validatorResolver) {
+               $this->validatorResolver = $validatorResolver;
+       }
+
+       /**
         * Checks if the given value is valid according to the validator, and returns
         * the Error Messages object which occurred.
         *
index 684feea..ded58a9 100644 (file)
@@ -61,13 +61,11 @@ class ValidatorResolver implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-        * @inject
         */
        protected $objectManager;
 
        /**
         * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
-        * @inject
         */
        protected $reflectionService;
 
@@ -77,6 +75,20 @@ class ValidatorResolver implements \TYPO3\CMS\Core\SingletonInterface {
        protected $baseValidatorConjunctions = array();
 
        /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
+        */
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
+               $this->reflectionService = $reflectionService;
+       }
+
+       /**
         * Get a validator for a given data type. Returns a validator implementing
         * the \TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface or NULL if no validator
         * could be resolved.