PHP code example of phpnomad / guzzle-fetch

1. Go to this page and download the library: Download phpnomad/guzzle-fetch 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/ */

    

phpnomad / guzzle-fetch example snippets




namespace MyApp\Bootstrap;

use PHPNomad\Core\Bootstrap\CoreInitializer;
use PHPNomad\Di\Container\Container;
use PHPNomad\Guzzle\FetchIntegration\Initializer as GuzzleFetchInitializer;
use PHPNomad\Loader\Bootstrapper;

class Application
{
    protected Container $container;

    public function boot(): void
    {
        $this->container = new Container();

        $bootstrapper = new Bootstrapper(
            $this->container,
            new CoreInitializer(),
            new GuzzleFetchInitializer(),
            // ...your application initializers
        );

        $bootstrapper->load();
    }
}