PHP Class Flarum\Core\Search\AbstractRegexGambit

Inheritance: implements Flarum\Core\Search\GambitInterface
Afficher le fichier Open project: flarum/core Class Usage Examples

Protected Properties

Свойство Type Description
$pattern string The regex pattern to match the bit against.

Méthodes publiques

Méthode Description
apply ( AbstractSearch $search, $bit )

Méthodes protégées

Méthode Description
conditions ( AbstractSearch $search, array $matches, boolean $negate ) : mixed Apply conditions to the search, given that the gambit was matched.
match ( string $bit ) : array Match the bit against this gambit.

Method Details

apply() public méthode

public apply ( AbstractSearch $search, $bit )
$search AbstractSearch

conditions() abstract protected méthode

Apply conditions to the search, given that the gambit was matched.
abstract protected conditions ( AbstractSearch $search, array $matches, boolean $negate ) : mixed
$search AbstractSearch The search object.
$matches array An array of matches from the search bit.
$negate boolean Whether or not the bit was negated, and thus whether or not the conditions should be negated.
Résultat mixed

match() protected méthode

Match the bit against this gambit.
protected match ( string $bit ) : array
$bit string
Résultat array

Property Details

$pattern protected_oe property

The regex pattern to match the bit against.
protected string $pattern
Résultat string