Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Validators\CompositeValidator Class Reference

A CompositeValidator uses a list of sub-validators to validate the data. More...

+ Inheritance diagram for Wikibase\Repo\Validators\CompositeValidator:
+ Collaboration diagram for Wikibase\Repo\Validators\CompositeValidator:

Public Member Functions

 __construct (array $validators, $failFast=true)
 
 validate ( $value)
 
 setOptions (array $options)
 

Private Attributes

 $validators
 
 $failFast
 

Detailed Description

A CompositeValidator uses a list of sub-validators to validate the data.

It does not implement any validation logic directly.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Validators\CompositeValidator::__construct ( array  $validators,
  $failFast = true 
)
Parameters
ValueValidator[]$validators
bool$failFastIf true, validation will be aborted after the first sub validator fails.

Member Function Documentation

◆ setOptions()

Wikibase\Repo\Validators\CompositeValidator::setOptions ( array  $options)
See also
ValueValidator::setOptions()
Parameters
array$options

◆ validate()

Wikibase\Repo\Validators\CompositeValidator::validate (   $value)
See also
ValueValidator::validate()
Parameters
mixed$valueThe value to validate
Returns
Result

Member Data Documentation

◆ $failFast

Wikibase\Repo\Validators\CompositeValidator::$failFast
private

◆ $validators

Wikibase\Repo\Validators\CompositeValidator::$validators
private

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