| 1 | <?php |
||
| 16 | class Container extends AbstractPropertyValidator implements PropertyValidatorInterface |
||
| 17 | { |
||
| 18 | const DIC_NAME = 'ContainerValidator'; |
||
| 19 | const MESSAGE_TEMPLATE = '"%s" is not valid. Type (required), image (required), forcePullImage (optional), network (optional), and volumes (optional)'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @inheritDoc |
||
| 23 | */ |
||
| 24 | 3 | public function isValid($property, JobEntityInterface $jobEntity) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @param JobEntity\ContainerEntity $container |
||
| 35 | * @return bool |
||
| 36 | * |
||
| 37 | * @see http://mesos.github.io/chronos/docs/api.html#adding-a-docker-job |
||
| 38 | * This contains the subfields for the Docker container: |
||
| 39 | * type (required), image (required), forcePullImage (optional), network (optional), |
||
| 40 | * and volumes (optional) |
||
| 41 | */ |
||
| 42 | 3 | private function isContainerPropertyValid($container) |
|
| 64 | } |
||
| 65 |