public function filter(...$filters)
    {
        if (sizeof($filters) == 0) {
            return $this;
        }

        $andGroup = new AndGroup();

        if (is_array($filters[0])) {
            $filters = $filters[0];
        }

        foreach ($filters as $filter) {
            if (!($filter instanceof Filter)) {
                throw new FilterNotSupportedException('One or more of the parameters, or one or more elements of an array parameter, was not of the Filter Class');
            }

            $andGroup->addFilters($filter);
        }

        if (sizeof($filters) == 1) {
            $andGroup = $filters[0];
        }

        if (is_null($this->filter)) {
            $this->filter = $andGroup;
        } else {
            $this->filter = new AndGroup([$andGroup, $this->filter]);
        }

        $this->invalidate();

        return $this;
    }
public function filter(...$filters)
    {
        if (sizeof($filters) == 0) {
            return $this;
        }

        $andGroup = new AndGroup();

        if (is_array($filters[0])) {
            $filters = $filters[0];
        }

        foreach ($filters as $filter) {
            if (!($filter instanceof Filter)) {
                throw new FilterNotSupportedException('One or more of the parameters, or one or more elements of an array parameter, was not of the Filter Class');
            }

            $andGroup->addFilters($filter);
        }

        if (sizeof($filters) == 1) {
            $andGroup = $filters[0];
        }

        if (is_null($this->filter)) {
            $this->filter = $andGroup;
        } else {
            $this->filter = new AndGroup([$andGroup, $this->filter]);
        }

        $this->invalidate();

        return $this;
    }
public function filter ( ... $ filters ) { if ( sizeof ( $ filters ) == 0 ) { return $ this ; } $ andGroup = new AndGroup ( ) ; if ( is_array ( $ filters [ 0 ] ) ) { $ filters = $ filters [ 0 ] ; } foreach ( $ filters as $ filter ) { if ( ! ( $ filter instanceof Filter ) ) { throw new FilterNotSupportedException ( 'One or more of the parameters, or one or more elements of an array parameter, was not of the Filter Class' ) ; } $ andGroup -> addFilters ( $ filter ) ; } if ( sizeof ( $ filters ) == 1 ) { $ andGroup = $ filters [ 0 ] ; } if ( is_null ( $ this -> filter ) ) { $ this -> filter = $ andGroup ; } else { $ this -> filter = new AndGroup ( [ $ andGroup , $ this -> filter ] ) ; } $ this -> invalidate ( ) ; return $ this ; }
filter the existing list using the supplied DataFilter.

@param Filter[] $filters
@return $this
@throws FilterNotSupportedException
filter the existing list using the supplied DataFilter .