2010年2月3日星期三

Re: [fw-auth] Re: ACL... but completely different

There doesn't seem to be a way to specify the stack index according to the API docs. Controller plugins, however, do allow it.

--
Hector


On Wed, Feb 3, 2010 at 11:49 AM, Laura Dean <ldean@saleamp.com> wrote:

Great!

Is there some easy way to order the helpers in the stack?  It seems like by
default the last helper loaded is the first called.  I load the ACL helper
in my bootloader, but there are some initilization functions that should be
performed only after access is verified.  To get another action helper to
run before the AclBroker, I am doing the following:

       $aclBroker = $this->_helper->getHelper('AclBroker');
       Zend_Controller_Action_HelperBroker::removeHelper('AclBroker');
       $anotherHelper = $this->_helper->getHelper('AnotherHelper');
       Zend_Controller_Action_HelperBroker::addHelper($aclBroker);

Works, but is there a better way?
--
View this message in context: http://n4.nabble.com/ACL-but-completely-different-tp1299970p1461644.html
Sent from the Zend Auth mailing list archive at Nabble.com.


没有评论: