class UnreadGambit extends AbstractRegexGambit

Properties

protected $pattern {@inheritdoc}
protected DiscussionRepository $discussions

Methods

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

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

Apply conditions to the search, given that the gambit was matched.

__construct(DiscussionRepository $discussions)

No description

Details

bool apply(AbstractSearch $search, string $bit)

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

Parameters

AbstractSearch $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

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

Apply conditions to the search, given that the gambit was matched.

Parameters

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

Return Value

mixed

__construct(DiscussionRepository $discussions)

Parameters

DiscussionRepository $discussions