Add support for custom factories
The Object Framework should support custom factories which are used whenever a object of a certain type needs to be instantiated.
Such a factory could be defined / configured in the Objects configuration like this:
Now whenever a "CacheInterface" object type needs to be intantiated, the Cache Factory's create() method will be called. Of course the arguments for the create() method still have to be defined:
$myCache = $this->objectFactory->create('F3\FLOW3\Cache\CacheInterface', 'cacheId', 'F3\FLOW3\Cache\VariableCache', 'F3\FLOW3\Cache\Backend\File');
- FLOW3: (Cache) Introduced two new interfaces - for Cache frontends and backends
- FLOW3: (Cache) Fixed an issue with the File Backend: initializeObject() overrode the cacheDirectory setting even if it has been set through setter injection
- FLOW3: (Object) The property / argument type "reference" has been renamed to "object" (see also updated documentation)
- FLOW3: (Object) The object configuration option "constructorArguments" has been renamed to "arguments"
- FLOW3: (Object) In the code "Constructor Arguments" are now referred to simply as "Arguments"
- FLOW3: (Object) Implemented support for custom factories. Resolves #2110
- FLOW3: (Object) Implemented support for specifying arguments / properties for objects which are injected. Resolves #2109
- FLOW3: (Resource) Added the file_exists() check again to the Class Loader. Ommitting the check resulted in hard-to-track error messages
- FLOW3: (Documentation) Updated the documentation. Still missing: custom factories and syntax of feature #2109
- FLOW3: (TestPackage) Adopted and cleaned up the Object related tests