public function isAllowed(RoleInterface $role, ResourceInterface $resource, PermissionInterface $permission, array $params = array())
    {
        $roleId = spl_object_hash($role);
        $resourceId = spl_object_hash($resource);
        $permissionId = spl_object_hash($permission);
        if (isset($this->logger)) {
            $this->logger->addRecord(Logger::INFO,
                sprintf(
                    " Start checking if role %s (class: %s) has permission %s (class: %s) to resource %s (class: %s)",
                    $this->stringify($role),
                    get_class($role),
                    $this->stringify($permission),
                    get_class($permission),
                    $this->stringify($resource),
                    get_class($resource)
                ),
                $params
            );
        }

        $allowed = $this->searchACEs($roleId, $resourceId, $permissionId, $params, 1);
        if (!isset($allowed)) {
            $allowed = $this->searchParentResourceACEs($roleId, $resourceId, $permissionId, $params, 1);
        }
        if (!isset($allowed)) {
            $allowed = $this->searchParentRoleACEs($roleId, $resourceId, $permissionId, $params, 1);
        }
        if (isset($allowed)) {
            return $allowed;
        }
        if (isset($this->logger)) {
            $this->logger->addRecord(Logger::INFO, sprintf(" Access denied because no ACE has taken any decision",
                $this->stringify($role),
                $this->stringify($permission),
                $this->stringify($resource)
            ));
        }
        return false;
    }