Issues

ZF-6589: Make $bootstrap->bootstrap() return the resource(s) instead of $this

Issue Type: Improvement Created: 2009-05-09T08:12:30.000+0000 Last Updated: 2009-05-09T12:23:06.000+0000 Status: Resolved Fix version(s): Reporter: Mon Zafra (monzee) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Application

Related issues: Attachments:

Description

If a bootstrap resource needs a reference to another resource, one would need to call $this->bootstrap('resource') first then $res = $this->getResource('resource'), or chain them like $res = $this->bootstrap('resource')->getResource('resource'). It would be nice if they can be combined in a single call. E.g.

$this->bootstrap('frontController')->registerPlugin(new My_Plugin());

list($view, $layout, $modules) = $this->bootstrap(array('view', 'layout', 'modules'));

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2009-05-09T12:22:52.000+0000

bootstrap() was designed to be a fluent interface because the intention is that it is setting the application/bootstrap state. Additionally, the fact that it can take multiple signatures -- including no arguments -- makes having a standard return value a more sane API.

Marking as "won't fix".

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts