Ticket #160 (closed enhancement: wontfix)
Provide injection of registry values
| Reported by: | mikey | Owned by: | mikey |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | InversionOfControl | Version: | SVN-trunk |
| Keywords: | Cc: |
Description (last modified by mikey) (diff)
The IoC container should provide a way to inject constant values directly from the registry:
class Example extends stubBaseObject
{
/**
* sets the example value
*
* @param string $exampleValue
* @Registry(key='example.registry.key', default='foo')
*/
public function setExampleValue($exampleValue)
{
// do something with $exampleValue
}
}
When class Example is now created with the IoC container, it will detect the @Registry annotation and call the method with the value stored under the key example.registry.key from the registry. The default will be used in case no value is stored with this key.
Change History
Note: See
TracTickets for help on using
tickets.
