MediaWiki master
MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition Interface Reference

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.
 

Detailed Description

Interface for modules implementing a boolean condition which may match a row in a ChangesListResult.

Since
1.45

Definition at line 14 of file ChangesListCondition.php.

Member Function Documentation

◆ capture()

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.

◆ evaluate()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition::evaluate ( stdClass $row,
$value )

◆ exclude()

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.

Parameters
mixed$value

Implemented in MediaWiki\RecentChanges\ChangesListQuery\ExperienceCondition.

◆ isCaptured()

MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition::isCaptured ( )

Check whether capture() has been called.

Returns
bool

Implemented in MediaWiki\RecentChanges\ChangesListQuery\ChangesListConditionBase.

◆ prepareQuery()

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.

Parameters
IReadableDatabase$dbr
QueryBackend$query

◆ validateValue()

Member Data Documentation

◆ function

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.

Parameters
mixed$value

Definition at line 28 of file ChangesListCondition.php.


The documentation for this interface was generated from the following file: