* @package tao */ class AccessRule { const GRANT = 'grant'; const DENY = 'deny'; private $grantDeny; private $role; private $mask; public function __construct($mode, $roleUri, $mask) { $this->grantDeny = $mode; $this->role = new core_kernel_classes_Resource($roleUri); $this->mask = $mask; } /** * Those the role grant you access? * @return bool */ public function isGrant() { return $this->grantDeny == self::GRANT; } /** * Gets the role this rule applies to * @return core_kernel_classes_Resource */ public function getRole() { return $this->role; } /** * Returns the filter of the rule * @return array */ public function getMask() { return $this->mask; } }