src/Charcoal/Loader/CollectionLoader.php
public function addKeyword($keyword, array $properties = null)
    {
        if ($properties === null) {
            $properties = [];
        }

        foreach ($properties as $propertyIdent) {
            $val = ('%'.$keyword.'%');
            $this->addFilter([
                'property' => $propertyIdent,
                'operator' => 'LIKE',
                'value'    => $val,
                'operand'  => 'OR'
            ]);
        }

        return $this;
    }
public function addKeyword($keyword, array $properties = null)
    {
        if ($properties === null) {
            $properties = [];
        }

        foreach ($properties as $propertyIdent) {
            $val = ('%'.$keyword.'%');
            $this->addFilter([
                'property' => $propertyIdent,
                'operator' => 'LIKE',
                'value'    => $val,
                'operand'  => 'OR'
            ]);
        }

        return $this;
    }
public function addKeyword ( $ keyword , array $ properties = null ) { if ( $ properties === null ) { $ properties = [ ] ; } foreach ( $ properties as $ propertyIdent ) { $ val = ( '%' . $ keyword . '%' ) ; $ this -> addFilter ( [ 'property' => $ propertyIdent , 'operator' => 'LIKE' , 'value' => $ val , 'operand' => 'OR' ] ) ; } return $ this ; }
Add a "search" keyword filter to multiple properties.

@param  string $keyword    A value to match among $properties.
@param  array  $properties One or more of properties to search amongst.
@return self
Add a search keyword filter to multiple properties .