@@ -6,43 +6,43 @@ |
||
6 | 6 | |
7 | 7 | class MemberData extends \Route4Me\Common |
8 | 8 | { |
9 | - /** @var int $account_type_id */ |
|
10 | - public $account_type_id; |
|
9 | + /** @var int $account_type_id */ |
|
10 | + public $account_type_id; |
|
11 | 11 | |
12 | - /** @var string $member_email */ |
|
13 | - public $member_email; |
|
12 | + /** @var string $member_email */ |
|
13 | + public $member_email; |
|
14 | 14 | |
15 | - /** @var string $member_first_name */ |
|
16 | - public $member_first_name; |
|
15 | + /** @var string $member_first_name */ |
|
16 | + public $member_first_name; |
|
17 | 17 | |
18 | - /** @var int $member_id */ |
|
19 | - public $member_id; |
|
18 | + /** @var int $member_id */ |
|
19 | + public $member_id; |
|
20 | 20 | |
21 | - /** @var string $member_last_name */ |
|
22 | - public $member_last_name; |
|
21 | + /** @var string $member_last_name */ |
|
22 | + public $member_last_name; |
|
23 | 23 | |
24 | - /** @var string $member_type */ |
|
25 | - public $member_type; |
|
24 | + /** @var string $member_type */ |
|
25 | + public $member_type; |
|
26 | 26 | |
27 | - /** @var string $phone_number */ |
|
28 | - public $phone_number; |
|
27 | + /** @var string $phone_number */ |
|
28 | + public $phone_number; |
|
29 | 29 | |
30 | - /** @var boolean $readonly_user */ |
|
31 | - public $readonly_user; |
|
30 | + /** @var boolean $readonly_user */ |
|
31 | + public $readonly_user; |
|
32 | 32 | |
33 | - /** @var boolean $show_superuser_addresses */ |
|
34 | - public $show_superuser_addresses; |
|
33 | + /** @var boolean $show_superuser_addresses */ |
|
34 | + public $show_superuser_addresses; |
|
35 | 35 | |
36 | - public static function fromArray(array $params) |
|
37 | - { |
|
38 | - $memberData = new self(); |
|
36 | + public static function fromArray(array $params) |
|
37 | + { |
|
38 | + $memberData = new self(); |
|
39 | 39 | |
40 | - foreach ($params as $key => $value) { |
|
41 | - if (property_exists($memberData, $key)) { |
|
42 | - $memberData->{$key} = $value; |
|
43 | - } |
|
44 | - } |
|
40 | + foreach ($params as $key => $value) { |
|
41 | + if (property_exists($memberData, $key)) { |
|
42 | + $memberData->{$key} = $value; |
|
43 | + } |
|
44 | + } |
|
45 | 45 | |
46 | - return $memberData; |
|
47 | - } |
|
46 | + return $memberData; |
|
47 | + } |
|
48 | 48 | } |
49 | 49 | \ No newline at end of file |
@@ -4,26 +4,26 @@ |
||
4 | 4 | |
5 | 5 | class SetGpsResponse extends \Route4Me\Common |
6 | 6 | { |
7 | - /** @var boolean $status |
|
8 | - * Status of the GPS setting request process. |
|
9 | - */ |
|
10 | - public $status; |
|
7 | + /** @var boolean $status |
|
8 | + * Status of the GPS setting request process. |
|
9 | + */ |
|
10 | + public $status; |
|
11 | 11 | |
12 | - /** @var string $tx_id |
|
13 | - * Unique ID of the GPS points group. |
|
14 | - */ |
|
15 | - public $tx_id; |
|
12 | + /** @var string $tx_id |
|
13 | + * Unique ID of the GPS points group. |
|
14 | + */ |
|
15 | + public $tx_id; |
|
16 | 16 | |
17 | - public static function fromArray(array $params) |
|
18 | - { |
|
19 | - $gpsPosition = new self(); |
|
17 | + public static function fromArray(array $params) |
|
18 | + { |
|
19 | + $gpsPosition = new self(); |
|
20 | 20 | |
21 | - foreach ($params as $key => $value) { |
|
22 | - if (property_exists($gpsPosition, $key)) { |
|
23 | - $gpsPosition->{$key} = $value; |
|
24 | - } |
|
25 | - } |
|
21 | + foreach ($params as $key => $value) { |
|
22 | + if (property_exists($gpsPosition, $key)) { |
|
23 | + $gpsPosition->{$key} = $value; |
|
24 | + } |
|
25 | + } |
|
26 | 26 | |
27 | - return $gpsPosition; |
|
28 | - } |
|
27 | + return $gpsPosition; |
|
28 | + } |
|
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -10,108 +10,108 @@ |
||
10 | 10 | |
11 | 11 | class TrackSetParams extends \Route4Me\Common |
12 | 12 | { |
13 | - public $format; |
|
14 | - public $member_id; |
|
15 | - public $route_id; |
|
16 | - public $tx_id; |
|
17 | - public $vehicle_id; |
|
18 | - public $course; |
|
19 | - public $speed; |
|
20 | - public $lat; |
|
21 | - public $lng; |
|
22 | - public $altitude; |
|
23 | - public $device_type; |
|
24 | - public $device_guid; |
|
25 | - public $device_timestamp; |
|
26 | - public $app_version; |
|
27 | - |
|
28 | - public function __construct() |
|
29 | - { |
|
30 | - Route4Me\Route4Me::setBaseUrl(Endpoint::BASE_URL); |
|
31 | - } |
|
32 | - |
|
33 | - public static function fromArray(array $params) |
|
34 | - { |
|
35 | - $param = new self(); |
|
36 | - |
|
37 | - if (!isset($params['format'])) { |
|
38 | - throw new BadParam('format must be provided.'); |
|
39 | - } |
|
40 | - |
|
41 | - $types = [ |
|
42 | - Format::JSON, |
|
43 | - Format::SERIALIZED, |
|
44 | - Format::CSV, |
|
45 | - Format::XML, |
|
46 | - ]; |
|
47 | - if (!in_array($params['format'], $types)) { |
|
48 | - throw new BadParam('format is invalid.'); |
|
49 | - } |
|
50 | - |
|
51 | - if (!isset($params['route_id'])) { |
|
52 | - throw new BadParam('route_id must be provided.'); |
|
53 | - } |
|
54 | - |
|
55 | - if (!isset($params['member_id'])) { |
|
56 | - throw new BadParam('member_id must be provided.'); |
|
57 | - } |
|
58 | - |
|
59 | - if (!isset($params['course'])) { |
|
60 | - throw new BadParam('course must be provided.'); |
|
61 | - } |
|
62 | - |
|
63 | - if (!isset($params['speed'])) { |
|
64 | - throw new BadParam('speed must be provided.'); |
|
65 | - } |
|
66 | - |
|
67 | - if (!isset($params['lat'])) { |
|
68 | - throw new BadParam('lat must be provided.'); |
|
69 | - } |
|
70 | - |
|
71 | - if (!isset($params['lng'])) { |
|
72 | - throw new BadParam('lng must be provided.'); |
|
73 | - } |
|
74 | - |
|
75 | - if (!isset($params['device_type'])) { |
|
76 | - throw new BadParam('device_type must be provided.'); |
|
77 | - } |
|
78 | - |
|
79 | - $deviceTypes = [ |
|
80 | - DeviceType::IPHONE, |
|
81 | - DeviceType::IPAD, |
|
82 | - DeviceType::ANDROID_PHONE, |
|
83 | - DeviceType::ANDROID_TABLET, |
|
84 | - ]; |
|
85 | - if (!in_array($params['device_type'], $deviceTypes)) { |
|
86 | - throw new BadParam('device_type is invalid.'); |
|
87 | - } |
|
88 | - |
|
89 | - if (!isset($params['device_guid'])) { |
|
90 | - throw new BadParam('device_guid must be provided.'); |
|
91 | - } |
|
92 | - |
|
93 | - if (isset($params['device_timestamp'])) { |
|
94 | - $template = '/[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/i'; |
|
95 | - if (!preg_match($template, $params['device_timestamp'])) { |
|
96 | - throw new BadParam('device_timestamp is invalid.'); |
|
97 | - } |
|
98 | - } |
|
99 | - |
|
100 | - $param->format = self::getValue($params, 'format'); |
|
101 | - $param->route_id = self::getValue($params, 'route_id'); |
|
102 | - $param->member_id = self::getValue($params, 'member_id'); |
|
103 | - $param->course = self::getValue($params, 'course'); |
|
104 | - $param->speed = self::getValue($params, 'speed'); |
|
105 | - $param->lat = self::getValue($params, 'lat'); |
|
106 | - $param->lng = self::getValue($params, 'lng'); |
|
107 | - $param->device_type = self::getValue($params, 'device_type'); |
|
108 | - $param->device_guid = self::getValue($params, 'device_guid'); |
|
109 | - $param->device_timestamp = self::getValue($params, 'device_timestamp'); |
|
110 | - $param->vehicle_id = self::getValue($params, 'vehicle_id'); |
|
111 | - $param->altitude = self::getValue($params, 'altitude'); |
|
112 | - $param->app_version = self::getValue($params, 'app_version'); |
|
113 | - $param->tx_id = self::getValue($params, 'tx_id'); |
|
114 | - |
|
115 | - return $param; |
|
116 | - } |
|
13 | + public $format; |
|
14 | + public $member_id; |
|
15 | + public $route_id; |
|
16 | + public $tx_id; |
|
17 | + public $vehicle_id; |
|
18 | + public $course; |
|
19 | + public $speed; |
|
20 | + public $lat; |
|
21 | + public $lng; |
|
22 | + public $altitude; |
|
23 | + public $device_type; |
|
24 | + public $device_guid; |
|
25 | + public $device_timestamp; |
|
26 | + public $app_version; |
|
27 | + |
|
28 | + public function __construct() |
|
29 | + { |
|
30 | + Route4Me\Route4Me::setBaseUrl(Endpoint::BASE_URL); |
|
31 | + } |
|
32 | + |
|
33 | + public static function fromArray(array $params) |
|
34 | + { |
|
35 | + $param = new self(); |
|
36 | + |
|
37 | + if (!isset($params['format'])) { |
|
38 | + throw new BadParam('format must be provided.'); |
|
39 | + } |
|
40 | + |
|
41 | + $types = [ |
|
42 | + Format::JSON, |
|
43 | + Format::SERIALIZED, |
|
44 | + Format::CSV, |
|
45 | + Format::XML, |
|
46 | + ]; |
|
47 | + if (!in_array($params['format'], $types)) { |
|
48 | + throw new BadParam('format is invalid.'); |
|
49 | + } |
|
50 | + |
|
51 | + if (!isset($params['route_id'])) { |
|
52 | + throw new BadParam('route_id must be provided.'); |
|
53 | + } |
|
54 | + |
|
55 | + if (!isset($params['member_id'])) { |
|
56 | + throw new BadParam('member_id must be provided.'); |
|
57 | + } |
|
58 | + |
|
59 | + if (!isset($params['course'])) { |
|
60 | + throw new BadParam('course must be provided.'); |
|
61 | + } |
|
62 | + |
|
63 | + if (!isset($params['speed'])) { |
|
64 | + throw new BadParam('speed must be provided.'); |
|
65 | + } |
|
66 | + |
|
67 | + if (!isset($params['lat'])) { |
|
68 | + throw new BadParam('lat must be provided.'); |
|
69 | + } |
|
70 | + |
|
71 | + if (!isset($params['lng'])) { |
|
72 | + throw new BadParam('lng must be provided.'); |
|
73 | + } |
|
74 | + |
|
75 | + if (!isset($params['device_type'])) { |
|
76 | + throw new BadParam('device_type must be provided.'); |
|
77 | + } |
|
78 | + |
|
79 | + $deviceTypes = [ |
|
80 | + DeviceType::IPHONE, |
|
81 | + DeviceType::IPAD, |
|
82 | + DeviceType::ANDROID_PHONE, |
|
83 | + DeviceType::ANDROID_TABLET, |
|
84 | + ]; |
|
85 | + if (!in_array($params['device_type'], $deviceTypes)) { |
|
86 | + throw new BadParam('device_type is invalid.'); |
|
87 | + } |
|
88 | + |
|
89 | + if (!isset($params['device_guid'])) { |
|
90 | + throw new BadParam('device_guid must be provided.'); |
|
91 | + } |
|
92 | + |
|
93 | + if (isset($params['device_timestamp'])) { |
|
94 | + $template = '/[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/i'; |
|
95 | + if (!preg_match($template, $params['device_timestamp'])) { |
|
96 | + throw new BadParam('device_timestamp is invalid.'); |
|
97 | + } |
|
98 | + } |
|
99 | + |
|
100 | + $param->format = self::getValue($params, 'format'); |
|
101 | + $param->route_id = self::getValue($params, 'route_id'); |
|
102 | + $param->member_id = self::getValue($params, 'member_id'); |
|
103 | + $param->course = self::getValue($params, 'course'); |
|
104 | + $param->speed = self::getValue($params, 'speed'); |
|
105 | + $param->lat = self::getValue($params, 'lat'); |
|
106 | + $param->lng = self::getValue($params, 'lng'); |
|
107 | + $param->device_type = self::getValue($params, 'device_type'); |
|
108 | + $param->device_guid = self::getValue($params, 'device_guid'); |
|
109 | + $param->device_timestamp = self::getValue($params, 'device_timestamp'); |
|
110 | + $param->vehicle_id = self::getValue($params, 'vehicle_id'); |
|
111 | + $param->altitude = self::getValue($params, 'altitude'); |
|
112 | + $param->app_version = self::getValue($params, 'app_version'); |
|
113 | + $param->tx_id = self::getValue($params, 'tx_id'); |
|
114 | + |
|
115 | + return $param; |
|
116 | + } |
|
117 | 117 | } |
@@ -9,25 +9,25 @@ |
||
9 | 9 | */ |
10 | 10 | class UserLocation extends \Route4Me\Common |
11 | 11 | { |
12 | - /** @var MemberData[] $member_data */ |
|
13 | - public $member_data=[]; |
|
12 | + /** @var MemberData[] $member_data */ |
|
13 | + public $member_data=[]; |
|
14 | 14 | |
15 | - /** @var UserTracking[] $tracking */ |
|
16 | - public $tracking = []; |
|
15 | + /** @var UserTracking[] $tracking */ |
|
16 | + public $tracking = []; |
|
17 | 17 | |
18 | - /** @var boolean $from_cache*/ |
|
19 | - public $from_cache; |
|
18 | + /** @var boolean $from_cache*/ |
|
19 | + public $from_cache; |
|
20 | 20 | |
21 | - public static function fromArray(array $params) |
|
22 | - { |
|
23 | - $userLocation = new self(); |
|
21 | + public static function fromArray(array $params) |
|
22 | + { |
|
23 | + $userLocation = new self(); |
|
24 | 24 | |
25 | - foreach ($params as $key => $value) { |
|
26 | - if (property_exists($userLocation, $key)) { |
|
27 | - $userLocation->{$key} = $value; |
|
28 | - } |
|
29 | - } |
|
25 | + foreach ($params as $key => $value) { |
|
26 | + if (property_exists($userLocation, $key)) { |
|
27 | + $userLocation->{$key} = $value; |
|
28 | + } |
|
29 | + } |
|
30 | 30 | |
31 | - return $userLocation; |
|
32 | - } |
|
31 | + return $userLocation; |
|
32 | + } |
|
33 | 33 | } |
34 | 34 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
10 | 10 | class UserLocation extends \Route4Me\Common |
11 | 11 | { |
12 | 12 | /** @var MemberData[] $member_data */ |
13 | - public $member_data=[]; |
|
13 | + public $member_data = []; |
|
14 | 14 | |
15 | 15 | /** @var UserTracking[] $tracking */ |
16 | 16 | public $tracking = []; |
@@ -8,154 +8,154 @@ |
||
8 | 8 | */ |
9 | 9 | class FindAssetResponse extends \Route4Me\Common |
10 | 10 | { |
11 | - /** |
|
12 | - * Tracking number |
|
13 | - * @var type string |
|
14 | - */ |
|
15 | - public $tracking_number; |
|
16 | - |
|
17 | - /** |
|
18 | - * A link to a large logo |
|
19 | - * @var type string |
|
20 | - */ |
|
21 | - public $large_logo_uri; |
|
22 | - |
|
23 | - /** |
|
24 | - * A link to a large logo (2x) |
|
25 | - * @var type string |
|
26 | - */ |
|
27 | - public $large_logo_uri_2x; |
|
28 | - |
|
29 | - /** |
|
30 | - * A link to a mobile logo |
|
31 | - * @var type string |
|
32 | - */ |
|
33 | - public $mobile_logo_uri; |
|
34 | - |
|
35 | - /** |
|
36 | - * A link to a mobile logo (2x) |
|
37 | - * @var type string |
|
38 | - */ |
|
39 | - public $mobile_logo_uri_2x; |
|
40 | - |
|
41 | - /** |
|
42 | - * The asset color on a map |
|
43 | - * @var type string |
|
44 | - */ |
|
45 | - public $map_color; |
|
46 | - |
|
47 | - /** |
|
48 | - * An alignment of a large logo |
|
49 | - * @var type string |
|
50 | - */ |
|
51 | - public $large_logo_alignment; |
|
52 | - |
|
53 | - /** |
|
54 | - * An alignment of a mobile logo |
|
55 | - * @var type string |
|
56 | - */ |
|
57 | - public $mobile_logo_alignment; |
|
58 | - |
|
59 | - /** |
|
60 | - * Show map zoom controls |
|
61 | - * @var type Boolean |
|
62 | - */ |
|
63 | - public $show_map_zoom_controls; |
|
64 | - |
|
65 | - /** |
|
66 | - * Customer service phone |
|
67 | - * @var type string |
|
68 | - */ |
|
69 | - public $customer_service_phone; |
|
70 | - |
|
71 | - /** |
|
72 | - * If true, Covid19 warning hidden |
|
73 | - * @var type |
|
74 | - */ |
|
75 | - public $hide_covid19_warning; |
|
76 | - |
|
77 | - /** |
|
78 | - * Driver phone number |
|
79 | - * @var type string |
|
80 | - */ |
|
81 | - public $driver_phone; |
|
82 | - |
|
83 | - /** |
|
84 | - * If true, the route started |
|
85 | - * @var type Boolean |
|
86 | - */ |
|
87 | - public $route_started; |
|
88 | - |
|
89 | - /** |
|
90 | - * Driver name |
|
91 | - * @var type string |
|
92 | - */ |
|
93 | - public $driver_name; |
|
94 | - |
|
95 | - /** |
|
96 | - * A link to a driver picture file |
|
97 | - * @var type string |
|
98 | - */ |
|
99 | - public $driver_picture; |
|
100 | - |
|
101 | - /** |
|
102 | - * A sub-headline of a tracking page |
|
103 | - * @var type string |
|
104 | - */ |
|
105 | - public $tracking_page_subheadline; |
|
106 | - |
|
107 | - /** |
|
108 | - * A first destination address |
|
109 | - * @var type string |
|
110 | - */ |
|
111 | - public $destination_address_1; |
|
112 | - |
|
113 | - /** |
|
114 | - * A second destination address |
|
115 | - * @var type string |
|
116 | - */ |
|
117 | - public $destination_address_2; |
|
118 | - |
|
119 | - /** |
|
120 | - * True if the asset was delivered |
|
121 | - * @var type Boolean |
|
122 | - */ |
|
123 | - public $delivered; |
|
124 | - |
|
125 | - /** |
|
126 | - * Asset status history |
|
127 | - * @var type array |
|
128 | - */ |
|
129 | - public $status_history = []; |
|
130 | - |
|
131 | - /** |
|
132 | - * An array of the asset locations |
|
133 | - * @var type array |
|
134 | - */ |
|
135 | - public $locations = []; |
|
136 | - |
|
137 | - /** |
|
138 | - * Custom data |
|
139 | - * @var type array |
|
140 | - */ |
|
141 | - public $custom_data; |
|
142 | - |
|
143 | - /** |
|
144 | - * An array of the asset arrival times |
|
145 | - * @var type array |
|
146 | - */ |
|
147 | - public $arrival = []; |
|
11 | + /** |
|
12 | + * Tracking number |
|
13 | + * @var type string |
|
14 | + */ |
|
15 | + public $tracking_number; |
|
16 | + |
|
17 | + /** |
|
18 | + * A link to a large logo |
|
19 | + * @var type string |
|
20 | + */ |
|
21 | + public $large_logo_uri; |
|
22 | + |
|
23 | + /** |
|
24 | + * A link to a large logo (2x) |
|
25 | + * @var type string |
|
26 | + */ |
|
27 | + public $large_logo_uri_2x; |
|
28 | + |
|
29 | + /** |
|
30 | + * A link to a mobile logo |
|
31 | + * @var type string |
|
32 | + */ |
|
33 | + public $mobile_logo_uri; |
|
34 | + |
|
35 | + /** |
|
36 | + * A link to a mobile logo (2x) |
|
37 | + * @var type string |
|
38 | + */ |
|
39 | + public $mobile_logo_uri_2x; |
|
40 | + |
|
41 | + /** |
|
42 | + * The asset color on a map |
|
43 | + * @var type string |
|
44 | + */ |
|
45 | + public $map_color; |
|
46 | + |
|
47 | + /** |
|
48 | + * An alignment of a large logo |
|
49 | + * @var type string |
|
50 | + */ |
|
51 | + public $large_logo_alignment; |
|
52 | + |
|
53 | + /** |
|
54 | + * An alignment of a mobile logo |
|
55 | + * @var type string |
|
56 | + */ |
|
57 | + public $mobile_logo_alignment; |
|
58 | + |
|
59 | + /** |
|
60 | + * Show map zoom controls |
|
61 | + * @var type Boolean |
|
62 | + */ |
|
63 | + public $show_map_zoom_controls; |
|
64 | + |
|
65 | + /** |
|
66 | + * Customer service phone |
|
67 | + * @var type string |
|
68 | + */ |
|
69 | + public $customer_service_phone; |
|
70 | + |
|
71 | + /** |
|
72 | + * If true, Covid19 warning hidden |
|
73 | + * @var type |
|
74 | + */ |
|
75 | + public $hide_covid19_warning; |
|
76 | + |
|
77 | + /** |
|
78 | + * Driver phone number |
|
79 | + * @var type string |
|
80 | + */ |
|
81 | + public $driver_phone; |
|
82 | + |
|
83 | + /** |
|
84 | + * If true, the route started |
|
85 | + * @var type Boolean |
|
86 | + */ |
|
87 | + public $route_started; |
|
88 | + |
|
89 | + /** |
|
90 | + * Driver name |
|
91 | + * @var type string |
|
92 | + */ |
|
93 | + public $driver_name; |
|
94 | + |
|
95 | + /** |
|
96 | + * A link to a driver picture file |
|
97 | + * @var type string |
|
98 | + */ |
|
99 | + public $driver_picture; |
|
100 | + |
|
101 | + /** |
|
102 | + * A sub-headline of a tracking page |
|
103 | + * @var type string |
|
104 | + */ |
|
105 | + public $tracking_page_subheadline; |
|
106 | + |
|
107 | + /** |
|
108 | + * A first destination address |
|
109 | + * @var type string |
|
110 | + */ |
|
111 | + public $destination_address_1; |
|
112 | + |
|
113 | + /** |
|
114 | + * A second destination address |
|
115 | + * @var type string |
|
116 | + */ |
|
117 | + public $destination_address_2; |
|
118 | + |
|
119 | + /** |
|
120 | + * True if the asset was delivered |
|
121 | + * @var type Boolean |
|
122 | + */ |
|
123 | + public $delivered; |
|
124 | + |
|
125 | + /** |
|
126 | + * Asset status history |
|
127 | + * @var type array |
|
128 | + */ |
|
129 | + public $status_history = []; |
|
130 | + |
|
131 | + /** |
|
132 | + * An array of the asset locations |
|
133 | + * @var type array |
|
134 | + */ |
|
135 | + public $locations = []; |
|
136 | + |
|
137 | + /** |
|
138 | + * Custom data |
|
139 | + * @var type array |
|
140 | + */ |
|
141 | + public $custom_data; |
|
142 | + |
|
143 | + /** |
|
144 | + * An array of the asset arrival times |
|
145 | + * @var type array |
|
146 | + */ |
|
147 | + public $arrival = []; |
|
148 | 148 | |
149 | - public static function fromArray(array $params) |
|
150 | - { |
|
151 | - $findAssetResponse = new self(); |
|
149 | + public static function fromArray(array $params) |
|
150 | + { |
|
151 | + $findAssetResponse = new self(); |
|
152 | 152 | |
153 | - foreach ($params as $key => $value) { |
|
154 | - if (property_exists($findAssetResponse, $key)) { |
|
155 | - $findAssetResponse->{$key} = $value; |
|
156 | - } |
|
157 | - } |
|
153 | + foreach ($params as $key => $value) { |
|
154 | + if (property_exists($findAssetResponse, $key)) { |
|
155 | + $findAssetResponse->{$key} = $value; |
|
156 | + } |
|
157 | + } |
|
158 | 158 | |
159 | - return $findAssetResponse; |
|
160 | - } |
|
159 | + return $findAssetResponse; |
|
160 | + } |
|
161 | 161 | } |
162 | 162 | \ No newline at end of file |
@@ -6,97 +6,97 @@ |
||
6 | 6 | |
7 | 7 | class UserTracking extends \Route4Me\Common |
8 | 8 | { |
9 | - /** @var string $route_id */ |
|
10 | - public $route_id; |
|
9 | + /** @var string $route_id */ |
|
10 | + public $route_id; |
|
11 | 11 | |
12 | - /** @var string $device_id */ |
|
13 | - public $device_id; |
|
12 | + /** @var string $device_id */ |
|
13 | + public $device_id; |
|
14 | 14 | |
15 | - /** @var long $activity_timestamp */ |
|
16 | - public $activity_timestamp; |
|
15 | + /** @var long $activity_timestamp */ |
|
16 | + public $activity_timestamp; |
|
17 | 17 | |
18 | - /** @var string $activity_timestamp */ |
|
19 | - public $device_timestamp; |
|
18 | + /** @var string $activity_timestamp */ |
|
19 | + public $device_timestamp; |
|
20 | 20 | |
21 | - /** @var int $device_type */ |
|
22 | - public $device_type; |
|
21 | + /** @var int $device_type */ |
|
22 | + public $device_type; |
|
23 | 23 | |
24 | - /** @var int $member_id */ |
|
25 | - public $member_id; |
|
24 | + /** @var int $member_id */ |
|
25 | + public $member_id; |
|
26 | 26 | |
27 | - /** @var int $root_member_id */ |
|
28 | - public $root_member_id; |
|
27 | + /** @var int $root_member_id */ |
|
28 | + public $root_member_id; |
|
29 | 29 | |
30 | - /** @var string $vehicle_id */ |
|
31 | - public $vehicle_id; |
|
30 | + /** @var string $vehicle_id */ |
|
31 | + public $vehicle_id; |
|
32 | 32 | |
33 | - /** @var int $direction */ |
|
34 | - public $direction; |
|
33 | + /** @var int $direction */ |
|
34 | + public $direction; |
|
35 | 35 | |
36 | - /** @var int $speed */ |
|
37 | - public $speed; |
|
36 | + /** @var int $speed */ |
|
37 | + public $speed; |
|
38 | 38 | |
39 | - /** @var string $calculated_speed */ |
|
40 | - public $calculated_speed; |
|
39 | + /** @var string $calculated_speed */ |
|
40 | + public $calculated_speed; |
|
41 | 41 | |
42 | - /** @var string $speed_accuracy */ |
|
43 | - public $speed_accuracy; |
|
42 | + /** @var string $speed_accuracy */ |
|
43 | + public $speed_accuracy; |
|
44 | 44 | |
45 | - /** @var string $speed_unit */ |
|
46 | - public $speed_unit; |
|
45 | + /** @var string $speed_unit */ |
|
46 | + public $speed_unit; |
|
47 | 47 | |
48 | - /** @var int $bearing */ |
|
49 | - public $bearing; |
|
48 | + /** @var int $bearing */ |
|
49 | + public $bearing; |
|
50 | 50 | |
51 | - /** @var string $bearing_accuracy */ |
|
52 | - public $bearing_accuracy; |
|
51 | + /** @var string $bearing_accuracy */ |
|
52 | + public $bearing_accuracy; |
|
53 | 53 | |
54 | - /** @var string $accuracy */ |
|
55 | - public $accuracy; |
|
54 | + /** @var string $accuracy */ |
|
55 | + public $accuracy; |
|
56 | 56 | |
57 | - /** @var int $day_id */ |
|
58 | - public $day_id; |
|
57 | + /** @var int $day_id */ |
|
58 | + public $day_id; |
|
59 | 59 | |
60 | - /** @var double $position_lat */ |
|
61 | - public $position_lat; |
|
60 | + /** @var double $position_lat */ |
|
61 | + public $position_lat; |
|
62 | 62 | |
63 | - /** @var double $position_lng */ |
|
64 | - public $position_lng; |
|
63 | + /** @var double $position_lng */ |
|
64 | + public $position_lng; |
|
65 | 65 | |
66 | - /** @var int $altitude */ |
|
67 | - public $altitude; |
|
66 | + /** @var int $altitude */ |
|
67 | + public $altitude; |
|
68 | 68 | |
69 | - /** @var int $footsteps */ |
|
70 | - public $footsteps; |
|
69 | + /** @var int $footsteps */ |
|
70 | + public $footsteps; |
|
71 | 71 | |
72 | - /** @var string $data_source_name */ |
|
73 | - public $data_source_name; |
|
72 | + /** @var string $data_source_name */ |
|
73 | + public $data_source_name; |
|
74 | 74 | |
75 | - /** @var string $custom_data */ |
|
76 | - public $custom_data; |
|
75 | + /** @var string $custom_data */ |
|
76 | + public $custom_data; |
|
77 | 77 | |
78 | - /** @var string $device_timezone */ |
|
79 | - public $device_timezone; |
|
78 | + /** @var string $device_timezone */ |
|
79 | + public $device_timezone; |
|
80 | 80 | |
81 | - /** @var int $device_timezone_offset */ |
|
82 | - public $device_timezone_offset; |
|
81 | + /** @var int $device_timezone_offset */ |
|
82 | + public $device_timezone_offset; |
|
83 | 83 | |
84 | - /** @var string $activity_timestamp_friendly */ |
|
85 | - public $activity_timestamp_friendly; |
|
84 | + /** @var string $activity_timestamp_friendly */ |
|
85 | + public $activity_timestamp_friendly; |
|
86 | 86 | |
87 | - /** @var long $LAST_KNOWN */ |
|
88 | - public $LAST_KNOWN; |
|
87 | + /** @var long $LAST_KNOWN */ |
|
88 | + public $LAST_KNOWN; |
|
89 | 89 | |
90 | - public static function fromArray(array $params) |
|
91 | - { |
|
92 | - $userTracking = new self(); |
|
90 | + public static function fromArray(array $params) |
|
91 | + { |
|
92 | + $userTracking = new self(); |
|
93 | 93 | |
94 | - foreach ($params as $key => $value) { |
|
95 | - if (property_exists($userTracking, $key)) { |
|
96 | - $userTracking->{$key} = $value; |
|
97 | - } |
|
98 | - } |
|
94 | + foreach ($params as $key => $value) { |
|
95 | + if (property_exists($userTracking, $key)) { |
|
96 | + $userTracking->{$key} = $value; |
|
97 | + } |
|
98 | + } |
|
99 | 99 | |
100 | - return $userTracking; |
|
101 | - } |
|
100 | + return $userTracking; |
|
101 | + } |
|
102 | 102 | } |
103 | 103 | \ No newline at end of file |
@@ -7,32 +7,32 @@ |
||
7 | 7 | |
8 | 8 | class Track extends \Route4Me\Common |
9 | 9 | { |
10 | - public function __construct() |
|
11 | - { |
|
12 | - Route4Me\Route4Me::setBaseUrl(Endpoint::BASE_URL); |
|
13 | - } |
|
14 | - |
|
15 | - public static function set(TrackSetParams $params) |
|
16 | - { |
|
17 | - $allQueryFields = Route4Me\Route4Me::getObjectProperties(new TrackSetParams(), ['tx_id']); |
|
18 | - |
|
19 | - $json = Route4Me\Route4Me::makeRequst([ |
|
20 | - 'url' => Endpoint::TRACK_SET, |
|
21 | - 'method' => 'GET', |
|
22 | - 'query' => Route4Me\Route4Me::generateRequestParameters($allQueryFields, $params), |
|
23 | - ]); |
|
24 | - |
|
25 | - return $json; |
|
26 | - } |
|
27 | - |
|
28 | - public static function getUserLocations($query=null) |
|
29 | - { |
|
30 | - $json = Route4Me\Route4Me::makeRequst([ |
|
31 | - 'url' => Endpoint::USER_LOCATION, |
|
32 | - 'method' => 'GET', |
|
33 | - 'query' => isset($query) ? ['query' => $query] : null |
|
34 | - ]); |
|
35 | - |
|
36 | - return $json; |
|
37 | - } |
|
10 | + public function __construct() |
|
11 | + { |
|
12 | + Route4Me\Route4Me::setBaseUrl(Endpoint::BASE_URL); |
|
13 | + } |
|
14 | + |
|
15 | + public static function set(TrackSetParams $params) |
|
16 | + { |
|
17 | + $allQueryFields = Route4Me\Route4Me::getObjectProperties(new TrackSetParams(), ['tx_id']); |
|
18 | + |
|
19 | + $json = Route4Me\Route4Me::makeRequst([ |
|
20 | + 'url' => Endpoint::TRACK_SET, |
|
21 | + 'method' => 'GET', |
|
22 | + 'query' => Route4Me\Route4Me::generateRequestParameters($allQueryFields, $params), |
|
23 | + ]); |
|
24 | + |
|
25 | + return $json; |
|
26 | + } |
|
27 | + |
|
28 | + public static function getUserLocations($query=null) |
|
29 | + { |
|
30 | + $json = Route4Me\Route4Me::makeRequst([ |
|
31 | + 'url' => Endpoint::USER_LOCATION, |
|
32 | + 'method' => 'GET', |
|
33 | + 'query' => isset($query) ? ['query' => $query] : null |
|
34 | + ]); |
|
35 | + |
|
36 | + return $json; |
|
37 | + } |
|
38 | 38 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | return $json; |
26 | 26 | } |
27 | 27 | |
28 | - public static function getUserLocations($query=null) |
|
28 | + public static function getUserLocations($query = null) |
|
29 | 29 | { |
30 | 30 | $json = Route4Me\Route4Me::makeRequst([ |
31 | 31 | 'url' => Endpoint::USER_LOCATION, |
@@ -10,32 +10,32 @@ |
||
10 | 10 | */ |
11 | 11 | class ServiceTimeRulesClass |
12 | 12 | { |
13 | - /** |
|
14 | - * Mode of a first item of the bundled addresses. |
|
15 | - * @var integer |
|
16 | - * @see Enum\AddressBundlingModes\FirstItemMode |
|
17 | - */ |
|
18 | - public $first_item_mode = AddressBundlingModes\FirstItemMode::KEEP_ORIGINAL; |
|
13 | + /** |
|
14 | + * Mode of a first item of the bundled addresses. |
|
15 | + * @var integer |
|
16 | + * @see Enum\AddressBundlingModes\FirstItemMode |
|
17 | + */ |
|
18 | + public $first_item_mode = AddressBundlingModes\FirstItemMode::KEEP_ORIGINAL; |
|
19 | 19 | |
20 | - /** |
|
21 | - * First item mode parameters.<br> |
|
22 | - * If FirstItemMode=CustomTime, contains custom service time in seconds. |
|
23 | - * @var integer[] |
|
24 | - */ |
|
25 | - public $first_item_mode_params = []; |
|
20 | + /** |
|
21 | + * First item mode parameters.<br> |
|
22 | + * If FirstItemMode=CustomTime, contains custom service time in seconds. |
|
23 | + * @var integer[] |
|
24 | + */ |
|
25 | + public $first_item_mode_params = []; |
|
26 | 26 | |
27 | - /** |
|
28 | - * Mode of the non-first items of the bundled addresses. |
|
29 | - * @var integer |
|
30 | - * @see Enum\AddressBundlingModes\AdditionalItemsMode |
|
31 | - */ |
|
32 | - public $additional_items_mode = AddressBundlingModes\AdditionalItemsMode::KEEP_ORIGINAL; |
|
27 | + /** |
|
28 | + * Mode of the non-first items of the bundled addresses. |
|
29 | + * @var integer |
|
30 | + * @see Enum\AddressBundlingModes\AdditionalItemsMode |
|
31 | + */ |
|
32 | + public $additional_items_mode = AddressBundlingModes\AdditionalItemsMode::KEEP_ORIGINAL; |
|
33 | 33 | |
34 | - /** |
|
35 | - * Additional items mode parameters:<br> |
|
36 | - * if AdditionalItemsMode=AddressBundlingAdditionalItemsMode.CustomTime, |
|
37 | - * contains an array of the custom service times. |
|
38 | - * @var integer[] |
|
39 | - */ |
|
40 | - public $additional_items_mode_params = []; |
|
34 | + /** |
|
35 | + * Additional items mode parameters:<br> |
|
36 | + * if AdditionalItemsMode=AddressBundlingAdditionalItemsMode.CustomTime, |
|
37 | + * contains an array of the custom service times. |
|
38 | + * @var integer[] |
|
39 | + */ |
|
40 | + public $additional_items_mode_params = []; |
|
41 | 41 | } |
@@ -11,28 +11,28 @@ |
||
11 | 11 | */ |
12 | 12 | class Direction extends Common |
13 | 13 | { |
14 | - /** |
|
15 | - * Starting location of a direction |
|
16 | - * @var DirectionLocation |
|
17 | - */ |
|
18 | - public $location = []; |
|
19 | - |
|
20 | - /** |
|
21 | - * The direction steps |
|
22 | - * @var DirectionStep[] |
|
23 | - */ |
|
24 | - public $steps = []; |
|
25 | - |
|
26 | - public static function fromArray(array $params) |
|
27 | - { |
|
28 | - $thisParams = new self(); |
|
29 | - |
|
30 | - foreach ($params as $key => $value) { |
|
31 | - if (property_exists($thisParams, $key)) { |
|
32 | - $thisParams->{$key} = $value; |
|
33 | - } |
|
34 | - } |
|
35 | - |
|
36 | - return $thisParams; |
|
37 | - } |
|
14 | + /** |
|
15 | + * Starting location of a direction |
|
16 | + * @var DirectionLocation |
|
17 | + */ |
|
18 | + public $location = []; |
|
19 | + |
|
20 | + /** |
|
21 | + * The direction steps |
|
22 | + * @var DirectionStep[] |
|
23 | + */ |
|
24 | + public $steps = []; |
|
25 | + |
|
26 | + public static function fromArray(array $params) |
|
27 | + { |
|
28 | + $thisParams = new self(); |
|
29 | + |
|
30 | + foreach ($params as $key => $value) { |
|
31 | + if (property_exists($thisParams, $key)) { |
|
32 | + $thisParams->{$key} = $value; |
|
33 | + } |
|
34 | + } |
|
35 | + |
|
36 | + return $thisParams; |
|
37 | + } |
|
38 | 38 | } |
39 | 39 | \ No newline at end of file |