1+ <?php
2+
3+ namespace Trafiklab \Common \Model \Contract ;
4+
5+ use Trafiklab \Common \Model \Enum \TransportType ;
6+
7+ /**
8+ * A stop location found by a FindStopLocationRequest.
9+ *
10+ * @see FindStopLocationRequest
11+ * @see FindStopLocationResponse
12+ *
13+ * @api
14+ * @package Trafiklab\Common\Model\Contract
15+ */
16+ interface FindStopLocationEntry
17+ {
18+ /**
19+ * Get the id of this stop area.
20+ *
21+ * @return string The id of this stop area.
22+ */
23+ public function getId (): string ;
24+
25+ /**
26+ * Get the name of this stop area.
27+ *
28+ * @return string The name of this stop area.
29+ */
30+ public function getName (): string ;
31+
32+ /**
33+ * The longitude of this stop area.
34+ *
35+ * @return float The longitude of this stop area.
36+ */
37+ public function getLongitude (): float ;
38+
39+ /**
40+ * The latitude of this stop area.
41+ *
42+ * @return float The latitude of this stop area.
43+ */
44+ public function getLatitude (): float ;
45+
46+ /**
47+ * The sorting weight for this station. This can be determined by the number of vehicles stopping there, the
48+ * number of passengers, ...
49+ *
50+ * @return int The sorting weight for this station.
51+ */
52+ public function getWeight (): int ;
53+
54+ /**
55+ * Check if a certain mode of transport stops at this stop location.
56+ *
57+ * @param int $transportType The type of transport, one of the constants in TransportType
58+ *
59+ * @return bool Whether or not the specified type of traffic can stop in this point. In case an API doesn't provide
60+ * this information, it will always return true.
61+ *
62+ * @see TransportType
63+ */
64+ public function isStopAreaForTransportType (int $ transportType ): bool ;
65+ }
0 commit comments