A factory class used to instantiate instances of pre-provided Validators.
More...
|
static | get ( $id, $params=null) |
| Returns a validator instance based on the id specified.
|
|
static | loadInstance ( $class, $params=null) |
| Takes a Validator class name, and returns an instance of that class.
|
|
A factory class used to instantiate instances of pre-provided Validators.
- Author
- Abijeet Patro @license GPL-2.0-or-later
- Since
- 2019.06
Definition at line 37 of file ValidatorFactory.php.
◆ get()
static MediaWiki\Extension\Translate\Validation\ValidatorFactory::get |
( |
| $id, |
|
|
| $params = null ) |
|
static |
Returns a validator instance based on the id specified.
- Parameters
-
string | $id | Id of the pre-defined validator class |
mixed | null | $params | |
- Exceptions
-
- Returns
- MessageValidator
Definition at line 78 of file ValidatorFactory.php.
◆ loadInstance()
static MediaWiki\Extension\Translate\Validation\ValidatorFactory::loadInstance |
( |
| $class, |
|
|
| $params = null ) |
|
static |
Takes a Validator class name, and returns an instance of that class.
- Parameters
-
string | $class | Custom validator class name |
mixed | null | $params | |
- Exceptions
-
- Returns
- MessageValidator
Definition at line 106 of file ValidatorFactory.php.
The documentation for this class was generated from the following file: