PHP code example of vasildakov / econt

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

    

vasildakov / econt example snippets

 



declare(strict_types=1);

use VasilDakov\Econt\Econt;
use GuzzleHttp\Client;
use Laminas\Diactoros\RequestFactory;

/** @var Configuration $configuration */
$configuration = new Configuration('username', 'password');

/** @var \Psr\Http\Client\ClientInterface $client */
$client = new Client();

/** @var \Psr\Http\Message\RequestFactoryInterface $factory */
$factory = new RequestFactory();

$econt = new Econt($configuration, $client, $factory);



$econt = new Econt($configuration, $client, $factory);
$json = $econt->getClientProfiles(); // json



$array = json_decode($json);
var_dump($array);



use VasilDakov\Econt\Serializer\SerializerFactory;

$serializer = (new SerializerFactory())();

$json = $econt->getClientProfiles(); 
$object = $serializer->deserialize($json, GetClientProfilesResponse::class, 'json');