PHP Class Search\Model\Filter\Like

Inheritance: extends Base
Show file Open project: friendsofcake/search

Protected Properties

Property Type Description
$_defaultConfig array Default configuration.

Public Methods

Method Description
__construct ( string $name, Manager $manager, array $config = [] ) {@inheritDoc}
process ( ) : void Process a LIKE condition ($x LIKE $y).

Protected Methods

Method Description
_formatWildcards ( string $value ) : string Replace substitutions with original wildcards but first, escape the original wildcards in the text to use them as normal search text
_wildcards ( string $value ) : string | false Wrap wild cards around the value.

Method Details

__construct() public method

{@inheritDoc}
public __construct ( string $name, Manager $manager, array $config = [] )
$name string Name.
$manager Search\Manager Manager.
$config array Config.

_formatWildcards() protected method

Replace substitutions with original wildcards but first, escape the original wildcards in the text to use them as normal search text
protected _formatWildcards ( string $value ) : string
$value string Value.
return string Value

_wildcards() protected method

Wrap wild cards around the value.
protected _wildcards ( string $value ) : string | false
$value string Value.
return string | false Either the wildcard decorated input value, or `false` when encountering a non-string value.

process() public method

Process a LIKE condition ($x LIKE $y).
public process ( ) : void
return void

Property Details

$_defaultConfig protected property

Default configuration.
protected array $_defaultConfig
return array