bd2f5c94e7a9697f81172d4f8b0fc09e2bc1e8f0
[yaffs-website] / vendor / symfony / validator / Tests / Fixtures / StubGlobalExecutionContext.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\Tests\Fixtures;
13
14 use Symfony\Component\Validator\ConstraintViolationList;
15 use Symfony\Component\Validator\GlobalExecutionContextInterface;
16 use Symfony\Component\Validator\ValidationVisitorInterface;
17
18 /**
19  * @author Bernhard Schussek <bschussek@gmail.com>
20  *
21  * @deprecated since version 2.5, to be removed in 3.0
22  */
23 class StubGlobalExecutionContext implements GlobalExecutionContextInterface
24 {
25     private $violations;
26     private $root;
27     private $visitor;
28
29     public function __construct($root = null, ValidationVisitorInterface $visitor = null)
30     {
31         $this->violations = new ConstraintViolationList();
32         $this->root = $root;
33         $this->visitor = $visitor;
34     }
35
36     public function getViolations()
37     {
38         return $this->violations;
39     }
40
41     public function setRoot($root)
42     {
43         $this->root = $root;
44     }
45
46     public function getRoot()
47     {
48         return $this->root;
49     }
50
51     public function setVisitor(ValidationVisitorInterface $visitor)
52     {
53         $this->visitor = $visitor;
54     }
55
56     public function getVisitor()
57     {
58         return $this->visitor;
59     }
60
61     public function getValidatorFactory()
62     {
63     }
64
65     public function getMetadataFactory()
66     {
67     }
68 }