GithubHelp home page GithubHelp logo

lecajer / silex-guzzlehttp-provider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rebangm/silex-guzzlehttp-provider

0.0 1.0 0.0 32 KB

Guzzle http service provider for Silex

License: MIT License

PHP 100.00%

silex-guzzlehttp-provider's Introduction

Silex-Guzzle

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

silex-guzzlehttp-provider's People

Contributors

rebangm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.