public function canRead(string $uri): bool
    {
        // /book => all
        if (in_array(Acl::RULE_ALL, (array) $this->getPermissionsOf($this->getUriRoot($uri)))) {
            return true;
        }

        // /book/detail => all or read
        $permission = array_filter((array) $this->getPermissionsOf($uri), function($rule) {
            return ($rule == Acl::RULE_ALL || $rule == Acl::RULE_READ);
        });

        return !empty($permission);
    }
public function canRead(string $uri): bool
    {
        // /book => all
        if (in_array(Acl::RULE_ALL, (array) $this->getPermissionsOf($this->getUriRoot($uri)))) {
            return true;
        }

        // /book/detail => all or read
        $permission = array_filter((array) $this->getPermissionsOf($uri), function($rule) {
            return ($rule == Acl::RULE_ALL || $rule == Acl::RULE_READ);
        });

        return !empty($permission);
    }
public function canRead ( string $ uri ) : bool { // /book => all if ( in_array ( Acl :: RULE_ALL , ( array ) $ this -> getPermissionsOf ( $ this -> getUriRoot ( $ uri ) ) ) ) { return true ; } // /book/detail => all or read $ permission = array_filter ( ( array ) $ this -> getPermissionsOf ( $ uri ) , function ( $ rule ) { return ( $ rule == Acl :: RULE_ALL || $ rule == Acl :: RULE_READ ) ; } ) ; return ! empty ( $ permission ) ; }
Can read.
@param  string $uri
@return bool
Can read .