2009年4月15日星期三

Re: [fw-mvc] Proposed addition to Zend_Application API

-- Benjamin Eberlei <kontakt@beberlei.de> wrote
(on Wednesday, 15 April 2009, 10:32 AM +0200):
> I saw you committed the getContainer()/addContainer() changes already Matthew.
>
> Can we keep this consistent and make the invokeArg of the controller be
> 'container' not 'registry'?

Please see my previous reply to Rob -- I'm not pushing the container
into the front controller, but instead pushing the bootstrap itself.


> 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.

--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: