linkorb / silex-provider-hubclient
Provides a client for the Hub.
Installs: 30
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
pkg:composer/linkorb/silex-provider-hubclient
Requires
- perinatologie/hub-client-php: ^1.8
- pimple/pimple: ^3.0
This package is auto-updated.
Last update: 2025-10-29 02:29:15 UTC
README
Provides two services from perinatologie/hub-client-php:-
ApiClientFactoryas a service namedhub_client.factorywhich can create instances of the HubV3Client and HubV4ClientHubV3Clientas a service namedhub_client.service
Install
Install using composer:-
$ composer require linkorb/silex-provider-hubclient
Then configure and register the provider:-
// app/app.php
use LinkORB\HubClient\Provider\HubClientProvider;
...
$app->register(
new HubClientProvider,
['hub_client.url' => getenv('HUB_CLIENT_URL'),
// if you want to use the factory to create a HubV4Client then add the
// url of the UserBase Json Web Token authentication endpoint
'hub_client.userbase_url' = getenv('HUB_CLIENT_USERBASE_URL'),
// add these parameters if you want to directly create the HubV3Client
// with a fixed set of credentials
'hub_client.username' = getenv('HUB_CLIENT_USERNAME'),
'hub_client.password' = getenv('HUB_CLIENT_PASSWORD')]
);