class EmailGambit extends AbstractRegexGambit

Properties

protected $pattern <p>{@inheritdoc}</p>
protected UserRepository $users

Methods

bool
apply(AbstractSearch $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>

mixed
conditions(AbstractSearch $search, array $matches, bool $negate)

<p>Apply conditions to the search, given that the gambit was matched.</p>

__construct(UserRepository $users)

No description

Details

bool apply(AbstractSearch $search, string $bit)

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

Parameters

AbstractSearch $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 mixed conditions(AbstractSearch $search, array $matches, bool $negate)

<p>Apply conditions to the search, given that the gambit was matched.</p>

Parameters

AbstractSearch $search <p>The search object.</p>
array $matches <p>An array of matches from the search bit.</p>
bool $negate <p>Whether or not the bit was negated, and thus whether or not the conditions should be negated.</p>

Return Value

mixed

__construct(UserRepository $users)

Parameters

UserRepository $users