class Places extends Api

Class Places

Constants

SERVICE_ENDPOINT

Properties

protected GoogleMapsApi $google_maps_api from Api
protected string $result_collection
protected GoogleMapsResponse $response from Api
protected GoogleMapsRequest $request from Api

Methods

__construct(array $config = [])

Api constructor.

from Api
array
getServiceConfig(array $config = [])

No description

from Api
string
getServiceEndpoint()

No description

from Api
callApi(array $params, string|null $endpoint = null)

No description

from Api
createRequest(array $params, string|null $endpoint = null)

No description

from Api
getResponse()

No description

from Api
getGoogleMapsApi()

No description

from Api
Api
setGoogleMapsApi(GoogleMapsApi $google_maps_api)

No description

from Api
bool
responseHasNewPage()

No description

from Api
findPlaceByText(string $query, array|null $params = [], array|null $fields = [])

No description

findPlace(array $params)

Find Places requests

makeApiCall(array $params, string $endpoint)

No description

findPlaceByPhoneNumber(string $number, array|null $params = [], array|null $fields = [])

No description

findNearbyPlaceByRadius(Location $location, int $radius, array|null $params = [])

No description

findNearbyPlace(array $params)

Nearby Search requests

findNearbyPlaceByDistance(Location $location, array $params)

No description

textSearch(string $query, array|null $params = [])

Nearby Search requests

Details

in Api at line 57
__construct(array $config = [])

Api constructor.

Parameters

array $config

in Api at line 69
protected array getServiceConfig(array $config = [])

Parameters

array $config

Return Value

array

in Api at line 80
string getServiceEndpoint()

Return Value

string

in Api at line 92
GoogleMapsResultsCollection callApi(array $params, string|null $endpoint = null)

Parameters

array $params
string|null $endpoint

Return Value

GoogleMapsResultsCollection

in Api at line 106
GoogleMapsRequest createRequest(array $params, string|null $endpoint = null)

Parameters

array $params
string|null $endpoint since 0.5.0

Return Value

GoogleMapsRequest

in Api at line 117
GoogleMapsResultsCollection getResultsCollections()

in Api at line 130
GoogleMapsResponse getResponse()

Return Value

GoogleMapsResponse

in Api at line 141
GoogleMapsApi getGoogleMapsApi()

Return Value

GoogleMapsApi

in Api at line 152
Api setGoogleMapsApi(GoogleMapsApi $google_maps_api)

Parameters

GoogleMapsApi $google_maps_api

Return Value

Api

in Api at line 163
GoogleMapsResultsCollection getNextPage()

in Api at line 176
bool responseHasNewPage()

Return Value

bool

at line 53
GoogleMapsResultsCollection findPlaceByText(string $query, array|null $params = [], array|null $fields = [])

Parameters

string $query
array|null $params
array|null $fields

Return Value

GoogleMapsResultsCollection

See also

https://developers.google.com/places/web-service/search#FindPlaceRequests

at line 79
GoogleMapsResultsCollection findPlace(array $params)

Find Places requests

Parameters

array $params GoogleMapsRequestFields::INPUT required

Return Value

GoogleMapsResultsCollection

Exceptions

InvalidArgumentException

See also

https://developers.google.com/places/web-service/search#FindPlaceRequests

at line 101
GoogleMapsResultsCollection makeApiCall(array $params, string $endpoint)

Parameters

array $params
string $endpoint

Return Value

GoogleMapsResultsCollection

at line 114
GoogleMapsResultsCollection findPlaceByPhoneNumber(string $number, array|null $params = [], array|null $fields = [])

Parameters

string $number
array|null $params
array|null $fields

Return Value

GoogleMapsResultsCollection

at line 137
GoogleMapsResultsCollection findNearbyPlaceByRadius(Location $location, int $radius, array|null $params = [])

Parameters

Location $location
int $radius
array|null $params

Return Value

GoogleMapsResultsCollection

at line 162
GoogleMapsResultsCollection findNearbyPlace(array $params)

Nearby Search requests

at line 208
GoogleMapsResultsCollection findNearbyPlaceByDistance(Location $location, array $params)

Parameters

Location $location
array $params

Return Value

GoogleMapsResultsCollection

at line 230
GoogleMapsResultsCollection textSearch(string $query, array|null $params = [])

Nearby Search requests