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;
    }
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;
    }
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 ; }
Tests if specified category matches any category and doesn't match any exception of this subscription.

@param  string  $category
@return boolean
Tests if specified category matches any category and doesn t match any exception of this subscription .