PHP code example of mpp / apicil-client-bundle

1. Go to this page and download the library: Download mpp/apicil-client-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/ */

    

mpp / apicil-client-bundle example snippets




namespace App\Controller;

use Mpp\ApicilClientBundle\Client\ApicilClientDomainRegistryInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class ExampleController extends AbstractController
{
    public function exampleAction(ApicilClientDomainRegistryInterface $apicilClientRegistry)
    {
        // Here are the three different available methods on how to retrieve a client domain by its alias (choose the one you prefer)
        $myClient = $apicilClientRegistry->get('client_domain_alias');
        // or
        $myClient = $apicilClientRegistry->getClientDomainAlias();

        // Execute operations from the retrieved client domain
        // ...
    }
}
xml
<!-- ... -->
<php>
    <!-- ... -->
    <env name="APP_ENV" value="test" />
    <env name="APICIL_BASE_URL" value="APICIL_BASE_URL" />
    <env name="APICIL_USERNAME" value="USEERNAME" />
    <env name="APICIL_PASSWORD" value="PASSWORD" />
    <!-- ... -->
</php>
<!-- ... -->