protected function searchACEs($roleId, $resourceId, $permissionId, array $params = array(), $level = 0)
    {
        if (!isset($this->ACEs[$roleId][$resourceId][$permissionId])) {
            return null;
        } else {
            $allowedAny = null;
            foreach ($this->ACEs[$roleId][$resourceId][$permissionId] as $ace) {
                $allowed = $ace->isAllowed($params);
                if (isset($this->logger)) {
                    $this->logger->addRecord(Logger::INFO, sprintf(" %s%s ACE (class: %s) {resource: %s (class: %s), role: %s (class: %s), permission: %s (class: %s)}",
                        str_repeat('  ', $level),
                        isset($allowed)?($allowed?'Access granted by':'Access denied by'):'No decision from',
                        $ace,
                        $this->stringify($ace->getResource()),
                        get_class($ace->getResource()),
                        $this->stringify($ace->getRole()),
                        get_class($ace->getRole()),
                        $this->stringify($this->permissions[$permissionId]),
                        get_class($this->permissions[$permissionId])
                    ));
                }
                if (isset($allowed)) {
                    if (!$allowed) {
                        return false;
                    } else {
                        $allowedAny = true;
                    }
                }
            }
            return $allowedAny;
        }
    }