1 | <?php |
||
25 | class ValidatorFactory implements ValidatorFactoryInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var string[] |
||
29 | */ |
||
30 | private static $aValidatorMap = [ |
||
31 | self::NOT_EMPTY_VALIDATOR => NotEmpty::DIC_NAME, |
||
32 | self::NAME_VALIDATOR => JobName::DIC_NAME, |
||
33 | self::EPSILON_VALIDATOR => Epsilon::DIC_NAME, |
||
34 | self::BOOLEAN_VALIDATOR => IsBoolean::DIC_NAME, |
||
35 | self::SCHEDULE_VALIDATOR => Schedule::DIC_NAME, |
||
36 | self::ARRAY_VALIDATOR => IsArray::DIC_NAME, |
||
37 | self::RETRY_VALIDATOR => Retries::DIC_NAME, |
||
38 | self::CONSTRAINTS_VALIDATOR => Constraints::DIC_NAME, |
||
39 | self::CONTAINER_VALIDATOR => Container::DIC_NAME, |
||
40 | self::COMMAND_VALIDATOR => Command::DIC_NAME, |
||
41 | ]; |
||
42 | |||
43 | /** |
||
44 | * @var ContainerInterface |
||
45 | */ |
||
46 | private $oServiceContainer; |
||
47 | |||
48 | /** |
||
49 | * ValidatorFactory constructor. |
||
50 | * @param ContainerInterface $oServiceContainer |
||
51 | */ |
||
52 | public function __construct(ContainerInterface $oServiceContainer) |
||
56 | |||
57 | /** |
||
58 | * @param int $iValidator |
||
59 | * @return PropertyValidatorInterface |
||
60 | */ |
||
61 | public function getValidator($iValidator) |
||
70 | } |