PHP Class dosamigos\google\maps\ClientAbstract

Base class for those objects that make requests to the Google Web Services API
Author: Antonio Ramirez ([email protected])
Inheritance: extends yii\base\Object
Show file Open project: 2amigos/yii2-google-maps-library Class Usage Examples

Public Properties

Property Type Description
$format response format. Can be json or xml.
$key your API key. To configure please, add googleMapsApiKey parameter to your application configuration file with the value of your API key. To get yours, please visit https://code.google.com/apis/console/.
$params the request parameters

Public Methods

Method Description
getUrl ( ) : string Returns the api url
init ( )

Protected Methods

Method Description
getClient ( ) : Guzzle\Http\Client | Client Returns the guzzle client
request ( array $options = [] ) : mixed | null Makes the request to the Google API

Method Details

getClient() protected method

Returns the guzzle client
protected getClient ( ) : Guzzle\Http\Client | Client
return Guzzle\Http\Client | GuzzleHttp\Client

getUrl() abstract public method

Returns the api url
abstract public getUrl ( ) : string
return string

init() public method

public init ( )

request() protected method

Makes the request to the Google API
protected request ( array $options = [] ) : mixed | null
$options array for the guzzle request
return mixed | null

Property Details

$format public property

response format. Can be json or xml.
public $format

$key public static property

your API key. To configure please, add googleMapsApiKey parameter to your application configuration file with the value of your API key. To get yours, please visit https://code.google.com/apis/console/.
public static $key

$params public property

the request parameters
public $params