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 43 of file ValidatorFactory.php.
◆ get()
| 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 96 of file ValidatorFactory.php.
◆ loadInstance()
| MediaWiki\Extension\Translate\Validation\ValidatorFactory::loadInstance |
( |
| $class, |
|
|
| $params = null ) |
|
static |
Takes a Validator class name, and returns an instance of that class.
- Parameters
-
| class-string<MessageValidator> | $class Custom validator class name |
| mixed | null | $params | |
- Exceptions
-
- Returns
- MessageValidator
Definition at line 122 of file ValidatorFactory.php.
The documentation for this class was generated from the following file: