PHP code example of bradfeehan / guzzle-modular-service-descriptions

1. Go to this page and download the library: Download bradfeehan/guzzle-modular-service-descriptions library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bradfeehan / guzzle-modular-service-descriptions example snippets


     

use BradFeehan\GuzzleModularServiceDescriptions\ServiceDescriptionLoader;
use Guzzle\Service\Client;

// Create a client somehow
$client = Client::factory();

// Instantiate the modular service description loader
$loader = new ServiceDescriptionLoader();

// Point the loader at the modular service description directory
$description = $loader->load('/path/to/service_description');

// Add the service description to the client
$client->setDescription($description);

// Done!
$command = $client->getCommand('MyCommand');

// ...
bash
    $ curl -sS https://getcomposer.org/installer | php
    
bash
    $ php composer.phar install