diff --git a/src/Acl.php b/src/Acl.php index 30eab0c..eb287e5 100644 --- a/src/Acl.php +++ b/src/Acl.php @@ -15,7 +15,7 @@ * @package Zend_Permissions * @subpackage Acl */ -class Acl +class Acl implements AclInterface { /** * Rule type: allow diff --git a/src/AclInterface.php b/src/AclInterface.php new file mode 100644 index 0000000..93beb4b --- /dev/null +++ b/src/AclInterface.php @@ -0,0 +1,57 @@ +allow()). + * + * If a $privilege is not provided, then this method returns false if and only if the + * Role is denied access to at least one privilege upon the Resource. In other words, this + * method returns true if and only if the Role is allowed all privileges on the Resource. + * + * This method checks Role inheritance using a depth-first traversal of the Role registry. + * The highest priority parent (i.e., the parent most recently added) is checked first, + * and its respective parents are checked similarly before the lower-priority parents of + * the Role are checked. + * + * @param Role\RoleInterface|string $role + * @param Resource\ResourceInterface|string $resource + * @param string $privilege + * @return boolean + */ + public function isAllowed($role = null, $resource = null, $privilege = null); +} \ No newline at end of file