PHP code example of eugenganshorn / guzzle-bundle-retry-plugin

1. Go to this page and download the library: Download eugenganshorn/guzzle-bundle-retry-plugin 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/ */

    

eugenganshorn / guzzle-bundle-retry-plugin example snippets


foreach ($contents as $class => $envs) {
    if (isset($envs['all']) || isset($envs[$this->environment])) {
        yield new $class();
    }
}

foreach ($contents as $class => $envs) {
    if (isset($envs['all']) || isset($envs[$this->environment])) {
        if ($class === \EightPoints\Bundle\GuzzleBundle\EightPointsGuzzleBundle::class) {
            yield new $class([
                new \EugenGanshorn\Bundle\GuzzleBundleRetryPlugin\GuzzleBundleRetryPlugin(),
            ]);
        } else {
            yield new $class();
        }
    }
}

public function registerBundles(): iterable
{
    $contents = s[$this->environment] ?? $envs['all'] ?? false) {
            if ($class === EightPointsGuzzleBundle::class) {
                yield new $class([
                    new GuzzleBundleRetryPlugin(),
                ]);
            } else {
                yield new $class();
            }
        }
    }
}