PHPackages                             perinatologie/hub-client-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. perinatologie/hub-client-php

ActiveApplication

perinatologie/hub-client-php
============================

v2.0.0(3y ago)16.0k↓11.7%21MITPHPPHP &gt;=7.2.5

Since Feb 20Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/perinatologie/hub-client-php)[ Packagist](https://packagist.org/packages/perinatologie/hub-client-php)[ Docs](https://github.com/perinatologie/hub-client-php)[ RSS](/packages/perinatologie-hub-client-php/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (4)Versions (28)Used By (1)

Hub Client for PHP
==================

[](#hub-client-for-php)

Getting started
---------------

[](#getting-started)

### Install dependencies:

[](#install-dependencies)

Get PHP dependencies using Composer

```
composer install

```

Examples
--------

[](#examples)

### Setup environment variables

[](#setup-environment-variables)

Before running the examples, make sure the following environment variables have been configured:

```
export HUB_URL="http://127.0.0.1:8080"
export HUB_V1_USERNAME=joe
export HUB_V1_PASSWORD=secret
export HUB_V3_USERNAME=joe
export HUB_V3_PASSWORD=secret
```

Hub v1 and v3 use different authentication methods, therefor you can specify them separately.

Note, the v1 credentials are also used to access resources at providers for v1 security hashes.

You can use a `.env` file, by copying the `.env.dist` to `.env` and updating it with your credentials.

### Run the examples

[](#run-the-examples)

```
php examples/v1/getdossierinfo.php {bsn}
php examples/v3/search.php client_bsn=987654321
```

Build the v4 API client
-----------------------

[](#build-the-v4-api-client)

The v4 API Client authenticates itself with the Hub using a Json Web Token (JWT) which it obtains from UserBase. The username and password you usually use to authenticate with the Hub are used to authenticate with UserBase and obtain a JWT. Thereafter, the v4 client is used in the same way as the v3 client.

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

require_once '/path/to/vendor/autoload.php';

$userbaseUrl = 'http://userbase.example.com/auth';
$hubUrl = 'http://hub.example.com';
$username = 'my-username';
$password = 'my-password';

$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);
```

cacert.pem
----------

[](#cacertpem)

For Guzzle versions &gt; 4, curl is used to verify remote SSL connections. In order for this to work, you'll need to pass a `verify` key to guzzle, pointing to a .pem file containing all trusted CA's.

These are published by curl here:

-

If needed, you can download new ca certificates from there, and put them in the root of this project.

License
-------

[](#license)

MIT. Please refer to the included [LICENSE.md](LICENSE.md) file

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance59

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~155 days

Recently: every ~745 days

Total

25

Last Release

56d ago

Major Versions

v1.10.0 → v2.0.02023-03-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db66b320db18b8036ea68211b7d8a39e7c6da97e6fd29f59a50380ebb69d0bb?d=identicon)[joostfaassen](/maintainers/joostfaassen)

---

Top Contributors

[![joostfaassen](https://avatars.githubusercontent.com/u/411113?v=4)](https://github.com/joostfaassen "joostfaassen (44 commits)")[![boite](https://avatars.githubusercontent.com/u/989892?v=4)](https://github.com/boite "boite (8 commits)")

---

Tags

hubperinatologieverloskundegynaecologieechoscopiekraamzorg

### Embed Badge

![Health badge](/badges/perinatologie-hub-client-php/health.svg)

```
[![Health](https://phpackages.com/badges/perinatologie-hub-client-php/health.svg)](https://phpackages.com/packages/perinatologie-hub-client-php)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[google/auth

Google Auth Library for PHP

1.4k294.2M218](/packages/google-auth)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[oat-sa/tao-core

TAO core extension

66143.7k122](/packages/oat-sa-tao-core)[google/cloud

Google Cloud Client Library

1.2k16.7M57](/packages/google-cloud)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
