final class Validation

Entry point for the Validator component.

@author Bernhard Schussek <bschussek@gmail.com>

Hierarchy

Expanded class hierarchy of Validation

4 files declare their use of Validation
Context.php in drupal/core/lib/Drupal/Component/Plugin/Context/Context.php
Contains \Drupal\Component\Plugin\Context\Context.
Context.php in drupal/core/lib/Drupal/Core/Plugin/Context/Context.php
Contains \Drupal\Core\Plugin\Context\Context.
ExecutablePluginBase.php in drupal/core/lib/Drupal/Core/Executable/ExecutablePluginBase.php
Contains \Drupal\Core\Executable\ExecutablePluginBase.
TypedDataManager.php in drupal/core/lib/Drupal/Core/TypedData/TypedDataManager.php
Contains \Drupal\Core\TypedData\TypedDataManager.

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Validation.php, line 19

Namespace

Symfony\Component\Validator
View source
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() {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Validation::createValidator public static function Creates a new validator.
Validation::createValidatorBuilder public static function Creates a configurable builder for validator objects.
Validation::__construct private function This class cannot be instantiated.