Ticket #160 (closed enhancement: wontfix)

Opened 2 years ago

Last modified 19 months ago

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

Changed 2 years ago by mikey

  • description modified (diff)

Changed 19 months ago by mikey

  • status changed from new to closed
  • resolution set to wontfix

We will not implement this as we improved the support for @Named injections. The respective values should be configured via a binding module using the @Named annotation and will then be injected the default way.

Note: See TracTickets for help on using tickets.