Hmm, are you sure that you are loading the correct object? Where is this
code located? I notice that it implements Zend_Acl_Resource_Interface,
but there is already a class called Zend_View_Helper_Navigation being
loaded by the framework already right?
Where is your custom code being stored?
-ralph
J DeBord wrote:
I'm experimenting with Zend_Acl and even though what I am doing may not
be the best way to go about hiding/displaying navigation, the error
message below does not appear to be correct:*
Catchable fatal error*: Argument 1 passed to Zend_Acl::add() must
implement interface Zend_Acl_Resource_Interface, instance of
Zend_View_Helper_Navigation given
As you can see, Zend_View_Helper_Navigation does indeed implement
Zend_Acl_Resource_Interface
What do you guys think?
<?php
class Zend_View_Helper_Navigation extends Zend_View_Helper_Abstract
implements Zend_Acl_Resource_Interface {
protected $resourceId = 'navigation';
public function navigation() {
return $this->view->partial('navigation.phtml', array());
}
/**
* (non-PHPdoc)
* @see
library/Zend/Acl/Resource/Zend_Acl_Resource_Interface#getResourceId()
*/
public function getResourceId() {
return $this->_resourceId;
}
}