定制 rebangm/silex-guzzlehttp-provider 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

rebangm/silex-guzzlehttp-provider

Composer 安装命令:

composer require rebangm/silex-guzzlehttp-provider

包简介

Guzzle http service provider for Silex

README 文档

README

Latest Stable Version Build Status codecov.io

Installation

Create a composer.json in your projects root-directory::

{
    "require": {
        "rebangm/silex-guzzlehttp-provider": "*"
    }
}

and run::

curl -s http://getcomposer.org/installer | php
php composer.phar install

Getting started

Supposing that the skeleton of your application is ready, you simply need to register this service provider by specifying the parameters and options needed to access Guzzle:

This will register one instance of Guzzle\Client accessible from anywhere in your application by using $app['guzzle']. all parameters are optional and they accept the same values accepted by the constructor of Guzzle\Client (see the documentation of Guzzle).

    $app->register(new SilexGuzzle\GuzzleServiceProvider(),array(
        'guzzle.base_uri' => "http://httpbin.com/",
        'guzzle.timeout' => 3.14,
        'guzzle.request_options' =>
            ['auth' => ['admin', 'admin']]
    ));

You can find more details on how to use this provider in the examples directory or the test suite.

Reporting bugs and contributing code

Contributions are highly appreciated either in the form of pull requests for new features, bug fixes or just bug reports. We only ask you to adhere to a basic basic set of rules before submitting your changes or filing bugs on the issue tracker to make it easier for everyone to stay consistent while working on the project.

Project links

Author

License

'silex-guzzlehttp-provider' is licensed under the MIT license. GitHub license

统计信息

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

GitHub 信息

  • Stars: 8
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固