PHP code example of ernadoo / mondial-relay-bundle

1. Go to this page and download the library: Download ernadoo/mondial-relay-bundle 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/ */

    

ernadoo / mondial-relay-bundle example snippets


// config/bundles.php

return [
    // ...
    Ernadoo\MondialRelayBundle\ErnadooMondialRelayBundle::class => ['all' => true],
];

# src\Controller\DefaultController.php


namespace App\Controller;

use MondialRelay\ApiClient;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class DefaultController extends AbstractController
{
	public function findDeliveryPoints(ApiClient $mondialRelayClient)
	{
		$shops = $mondialRelayClient->findDeliveryPoints([
		    'Pays'            => 'FR',
		    'Ville'           => 'Paris',
		    'CP'              => '75000',
		    'DelaiEnvoi'      => "0",
		    'RayonRecherche'  => '20',
		    'NombreResultats' => '10',
		]);
	}
}