Download the PHP package larsnieuwenhuizen/clubhouse-connector without Composer
On this page you can find all versions of the php package larsnieuwenhuizen/clubhouse-connector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download larsnieuwenhuizen/clubhouse-connector
More information about larsnieuwenhuizen/clubhouse-connector
Files in larsnieuwenhuizen/clubhouse-connector
Package clubhouse-connector
Short Description Service package to connect and interface with Clubhouse through php
License LGPL-3.0-or-later
Informations about the package clubhouse-connector
Clubhouse connector
This library allows you to easily make use of the Clubhouse api integrations through one connector.
Single point of entry
All you need to do is construct the Connector object with a configuration file. The configuration is done throught yaml and looks like this.
config.yaml
Creating the connector
Using clubhouse components
The components are accessed through their respective services like this:
This as you probably expects call the list of epics. This will return you a collection on Epic objects.
Objectification
All the Clubhouse resources will translated into Domain objects per component.
Resource models and collections
All resource types will have their own Model and when retrieving multiple items, the models will be gathered in IteratorAggregate Collections.
This is done so collections retrieved can be iterated over instantly and data is converted into models, so we can use the data in a more specified way and make better use of the data later on.
So for example:
Using the services
There will be services created for all components within Clubhouse and subcomponents (labels, categories, comments etc...)
To use a service you'll access it throught the connector as described above.
CRUD examples
-
Create an Epic
-
Update an existing Epic
-
Delete an Epic
- List all Epics
Currently usable resources
- Epics
- Milestones
- Projects
- Stories
PSR Logging
You can add your own logger if you feel the need to catch the logs somewhere :) All you need is a logger which interfaces with PSR-3 logger interface.
When you have that simply construct the connector with it as such:
Magic methods
The method and variable names I used in the connector are like getEpicsService()
But to make it a bit more relatable with Clubhouse naming and simply a bit shorter,
I added magic method calls for the services.
So instead of calling $connector->getEpicsService()->list()
You can also call $connector->epics()->list()
All versions of clubhouse-connector with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^6.5
symfony/yaml Version ^4
psr/log Version ^1.1