Zend_Acl_Resource example


    public function addResource($resource$parent = null)
    {
        if (is_string($resource)) {
            $resource = new Zend_Acl_Resource($resource);
        }

        if (!$resource instanceof Zend_Acl_Resource_Interface) {
            throw new Zend_Acl_Exception('addResource() expects $resource to be of type Zend_Acl_Resource_Interface');
        }

        $resourceId = $resource->getResourceId();

        if ($this->has($resourceId)) {
            throw new Zend_Acl_Exception("Resource id '$resourceId' already exists in the ACL");
        }

        
Home | Imprint | This part of the site doesn't use cookies.