1 | <?php |
||
10 | class WaypointValidator extends ConstraintValidator |
||
11 | { |
||
12 | /** |
||
13 | * Checks if the passed value is valid. |
||
14 | * |
||
15 | * @param mixed $waypoint The value that should be validated |
||
16 | * @param Constraint $constraint The constraint for the validation |
||
17 | * |
||
18 | * @return bool |
||
19 | */ |
||
20 | public function validate($waypoint, Constraint $constraint) |
||
36 | |||
37 | /** |
||
38 | * Check if the given waypoint is an oc waypoint. |
||
39 | * |
||
40 | * @param string $waypoint |
||
41 | * |
||
42 | * @return bool True if it is an oc waypoint |
||
43 | */ |
||
44 | protected function isOCWaypoint($waypoint) |
||
48 | |||
49 | /** |
||
50 | * Check if the given waypoint is an gc waypoint. |
||
51 | * |
||
52 | * @param string $waypoint |
||
53 | * |
||
54 | * @return bool True if it is an gc waypoint |
||
55 | */ |
||
56 | protected function isGCWaypoint($waypoint) |
||
60 | } |
||
61 |