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)15.4k↓50%11MITPHPPHP &gt;=7.2.5

Since Feb 20Pushed 3y 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 1mo ago

READMEChangelog (10)Dependencies (4)Versions (25)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

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 84% 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 ~112 days

Recently: every ~481 days

Total

24

Last Release

1165d 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 (42 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.2k511.3M2.2k](/packages/aws-aws-sdk-php)[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[google/cloud

Google Cloud Client Library

1.2k16.2M53](/packages/google-cloud)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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