_getRoleRegistry example

public function addRole($role$parents = null)
    {
        if (is_string($role)) {
            $role = new Zend_Acl_Role($role);
        }

        if (!$role instanceof Zend_Acl_Role_Interface) {
            throw new Zend_Acl_Exception('addRole() expects $role to be of type Zend_Acl_Role_Interface');
        }


        $this->_getRoleRegistry()->add($role$parents);

        return $this;
    }

    /** * Returns the identified Role * * The $role parameter can either be a Role or Role identifier. * * @param Zend_Acl_Role_Interface|string $role * @uses Zend_Acl_Role_Registry::get() * @return Zend_Acl_Role_Interface */
Home | Imprint | This part of the site doesn't use cookies.