Fix bug in style changes for the Use cases on the live site.
[yaffs-website] / vendor / symfony / validator / Validation.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Validator;
13
14 /**
15  * Entry point for the Validator component.
16  *
17  * @author Bernhard Schussek <bschussek@gmail.com>
18  */
19 final class Validation
20 {
21     /**
22      * The Validator API provided by Symfony 2.4 and older.
23      *
24      * @deprecated use API_VERSION_2_5_BC instead.
25      */
26     const API_VERSION_2_4 = 1;
27
28     /**
29      * The Validator API provided by Symfony 2.5 and newer.
30      */
31     const API_VERSION_2_5 = 2;
32
33     /**
34      * The Validator API provided by Symfony 2.5 and newer with a backwards
35      * compatibility layer for 2.4 and older.
36      */
37     const API_VERSION_2_5_BC = 3;
38
39     /**
40      * Creates a new validator.
41      *
42      * If you want to configure the validator, use
43      * {@link createValidatorBuilder()} instead.
44      *
45      * @return ValidatorInterface The new validator
46      */
47     public static function createValidator()
48     {
49         return self::createValidatorBuilder()->getValidator();
50     }
51
52     /**
53      * Creates a configurable builder for validator objects.
54      *
55      * @return ValidatorBuilderInterface The new builder
56      */
57     public static function createValidatorBuilder()
58     {
59         return new ValidatorBuilder();
60     }
61
62     /**
63      * This class cannot be instantiated.
64      */
65     private function __construct()
66     {
67     }
68 }