Entry point for the Validator component.
@author Bernhard Schussek <bschussek@gmail.com>
Expanded class hierarchy of Validation
final class Validation {
/**
* Creates a new validator.
*
* If you want to configure the validator, use
* {@link createValidatorBuilder()} instead.
*
* @return ValidatorInterface The new validator.
*/
public static function createValidator() {
return self::createValidatorBuilder()
->getValidator();
}
/**
* Creates a configurable builder for validator objects.
*
* @return ValidatorBuilderInterface The new builder.
*/
public static function createValidatorBuilder() {
return new ValidatorBuilder();
}
/**
* This class cannot be instantiated.
*/
private function __construct() {
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Validation:: |
public static | function | Creates a new validator. | |
Validation:: |
public static | function | Creates a configurable builder for validator objects. | |
Validation:: |
private | function | This class cannot be instantiated. |