1 | <?php |
||
21 | class ValidatorManager |
||
22 | { |
||
23 | /** |
||
24 | * @var \Jb\Bundle\FileUploaderBundle\Service\ValidatorChain |
||
25 | */ |
||
26 | protected $validators; |
||
27 | |||
28 | /** |
||
29 | * @var \Jb\Bundle\FileUploaderBundle\Service\EndpointConfiguration |
||
30 | */ |
||
31 | protected $configuration; |
||
32 | |||
33 | /** |
||
34 | * Constructor |
||
35 | * |
||
36 | * @param \Jb\Bundle\FileUploaderBundle\Service\ValidatorChain $validators |
||
37 | * @param \Jb\Bundle\FileUploaderBundle\Service\EndpointConfiguration $configuration |
||
38 | */ |
||
39 | public function __construct(ValidatorChain $validators, EndpointConfiguration $configuration) |
||
44 | |||
45 | /** |
||
46 | * Validate by applying validators from validator chain |
||
47 | * |
||
48 | * @param string $endpoint |
||
49 | * @param mixed $value |
||
50 | * @param string $configKey |
||
51 | * |
||
52 | * @throws \Jb\Bundle\FileUploaderBundle\Exception\ValidationException |
||
53 | */ |
||
54 | public function validate($endpoint, $value, $configKey = 'upload_validators') |
||
63 | } |
||
64 |