1 | <?php |
||
19 | class PathElevationRequest implements ElevationRequestInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var LocationInterface[] |
||
23 | */ |
||
24 | private $paths = []; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | */ |
||
29 | private $samples; |
||
30 | |||
31 | /** |
||
32 | * @param LocationInterface[] $paths |
||
33 | * @param int $samples |
||
34 | */ |
||
35 | public function __construct(array $paths, $samples = 3) |
||
40 | |||
41 | /** |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function hasPaths() |
||
48 | |||
49 | /** |
||
50 | * @return LocationInterface[] |
||
51 | */ |
||
52 | public function getPaths() |
||
56 | |||
57 | /** |
||
58 | * @param LocationInterface[] $paths |
||
59 | */ |
||
60 | public function setPaths(array $paths) |
||
65 | |||
66 | /** |
||
67 | * @param LocationInterface[] $paths |
||
68 | */ |
||
69 | public function addPaths(array $paths) |
||
75 | |||
76 | /** |
||
77 | * @param LocationInterface $path |
||
78 | * |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function hasPath(LocationInterface $path) |
||
85 | |||
86 | /** |
||
87 | * @param LocationInterface $path |
||
88 | */ |
||
89 | public function addPath(LocationInterface $path) |
||
95 | |||
96 | /** |
||
97 | * @param LocationInterface $path |
||
98 | */ |
||
99 | public function removePath(LocationInterface $path) |
||
104 | |||
105 | /** |
||
106 | * @return int |
||
107 | */ |
||
108 | public function getSamples() |
||
112 | |||
113 | /** |
||
114 | * @param int $samples |
||
115 | */ |
||
116 | public function setSamples($samples) |
||
120 | |||
121 | /** |
||
122 | * {@inheritdoc} |
||
123 | */ |
||
124 | public function build() |
||
133 | } |
||
134 |