2010年2月3日星期三

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

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.

没有评论: