Feature #2109

Support constructor / factory arguments in Objects injection configuration

Added by Robert Lemke over 12 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Object
Start date:
2008-11-10
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

Currently it is not possible to pass (constructor) arguments or properties (for setter injection) to the object which is supposed to be injected into another object. In order to support this, the configuration syntax for the Objects.* file needs to be enhanced (and while we're at it, cleaned up a bit).

As soon as the object framework supports custom factories, the syntax needs to reflect that, too.

Example:

F3\Test\Controller\DefaultController:
‧‧properties:
‧‧‧‧cache:‧
‧‧‧‧‧‧object:
‧‧‧‧‧‧‧‧factoryClassName:‧F3\FLOW3\Cache\Factory
‧‧‧‧‧‧‧‧arguments:
‧‧‧‧‧‧‧‧‧‧1:‧value:‧MyCache
‧‧‧‧‧‧‧‧‧‧2:‧value:‧F3\FLOW3\Cache\VariableCache
‧‧‧‧‧‧‧‧‧‧3:‧value:‧F3\FLOW3\Cache\Backend\File
‧‧‧‧‧‧‧‧‧‧4:‧value:‧{cacheDirectory:‧/tmp}

Related issues

Related to TYPO3.Flow - Feature #2110: Add support for custom factoriesResolvedRobert Lemke2008-11-10

Actions
#1

Updated by Robert Lemke over 12 years ago

  • Subject changed from Support constructor / factory arguments in Components injection configuration to Support constructor / factory arguments in Objects injection configuration
#2

Updated by Robert Lemke over 12 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r1670.

Also available in: Atom PDF