src/Service/Search.php
public function addCriteria(Criteria $criteria) : void
    {
        if (! $this->isValidFilter($criteria->getOperator())) {
            throw new \RuntimeException(sprintf('Invalid filter provided: %s', $criteria->getOperator()));
        }

        $this->criteria[] = $criteria;
    }
public function addCriteria(Criteria $criteria) : void
    {
        if (! $this->isValidFilter($criteria->getOperator())) {
            throw new \RuntimeException(sprintf('Invalid filter provided: %s', $criteria->getOperator()));
        }

        $this->criteria[] = $criteria;
    }
public function addCriteria ( Criteria $ criteria ) : void { if ( ! $ this -> isValidFilter ( $ criteria -> getOperator ( ) ) ) { throw new \ RuntimeException ( sprintf ( 'Invalid filter provided: %s' , $ criteria -> getOperator ( ) ) ) ; } $ this -> criteria [ ] = $ criteria ; }
Add criteria to Search.

@param \Search\Service\Criteria $criteria Criteria object
@return void
@throws \RuntimeException When invalid filter class is provided
Add criteria to Search .