@@ -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 |
@@ -6,75 +6,75 @@ |
||
| 6 | 6 | |
| 7 | 7 | class TelematicsVendor extends Common |
| 8 | 8 | { |
| 9 | - public $id; // Telematics Vendor id |
|
| 10 | - public $name; // Vendor name |
|
| 11 | - public $slug; // Vendor slug |
|
| 12 | - public $description; // Vendor description |
|
| 13 | - public $logo_url; // Vendor's logo URL |
|
| 14 | - public $website_url; // Vendor's website URL |
|
| 15 | - public $api_docs_url; // API documentation URL |
|
| 16 | - public $is_integrated; // If 1, the vendor is integrated in Route4Me |
|
| 17 | - public $size; // Vendor size |
|
| 18 | - public $page; // starting page |
|
| 19 | - public $per_page; // Vendors per page in a response |
|
| 20 | - public $countries = []; // Country Alpha 2 code |
|
| 21 | - public $features = []; // Vendor's feature |
|
| 22 | - public $search; // Searched text |
|
| 23 | - public $vendors; // Comma-delimited list of the vendors IDs. |
|
| 24 | - |
|
| 25 | - public static function fromArray(array $params) |
|
| 26 | - { |
|
| 27 | - $vendorsParameters = new self(); |
|
| 28 | - |
|
| 29 | - foreach ($params as $key => $value) { |
|
| 30 | - if (property_exists($vendorsParameters, $key)) { |
|
| 31 | - $vendorsParameters->{$key} = $value; |
|
| 32 | - } |
|
| 33 | - } |
|
| 34 | - |
|
| 35 | - return $vendorsParameters; |
|
| 36 | - } |
|
| 37 | - |
|
| 38 | - public static function GetTelematicsVendors($params) |
|
| 39 | - { |
|
| 40 | - Route4Me::setBaseUrl(Endpoint::TELEMATICS_VENDORS); |
|
| 41 | - |
|
| 42 | - $allQueryFields = ['vendor_id', 'is_integrated', 'page', 'per_page', 'country', 'feature', 'search', 'vendors']; |
|
| 43 | - |
|
| 44 | - $vendors = Route4Me::makeRequst([ |
|
| 45 | - 'url' => '', |
|
| 46 | - 'method' => 'GET', |
|
| 47 | - 'query' => Route4Me::generateRequestParameters($allQueryFields, $params), |
|
| 48 | - ]); |
|
| 49 | - |
|
| 50 | - return $vendors; |
|
| 51 | - } |
|
| 52 | - |
|
| 53 | - public static function GetRandomVendorID($offset, $limit) |
|
| 54 | - { |
|
| 55 | - $allVendors = self::GetTelematicsVendors(null); |
|
| 56 | - $vendorsNumber = sizeof($allVendors['vendors']); |
|
| 57 | - |
|
| 58 | - if ($vendorsNumber < $limit) { |
|
| 59 | - if ($vendorsNumber > $offset) { |
|
| 60 | - $limit = $vendorsNumber; |
|
| 61 | - } else { |
|
| 62 | - if ($vendorsNumber == $offset) { |
|
| 63 | - return $allVendors['vendors'][$offset]->{'vendor_id'}; |
|
| 64 | - } else { |
|
| 65 | - echo 'The vendors numbers are less than offset'; |
|
| 66 | - |
|
| 67 | - return null; |
|
| 68 | - } |
|
| 69 | - } |
|
| 70 | - } |
|
| 71 | - |
|
| 72 | - $randNumber = rand($offset, $limit); |
|
| 73 | - |
|
| 74 | - return $allVendors['vendors'][$randNumber]['id']; |
|
| 75 | - } |
|
| 76 | - |
|
| 77 | - /* |
|
| 9 | + public $id; // Telematics Vendor id |
|
| 10 | + public $name; // Vendor name |
|
| 11 | + public $slug; // Vendor slug |
|
| 12 | + public $description; // Vendor description |
|
| 13 | + public $logo_url; // Vendor's logo URL |
|
| 14 | + public $website_url; // Vendor's website URL |
|
| 15 | + public $api_docs_url; // API documentation URL |
|
| 16 | + public $is_integrated; // If 1, the vendor is integrated in Route4Me |
|
| 17 | + public $size; // Vendor size |
|
| 18 | + public $page; // starting page |
|
| 19 | + public $per_page; // Vendors per page in a response |
|
| 20 | + public $countries = []; // Country Alpha 2 code |
|
| 21 | + public $features = []; // Vendor's feature |
|
| 22 | + public $search; // Searched text |
|
| 23 | + public $vendors; // Comma-delimited list of the vendors IDs. |
|
| 24 | + |
|
| 25 | + public static function fromArray(array $params) |
|
| 26 | + { |
|
| 27 | + $vendorsParameters = new self(); |
|
| 28 | + |
|
| 29 | + foreach ($params as $key => $value) { |
|
| 30 | + if (property_exists($vendorsParameters, $key)) { |
|
| 31 | + $vendorsParameters->{$key} = $value; |
|
| 32 | + } |
|
| 33 | + } |
|
| 34 | + |
|
| 35 | + return $vendorsParameters; |
|
| 36 | + } |
|
| 37 | + |
|
| 38 | + public static function GetTelematicsVendors($params) |
|
| 39 | + { |
|
| 40 | + Route4Me::setBaseUrl(Endpoint::TELEMATICS_VENDORS); |
|
| 41 | + |
|
| 42 | + $allQueryFields = ['vendor_id', 'is_integrated', 'page', 'per_page', 'country', 'feature', 'search', 'vendors']; |
|
| 43 | + |
|
| 44 | + $vendors = Route4Me::makeRequst([ |
|
| 45 | + 'url' => '', |
|
| 46 | + 'method' => 'GET', |
|
| 47 | + 'query' => Route4Me::generateRequestParameters($allQueryFields, $params), |
|
| 48 | + ]); |
|
| 49 | + |
|
| 50 | + return $vendors; |
|
| 51 | + } |
|
| 52 | + |
|
| 53 | + public static function GetRandomVendorID($offset, $limit) |
|
| 54 | + { |
|
| 55 | + $allVendors = self::GetTelematicsVendors(null); |
|
| 56 | + $vendorsNumber = sizeof($allVendors['vendors']); |
|
| 57 | + |
|
| 58 | + if ($vendorsNumber < $limit) { |
|
| 59 | + if ($vendorsNumber > $offset) { |
|
| 60 | + $limit = $vendorsNumber; |
|
| 61 | + } else { |
|
| 62 | + if ($vendorsNumber == $offset) { |
|
| 63 | + return $allVendors['vendors'][$offset]->{'vendor_id'}; |
|
| 64 | + } else { |
|
| 65 | + echo 'The vendors numbers are less than offset'; |
|
| 66 | + |
|
| 67 | + return null; |
|
| 68 | + } |
|
| 69 | + } |
|
| 70 | + } |
|
| 71 | + |
|
| 72 | + $randNumber = rand($offset, $limit); |
|
| 73 | + |
|
| 74 | + return $allVendors['vendors'][$randNumber]['id']; |
|
| 75 | + } |
|
| 76 | + |
|
| 77 | + /* |
|
| 78 | 78 | public static function GetTelematicsVendor($params) { |
| 79 | 79 | Route4Me::setBaseUrl(Endpoint::TELEMATICS_VENDORS); |
| 80 | 80 | |
@@ -123,11 +123,11 @@ |
||
| 123 | 123 | $allVendors = self::GetTelematicsVendors(null); |
| 124 | 124 | $vendorsNumber = sizeof($allVendors['vendors']); |
| 125 | 125 | |
| 126 | - if ($vendorsNumber < $limit) { |
|
| 127 | - if ($vendorsNumber > $offset) { |
|
| 126 | + if ($vendorsNumber<$limit) { |
|
| 127 | + if ($vendorsNumber>$offset) { |
|
| 128 | 128 | $limit = $vendorsNumber; |
| 129 | 129 | } else { |
| 130 | - if ($vendorsNumber == $offset) { |
|
| 130 | + if ($vendorsNumber==$offset) { |
|
| 131 | 131 | return $allVendors['vendors'][$offset]->{'vendor_id'}; |
| 132 | 132 | } else { |
| 133 | 133 | echo 'The vendors numbers are less than offset'; |
@@ -6,20 +6,20 @@ |
||
| 6 | 6 | |
| 7 | 7 | class RapidAddressSearchResponse |
| 8 | 8 | { |
| 9 | - public $zipcode; |
|
| 10 | - public $street_name; |
|
| 11 | - public $county_no; |
|
| 9 | + public $zipcode; |
|
| 10 | + public $street_name; |
|
| 11 | + public $county_no; |
|
| 12 | 12 | |
| 13 | - public static function fromArray(array $params) |
|
| 14 | - { |
|
| 15 | - $rapidSearch = new self(); |
|
| 13 | + public static function fromArray(array $params) |
|
| 14 | + { |
|
| 15 | + $rapidSearch = new self(); |
|
| 16 | 16 | |
| 17 | - foreach ($params as $key => $value) { |
|
| 18 | - if (property_exists($rapidSearch, $key)) { |
|
| 19 | - $rapidSearch->{$key} = $value; |
|
| 20 | - } |
|
| 21 | - } |
|
| 17 | + foreach ($params as $key => $value) { |
|
| 18 | + if (property_exists($rapidSearch, $key)) { |
|
| 19 | + $rapidSearch->{$key} = $value; |
|
| 20 | + } |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | - return $rapidSearch; |
|
| 24 | - } |
|
| 23 | + return $rapidSearch; |
|
| 24 | + } |
|
| 25 | 25 | } |
@@ -6,22 +6,22 @@ |
||
| 6 | 6 | |
| 7 | 7 | class AddressBookLocationSearchResponse |
| 8 | 8 | { |
| 9 | - public $results=[]; |
|
| 10 | - public $total; |
|
| 11 | - public $fields=[]; |
|
| 9 | + public $results=[]; |
|
| 10 | + public $total; |
|
| 11 | + public $fields=[]; |
|
| 12 | 12 | |
| 13 | - public static function fromArray(array $params) |
|
| 14 | - { |
|
| 15 | - $ablSearchResponse = new self(); |
|
| 13 | + public static function fromArray(array $params) |
|
| 14 | + { |
|
| 15 | + $ablSearchResponse = new self(); |
|
| 16 | 16 | |
| 17 | - foreach ($params as $key => $value) { |
|
| 18 | - if (property_exists($ablSearchResponse, $key)) { |
|
| 19 | - $ablSearchResponse->{$key} = $value; |
|
| 20 | - } else { |
|
| 21 | - throw new BadParam("Correct parameter must be provided. Wrong Parameter: $key"); |
|
| 22 | - } |
|
| 23 | - } |
|
| 17 | + foreach ($params as $key => $value) { |
|
| 18 | + if (property_exists($ablSearchResponse, $key)) { |
|
| 19 | + $ablSearchResponse->{$key} = $value; |
|
| 20 | + } else { |
|
| 21 | + throw new BadParam("Correct parameter must be provided. Wrong Parameter: $key"); |
|
| 22 | + } |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - return $ablSearchResponse; |
|
| 26 | - } |
|
| 25 | + return $ablSearchResponse; |
|
| 26 | + } |
|
| 27 | 27 | } |
| 28 | 28 | \ No newline at end of file |
@@ -6,9 +6,9 @@ |
||
| 6 | 6 | |
| 7 | 7 | class AddressBookLocationSearchResponse |
| 8 | 8 | { |
| 9 | - public $results=[]; |
|
| 9 | + public $results = []; |
|
| 10 | 10 | public $total; |
| 11 | - public $fields=[]; |
|
| 11 | + public $fields = []; |
|
| 12 | 12 | |
| 13 | 13 | public static function fromArray(array $params) |
| 14 | 14 | { |
@@ -11,28 +11,28 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class GeoPoint extends Common |
| 13 | 13 | { |
| 14 | - /** |
|
| 15 | - * Latitude |
|
| 16 | - * @var double |
|
| 17 | - */ |
|
| 18 | - public $lat; |
|
| 19 | - |
|
| 20 | - /** |
|
| 21 | - * Longitude |
|
| 22 | - * @var double |
|
| 23 | - */ |
|
| 24 | - public $lng; |
|
| 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 | + * Latitude |
|
| 16 | + * @var double |
|
| 17 | + */ |
|
| 18 | + public $lat; |
|
| 19 | + |
|
| 20 | + /** |
|
| 21 | + * Longitude |
|
| 22 | + * @var double |
|
| 23 | + */ |
|
| 24 | + public $lng; |
|
| 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 |
@@ -9,23 +9,23 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | class AddressNoteResponse extends Common |
| 11 | 11 | { |
| 12 | - public $status; |
|
| 13 | - public $note_id; |
|
| 14 | - public $upload_id; |
|
| 15 | - public $note; |
|
| 12 | + public $status; |
|
| 13 | + public $note_id; |
|
| 14 | + public $upload_id; |
|
| 15 | + public $note; |
|
| 16 | 16 | |
| 17 | - public static function fromArray(array $params) |
|
| 18 | - { |
|
| 19 | - $addressNoteResponse = new self(); |
|
| 17 | + public static function fromArray(array $params) |
|
| 18 | + { |
|
| 19 | + $addressNoteResponse = new self(); |
|
| 20 | 20 | |
| 21 | - foreach ($params as $key => $value) { |
|
| 22 | - if (property_exists($addressNoteResponse, $key)) { |
|
| 23 | - $addressNoteResponse->{$key} = $value; |
|
| 24 | - } else { |
|
| 25 | - throw new BadParam("Correct parameter must be provided. Wrong Parameter: $key"); |
|
| 26 | - } |
|
| 27 | - } |
|
| 21 | + foreach ($params as $key => $value) { |
|
| 22 | + if (property_exists($addressNoteResponse, $key)) { |
|
| 23 | + $addressNoteResponse->{$key} = $value; |
|
| 24 | + } else { |
|
| 25 | + throw new BadParam("Correct parameter must be provided. Wrong Parameter: $key"); |
|
| 26 | + } |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - return $addressNoteResponse; |
|
| 30 | - } |
|
| 29 | + return $addressNoteResponse; |
|
| 30 | + } |
|
| 31 | 31 | } |
| 32 | 32 | \ No newline at end of file |