2017 © Pedro Peláez
 

symfony-bundle geonames-api-bundle

Symfony bundle for Geonames API

image

pingdevelopment/geonames-api-bundle

Symfony bundle for Geonames API

  • Thursday, January 8, 2015
  • by architect0317
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1,249 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

GEONAMES SYMFONY2 BUNDLE

This bundle works with Symfony 2.x to allow configuration of the API as a service., (*1)

Requirements

  • Apache 2 Web server
  • PHP 5.x configured with the following extensions:
    • CUrl

Configuration

The following elements are valid in your YAML configuration files:, (*2)

#!yaml

geonames_api:
    username: demo
    maxResults: 50

Only username is required and it should be set to the username you registered with on geonames.org. The 'maxResults' value defaults to 10 (same as the geonames.org default) and is optional., (*3)

How to Use the Bundle

The API wrapper is provided as a service container. To obtain an instance of the API wrapper, you need to get the container reference (from a Controller action) like so:, (*4)

#!php

$api = $this->get('geonames_api.zipcode_lookup');
$api->addFilter(PostalCodeSearch::FILTER_PLACE_NAME_STARTS_WITH, $city);
$api->addFilter(PostalCodeSearch::FILTER_STATE_CODE, $state);
$api->lookup();
$response = $api->getArrayResponse();
print_r($response);

The following lookups are available:, (*5)

  • geonames_api.zipcode_lookup
  • geonames_api.radius_lookup

Authors

Peter Adams http://www.pingdevelopment.com, (*6)

License

The MIT License, (*7)

Copyright (c) 2014, (*8)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*9)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*10)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*11)

The Versions

08/01 2015

dev-master

9999999-dev

Symfony bundle for Geonames API

  Sources   Download

MIT

The Requires

 

api usps geonames zipcode

15/09 2014

dev-1.0-dev

dev-1.0-dev

Symfony bundle for Geonames API

  Sources   Download

MIT

The Requires

 

api usps geonames zipcode

15/09 2014

1.0.3

1.0.3.0

Symfony bundle for Geonames API

  Sources   Download

MIT

The Requires

 

api usps geonames zipcode

13/09 2014

1.0.2

1.0.2.0

Symfony bundle for Geonames API

  Sources   Download

MIT

The Requires

 

api usps geonames zipcode

10/09 2014

1.0.1

1.0.1.0

Symfony bundle for Geonames API

  Sources   Download

MIT

The Requires

 

api usps geonames zipcode

10/09 2014

1.0.0

1.0.0.0

Symfony bundle for Geonames API

  Sources   Download

MIT

The Requires

 

api usps geonames zipcode