public function route(array $values, $operator)
    {
        if (!in_array($operator, array('=', '!='))) {
            return $this->translation->text('Unsupported operator');
        }

        $existing = $this->route->getList();

        foreach ($values as $pattern) {
            if (empty($existing[$pattern])) {
                return $this->translation->text('@name is unavailable', array(
                    '@name' => $this->translation->text('Condition')));
            }
        }

        return true;
    }
public function route(array $values, $operator)
    {
        if (!in_array($operator, array('=', '!='))) {
            return $this->translation->text('Unsupported operator');
        }

        $existing = $this->route->getList();

        foreach ($values as $pattern) {
            if (empty($existing[$pattern])) {
                return $this->translation->text('@name is unavailable', array(
                    '@name' => $this->translation->text('Condition')));
            }
        }

        return true;
    }
public function route ( array $ values , $ operator ) { if ( ! in_array ( $ operator , array ( '=' , '!=' ) ) ) { return $ this -> translation -> text ( 'Unsupported operator' ) ; } $ existing = $ this -> route -> getList ( ) ; foreach ( $ values as $ pattern ) { if ( empty ( $ existing [ $ pattern ] ) ) { return $ this -> translation -> text ( '@name is unavailable' , array ( '@name' => $ this -> translation -> text ( 'Condition' ) ) ) ; } } return true ; }
Validates the route pattern
@param array $values
@param string $operator
@return boolean|string
Validates the route pattern