Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
byidrequester.php
1<?php
2
4
9final class ByIdRequester extends BaseRequester
10{
11 protected $url = 'https://maps.googleapis.com/maps/api/place/details/json';
12 protected $defaultFields = 'formatted_address,name,place_id,types,address_components,geometry';
13 protected $requiredFields = ['placeid', 'language', 'key'];
14 protected $fieldsToEncode = ['placeid'];
15
20 protected function makeUrl(array $data): string
21 {
22 if(empty($data['fields']))
23 {
24 $data['fields'] = $this->defaultFields;
25 }
26
27 return parent::makeUrl($data);
28 }
29}