-- Alan Gabriel Bem <[EMAIL PROTECTED]> wrote
(on Wednesday, 14 November 2007, 02:38 PM -0800):
> I read source of Zend_Controller_Plugin_Broker. Can anybody tell what
> is that? What is logical purpose of that code?
The plugin broker is registered with the Front Controller to allow
dispatching observers at specific points in the dispatch chain. I
suspect that's not what you're asking, though...
>
> public function registerPlugin(Zend_Controller_Plugin_Abstract $plugin,
> $stackIndex = null)
> {
> //code
> } else {
> $stackIndex = count($this->_plugins); // why?
> while (isset($this->_plugins[$stackIndex])) {
> ++$stackIndex;
> }
> $this->_plugins[$stackIndex] = $plugin;
> }
> //code
> }
>
> Why plugins without passed stackIndex are not registered with lowest posible
> stack index? Look:
I see what you're getting at.
Let's say you have 3 plugins, one registered with no stackIndex, one
with a stackIndex of 99, and another with one of 50. If you register
another, it will get a stackIndex of 3, when it should get a stackIndex
of 1.
Could you file an issue in JIRA for this, please?
> Alan Gabriel Bem wrote:
> P.P.S. Can somebody tell me: if I register plugin on stack index 4 (1,2,3
> are free) and then I register another plugin without passing stack index,
> what will be its stack index? 5? 1?
1.
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/