abstract class AbstractRegexGambit implements GambitInterface

Methods

getGambitPattern()

The regex pattern to match the bit against.

bool
apply(SearchState $search, string $bit)

Apply conditions to the searcher for a bit of the search string.

array
match(string $bit)

Match the bit against this gambit.

Details

protected getGambitPattern()

The regex pattern to match the bit against.

bool apply(SearchState $search, string $bit)

Apply conditions to the searcher for a bit of the search string.

Parameters

SearchState $search
string $bit The piece of the search string.

Return Value

bool Whether or not the gambit was active for this bit.

protected array match(string $bit)

Match the bit against this gambit.

Parameters

string $bit

Return Value

array