Download the PHP package peoplegogo/google-places without Composer
On this page you can find all versions of the php package peoplegogo/google-places. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download peoplegogo/google-places
More information about peoplegogo/google-places
Files in peoplegogo/google-places
Package google-places
Short Description A PHP wrapper for the Google Places API.
License MIT
Informations about the package google-places
Google Places API - A PHP wrapper
This is a PHP wrapper for Google Places API Web Service.
Installation
Composer
The recommended installation method is through Composer. Add to your composer.json file:
or with the following command from your browser:
Check in Packagist.
Manually
Steps:
- Copy src/GooglePlaces.php to your codebase, perhaps to the vendor directory.
- Add the GooglePlaces class to your autoloader or require the file directly.
Getting Started
First you have to create an instance of GooglePlaces:
You can pass the API key (used to authenticate in front of Google service) during the creation of the instance or you can set it up later.
or
By default, the format is set to json but you can change it that way:
or
You can also set up the language if you want.
In this way it won't be necessary to set up the language within every request.
You can also prepare the input parameters:
Once all parameters are set, the final step is to send the request to the Google Places Api:
The result is an array. The GooglePlaces class decodes the response received from Google, so it is not necessary for you to do that.
For more information for the methods and the features of the library you can check "src" or "tests" folders.
Contributing
How can you contribute:
- Fork it.
- Create your feature branch (git checkout -b my-new-feature).
- Commit your changes (git commit -am 'Added some feature').
- Push to the branch (git push origin my-new-feature).
- Create a new Pull Request.