blackknight467/smarty-streets-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

blackknight467/smarty-streets-bundle

最新稳定版本:v1.0.1

Composer 安装命令:

composer require blackknight467/smarty-streets-bundle

包简介

Symfony 2 Bundle for SmartyStreet's API

README 文档

README

SmartyStreets Bundle for Symfony 2.

Installation

Step 1: Download the SmartyStreetsBundle

Using Composer

Add the following to the "require" section of your composer.json file:

    "blackknight467/smarty-streets-bundle": "1.*"

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/appKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new blackknight467\SmartyStreetsBundle\SmartyStreetsBundle(),
    );
}

Step 3: Configure the bundle

Add the following configuration to your app/config/config.yml:

smarty_streets:
    auth_id: 'your SmartyStreets auth id'
    auth_token: 'your SmartyStreets auth token'

Usage

You an use this bundle in two ways. The first is to use the interfaces provided to map to your existing entities.
The second is to simply pass text strings to the functions that use them.

Using Text Strings

In your controller:

  $this->get('blackknight467.smarty_streets')->verifyUSStreetAddressText('1600 Pennsylvania Ave NW, Washington, DC 20500');

Using Interfaces

In your entity:

class SampleAddressEntity implements SimpleSmartyStreetsUSAddressInterface

In your controller:

  $address = new SampleAddressEntity();
  $this->get('blackknight467.smarty_streets')->verifyUSStreetAddress($address);

Commands

This bundle comes with some symfony console commands so you can test text input:

php app/console smartystreets:us-verify {address}
php app/console smartystreets:us-zip-verify {zipcode}

License

This bundle is under the MIT license. See the complete license in the bundle: LICENSE

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固