PHP code example of perinatologie / hub-client-php

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

    

perinatologie / hub-client-php example snippets


use Hub\Client\Exception\ClientCreationException;
use Hub\Client\Exception\ResponseException;
use Hub\Client\Factory\ApiClientFactory;

word';

$clientFactory = new ApiClientFactory($hubUrl);
$clientFactory->setUserbaseJwtAuthenticatorUrl($userbaseUrl);
try {
    $client = $clientFactory->createV4Client($username, $password);
} catch (ClientCreationException $e) {
    // failed to create the client: probably failed to obtain a JWT
    echo $e->getMessage() . PHP_EOL;
    exit();
}
try {
    $resources = $client->findResources();
} catch (ResponseException $e) {
    echo $e->getMessage() . PHP_EOL;
    exit();
}
var_dump($resources);
sh
php examples/v1/getdossierinfo.php {bsn}
php examples/v3/search.php client_bsn=987654321