MediaWiki master
MediaWiki\RecentChanges\ChangesListQuery\TitleCondition Class Reference

A condition matching a set of titles. More...

Inherits MediaWiki\RecentChanges\ChangesListQuery\ChangesListConditionBase.

Collaboration diagram for MediaWiki\RecentChanges\ChangesListQuery\TitleCondition:

Public Member Functions

 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.
Parameters
stdClass$row
mixed$valueThe validated value
Returns
bool

 
 validateValue ( $value)
 
- Public Member Functions inherited from MediaWiki\RecentChanges\ChangesListQuery\ChangesListConditionBase
 capture ()
 Set a flag indicating that evaluate() will be called with rows from the query result.
 
 isCaptured ()
 Check whether capture() has been called.
Returns
bool

 
- Public Member Functions inherited from MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition
 exclude ( $value)
 Add a value to the set of excluded values.
 
 prepareQuery (IReadableDatabase $dbr, QueryBackend $query)
 Add conditions and joins to the query in order to implement require() and exclude().
 

Protected Member Functions

 prepareCapture (IReadableDatabase $dbr, QueryBackend $query)
 
 prepareConds (IReadableDatabase $dbr, QueryBackend $query)
 Add conditions to the query according to the values passed to require() and exclude().Subclasses may use getUniqueValuesWithUnion() to get the required and excluded values.
Parameters
IReadableDatabase$dbr
QueryBackend$query

 

Additional Inherited Members

- Public Attributes inherited from MediaWiki\RecentChanges\ChangesListQuery\ChangesListConditionBase
 function
 
- Public Attributes inherited from MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition
 function
 Add a value to the set of required values.
 
- Protected Attributes inherited from MediaWiki\RecentChanges\ChangesListQuery\ChangesListConditionBase
array $excluded = []
 
array $required = []
 

Detailed Description

A condition matching a set of titles.

Access: internal
For use by ChangesListQuery
Since
1.45

Definition at line 18 of file TitleCondition.php.

Member Function Documentation

◆ evaluate()

MediaWiki\RecentChanges\ChangesListQuery\TitleCondition::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.

Parameters
stdClass$row
mixed$valueThe validated value
Returns
bool

Implements MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition.

Definition at line 29 of file TitleCondition.php.

◆ prepareCapture()

MediaWiki\RecentChanges\ChangesListQuery\TitleCondition::prepareCapture ( IReadableDatabase $dbr,
QueryBackend $query )
protected

◆ prepareConds()

MediaWiki\RecentChanges\ChangesListQuery\TitleCondition::prepareConds ( IReadableDatabase $dbr,
QueryBackend $query )
protected

Add conditions to the query according to the values passed to require() and exclude().Subclasses may use getUniqueValuesWithUnion() to get the required and excluded values.

Parameters
IReadableDatabase$dbr
QueryBackend$query

Reimplemented from MediaWiki\RecentChanges\ChangesListQuery\ChangesListConditionBase.

Definition at line 40 of file TitleCondition.php.

References MediaWiki\RecentChanges\ChangesListQuery\QueryBackend\forceEmptySet(), MediaWiki\RecentChanges\ChangesListQuery\TitleConditionValue\makeSet(), Wikimedia\Rdbms\Platform\ISQLPlatform\makeWhereFrom2d(), and MediaWiki\RecentChanges\ChangesListQuery\QueryBackend\where().

◆ validateValue()

MediaWiki\RecentChanges\ChangesListQuery\TitleCondition::validateValue ( $value)
Parameters
LinkTarget | PageReference$value
Returns
TitleConditionValue

Implements MediaWiki\RecentChanges\ChangesListQuery\ChangesListCondition.

Definition at line 24 of file TitleCondition.php.

References MediaWiki\RecentChanges\ChangesListQuery\TitleConditionValue\create().


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