MediaWiki REL1_37
|
Back end to process the edit constraints. More...
Public Member Functions | |
__construct () | |
Create a new runner. | |
addConstraint (IEditConstraint $constraint) | |
Add a constraint to check. | |
checkConstraints () | |
Run constraint checks. | |
getFailedConstraint () | |
Get the constraint that failed. | |
Private Member Functions | |
getConstraintName (IEditConstraint $constraint) | |
Private Attributes | |
IEditConstraint[] | $constraints = [] |
Constraints to check. | |
IEditConstraint bool | $failedConstraint = false |
The constraint that failed, so that its status can be fetched, or false if none failed. | |
LoggerInterface | $logger |
Back end to process the edit constraints.
Constraints reflect possible errors that need to be checked
Definition at line 36 of file EditConstraintRunner.php.
MediaWiki\EditPage\Constraint\EditConstraintRunner::__construct | ( | ) |
Create a new runner.
Definition at line 58 of file EditConstraintRunner.php.
MediaWiki\EditPage\Constraint\EditConstraintRunner::addConstraint | ( | IEditConstraint | $constraint | ) |
Add a constraint to check.
Not all constraints are applicable to the action api or other methods of submitting an edit
For constraints that have dependencies, use the EditConstraintFactory.
IEditConstraint | $constraint |
Definition at line 74 of file EditConstraintRunner.php.
MediaWiki\EditPage\Constraint\EditConstraintRunner::checkConstraints | ( | ) |
Run constraint checks.
Returns true if all constraints pass, false otherwise. Check getLegacyStatus for the reason
Definition at line 86 of file EditConstraintRunner.php.
References MediaWiki\EditPage\Constraint\EditConstraintRunner\getConstraintName().
|
private |
IEditConstraint | $constraint |
Definition at line 119 of file EditConstraintRunner.php.
Referenced by MediaWiki\EditPage\Constraint\EditConstraintRunner\checkConstraints().
MediaWiki\EditPage\Constraint\EditConstraintRunner::getFailedConstraint | ( | ) |
Get the constraint that failed.
Definition at line 138 of file EditConstraintRunner.php.
|
private |
Constraints to check.
Definition at line 46 of file EditConstraintRunner.php.
|
private |
The constraint that failed, so that its status can be fetched, or false if none failed.
Definition at line 53 of file EditConstraintRunner.php.
|
private |
Definition at line 39 of file EditConstraintRunner.php.