class EmailFilterGambit extends AbstractRegexGambit implements FilterInterface

Methods

getGambitPattern()

<p>The regex pattern to match the bit against.</p>

bool
apply(SearchState $search, string $bit)

<p>Apply conditions to the searcher for a bit of the search string.</p>

array
match(string $bit)

<p>Match the bit against this gambit.</p>

conditions(SearchState $search, array $matches, $negate)

<p>{@inheritdoc}</p>

string
getFilterKey()

<p>This filter will only be run when a query contains a filter param with this key.</p>

filter(FilterState $filterState, string $filterValue, bool $negate)

<p>Filters a query.</p>

constrain(Builder $query, $rawEmail, bool $negate)

No description

Details

getGambitPattern()

<p>The regex pattern to match the bit against.</p>

bool apply(SearchState $search, string $bit)

<p>Apply conditions to the searcher for a bit of the search string.</p>

Parameters

SearchState $search
string $bit <p>The piece of the search string.</p>

Return Value

bool <p>Whether or not the gambit was active for this bit.</p>

protected array match(string $bit)

<p>Match the bit against this gambit.</p>

Parameters

string $bit

Return Value

array

protected conditions(SearchState $search, array $matches, $negate)

<p>{@inheritdoc}</p>

Parameters

SearchState $search
array $matches
$negate

string getFilterKey()

<p>This filter will only be run when a query contains a filter param with this key.</p>

Return Value

string

filter(FilterState $filterState, string $filterValue, bool $negate)

<p>Filters a query.</p>

Parameters

FilterState $filterState
string $filterValue
bool $negate

protected constrain(Builder $query, $rawEmail, bool $negate)

Parameters

Builder $query
$rawEmail
bool $negate