Download the PHP package sroze/hipache-client without Composer
On this page you can find all versions of the php package sroze/hipache-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sroze/hipache-client
More information about sroze/hipache-client
Files in sroze/hipache-client
Package hipache-client
Short Description A PHP implementation of an Hipache client
License MIT
Homepage https://github.com/sroze/HipacheClient
Informations about the package hipache-client
Hipache Client
This library is an Hipache PHP client.
Installation
Use Composer to install this library as dependency:
Usage
Usage is made to be quite simple and can be done though the Client
object endpoint.
Create a client
This Client
class should be created with an adapter, because Hipchat supports multiple adapters (called drivers).
See the adapters section to how instanciate an adapter.
List all frontends
Just call the getFrontendCollection
method to have a traversable collection of frontends:
Create a frontend
There's a createFrontend
method on the client that allows you to create a frontend:
Get a frontend by its domain name
There's a getFrontend
method that returns a Frontend
object based on its name.
Updating frontends' backends
When you've fetched a frontend with the Client
class, you have a WritableFrontend
instance. That means that you just
have to call one of the add
or remove
methods to respectively add or remove a backend from it.
Here's an example how to add 2 backends to a given frontend:
If you want to remove backends, just add the remove
method:
Adapters
There's right know only the Redis adapter (recommended one) that is supported.
Redis adapter
The RedisAdapter
class needs to be constructed with a configured Predis client, and that's all.
Here's an example how to create an instance of a Redis adapter: