承接 geocoder-php/geocoder-service-provider 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

geocoder-php/geocoder-service-provider

最新稳定版本:1.0.0

Composer 安装命令:

composer require geocoder-php/geocoder-service-provider

包简介

Geocoder service provider for Silex

README 文档

README

Geocoder service provider for Silex.

Build Status

Usage

Initialize the service provider using register() method:

<?php

use Geocoder\Provider\GeocoderServiceProvider;

$app->register(new GeocoderServiceProvider());

N.B.: be careful to register this provider after the WebProfilerServiceProvider if you want Geocoder to be integrated in it.

Then use it in your controllers:

<?php

$app->get('/hello', function() use ($app) {
    $geocoder = $app['geocoder'];

    // do your stuff
});

Configuration

The service provider creates the following services:

  • geocoder: the Geocoder instance ;
  • geocoder.provider: the provider used by Geocoder ;
  • geocoder.adapter: the HTTP adapter used to get data from remotes APIs.

By default, the geocoder.provider service uses FreeGeoIP and the geocoder.adapter service uses the cURL adapter. Override these services to use the adapter/provider you want.

See the Geocoder documentation for a list of available adapters and providers.

Installation

The recommended way to install GeocoderServiceProvider is through Composer:

{
    "require": {
        "geocoder-php/geocoder-service-provider": "@stable"
    }
}

Protip: you should browse the geocoder-php/geocoder-service-provider page to choose a stable version to use, avoid the @stable meta constraint.

Licence

GeocoderServiceProvider is released under the MIT License. See the bundled LICENSE file for details.

统计信息

  • 总下载量: 7.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-09-12