Can we keep this consistent and make the invokeArg of the controller be
'container' not 'registry'?
On Wednesday 15 April 2009 09:30:01 Rob Allen wrote:
> On 13 Apr 2009, at 15:50, Matthew Weier O'Phinney wrote:
> > The idea here would be that if a resource method or plugin has a
> > non-null return value, then that value would be registered with the
> > registry.
>
> I really like this idea.
>
> > Because the resource now has an explicit return value, the Bootstrap
> > would register it with the local registry. To keep things simple and
> > consistent, the key would match the resource. So, if you wanted to
> > retrieve the router, you'd use this:
> >
> > $router = $registry->router;
>
> How would it know which key name to use?
>
> > In your action controllers, you'd use the following:
> >
> > $registry = $this->getInvokeArg('registry');
> > $router = $registry->router;
>
> Looks good, though the InvokeArg's name could be clearer as 'registry'
> implies that it's to be used for all registry things.
>
>
> Regards,
>
> Rob...
--
Benjamin Eberlei
http://www.beberlei.de
没有评论:
发表评论