linkmark/guzzle-bundle

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Linkmark Guzzle 5 Bundle

dev-master 2015-05-01 01:49 UTC

This package is auto-updated.

Last update: 2021-09-19 02:53:48 UTC


README

A Guzzle 5 Bundle for Symfony 2

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require linkmark/guzzle-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle

Then, enable the bundle by adding the following line in the app/AppKernel.php file of your project:

// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Linkmark\GuzzleBundle\LinkmarkGuzzleBundle(),
        );

        // ...
    }

    // ...
}

Usage

By default this bundle doesn't need to be configured, but you can configure it following the Configuration Reference.

To use it just invoke the linkmark_guzzle service:

// src/Acme/DemoBundle/Controller/DemoController.php

class DemoController extends Controller
{
    /**
     * ...
     */
    public function indexAction()
    {
        $guzzleClient = $this->get('linkmark_guzzle');

        // ...
    }
}

It will be already configured with subscribers and client options.

Readings

License

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

Resources/meta/LICENSE