public function matchCategory($category)
    {
        $result = empty($this->categories);
        foreach ($this->categories as $allowedCategory) {
            if ($this->categoryContains($allowedCategory, $category)) {
                $result = true;
            }
        }
        foreach ($this->exceptions as $deniedCategory) {
            if ($this->categoryContains($deniedCategory, $category)) {
                $result = false;
            }
        }

        return $result;
    }