|
MediaWiki master
|
Interface for modules implementing a boolean condition which may match a row in a ChangesListResult. More...
Inherited by MediaWiki\RecentChanges\ChangesListQuery\ChangesListConditionBase.
Public Member Functions | |
| capture () | |
| Set a flag indicating that evaluate() will be called with rows from the query result. | |
| evaluate (stdClass $row, $value) | |
| Evaluate the filter condition against a row, determining whether it is true or false. | |
| exclude ( $value) | |
| Add a value to the set of excluded values. | |
| isCaptured () | |
| Check whether capture() has been called. | |
| prepareQuery (IReadableDatabase $dbr, QueryBackend $query) | |
| Add conditions and joins to the query in order to implement require() and exclude(). | |
| validateValue ( $value) | |
| Validate a value and return its normalized form. | |
Public Attributes | |
| function | |
| Add a value to the set of required values. | |
Interface for modules implementing a boolean condition which may match a row in a ChangesListResult.
Definition at line 14 of file ChangesListCondition.php.
| MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition::capture | ( | ) |
Set a flag indicating that evaluate() will be called with rows from the query result.
Implemented in MediaWiki\RecentChanges\ChangesListQuery\ChangesListConditionBase.
| MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition::evaluate | ( | stdClass | $row, |
| $value ) |
Evaluate the filter condition against a row, determining whether it is true or false.
Ignore the values set with require() and exclude(), use only the value passed as a parameter.
To ensure that $row has the required fields present, capture() must be called before evaluate(). This will signal to prepareQuery() that the fields should be added.
| stdClass | $row | |
| mixed | $value | The validated value |
Implemented in MediaWiki\RecentChanges\ChangesListQuery\BooleanJoinFieldCondition, MediaWiki\RecentChanges\ChangesListQuery\ChangeTagsCondition, MediaWiki\RecentChanges\ChangesListQuery\EnumFieldCondition, MediaWiki\RecentChanges\ChangesListQuery\ExperienceCondition, MediaWiki\RecentChanges\ChangesListQuery\FieldEqualityCondition, MediaWiki\RecentChanges\ChangesListQuery\NamedCondition, MediaWiki\RecentChanges\ChangesListQuery\RevisionTypeCondition, MediaWiki\RecentChanges\ChangesListQuery\SeenCondition, MediaWiki\RecentChanges\ChangesListQuery\TitleCondition, MediaWiki\RecentChanges\ChangesListQuery\UserCondition, MediaWiki\RecentChanges\ChangesListQuery\WatchedCondition, and MediaWiki\RecentChanges\ChangesListQuery\WatchlistLabelCondition.
| MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition::exclude | ( | $value | ) |
Add a value to the set of excluded values.
This may be called multiple times to exclude multiple values.
The type of the value is defined by the subclass.
The query should be modified such that each row returned matches at least one of the required values AND does not match the excluded values. If the set of required values is empty, the excluded condition is evaluated alone, as if all possible values were required.
| mixed | $value |
Implemented in MediaWiki\RecentChanges\ChangesListQuery\ExperienceCondition.
| MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition::isCaptured | ( | ) |
Check whether capture() has been called.
Implemented in MediaWiki\RecentChanges\ChangesListQuery\ChangesListConditionBase.
| MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition::prepareQuery | ( | IReadableDatabase | $dbr, |
| QueryBackend | $query ) |
Add conditions and joins to the query in order to implement require() and exclude().
Add fields and joins to the query so that evaluate() can be implemented.
| IReadableDatabase | $dbr | |
| QueryBackend | $query |
| MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition::validateValue | ( | $value | ) |
Validate a value and return its normalized form.
| mixed | $value |
Implemented in MediaWiki\RecentChanges\ChangesListQuery\BooleanFieldCondition, MediaWiki\RecentChanges\ChangesListQuery\BooleanJoinFieldCondition, MediaWiki\RecentChanges\ChangesListQuery\ChangeTagsCondition, MediaWiki\RecentChanges\ChangesListQuery\EnumFieldCondition, MediaWiki\RecentChanges\ChangesListQuery\ExperienceCondition, MediaWiki\RecentChanges\ChangesListQuery\FieldEqualityCondition, MediaWiki\RecentChanges\ChangesListQuery\NamedCondition, MediaWiki\RecentChanges\ChangesListQuery\RevisionTypeCondition, MediaWiki\RecentChanges\ChangesListQuery\SeenCondition, MediaWiki\RecentChanges\ChangesListQuery\SubpageOfCondition, MediaWiki\RecentChanges\ChangesListQuery\TitleCondition, MediaWiki\RecentChanges\ChangesListQuery\UserCondition, MediaWiki\RecentChanges\ChangesListQuery\WatchedCondition, and MediaWiki\RecentChanges\ChangesListQuery\WatchlistLabelCondition.
| MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition::function |
Add a value to the set of required values.
This may be called multiple times to require multiple values.
The type of the value is defined by the subclass.
The query should be modified such that each row returned matches at least one of the required values AND does not match the excluded values. If the set of required values is empty, the excluded condition is evaluated alone, as if all possible values were required.
| mixed | $value |
Definition at line 28 of file ChangesListCondition.php.