PHPackages                             sroze/hipache-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. sroze/hipache-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

sroze/hipache-client
====================

A PHP implementation of an Hipache client

1.0.0(11y ago)418MITPHP

Since May 8Pushed 11y ago1 watchersCompare

[ Source](https://github.com/sroze/HipacheClient)[ Packagist](https://packagist.org/packages/sroze/hipache-client)[ Docs](https://github.com/sroze/HipacheClient)[ RSS](/packages/sroze-hipache-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Hipache Client
==============

[](#hipache-client)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/452bb7debd7116a8eaf9c4a4f804f2d423631dc20aaf0f2395358f5888e9dc11/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73726f7a652f48697061636865436c69656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sroze/HipacheClient/?branch=master)

This library is an Hipache PHP client.

Installation
------------

[](#installation)

Use Composer to install this library as dependency:

```
composer require sroze/hipache-client

```

Usage
-----

[](#usage)

Usage is made to be quite simple and can be done though the `Client` object endpoint.

### Create a client

[](#create-a-client)

This `Client` class should be created with an adapter, because Hipchat supports multiple adapters (called drivers). See the [adapters](#adapters) section to how instanciate an adapter.

```
use Hipache\Client;

$client = new Client($adapter);
```

### List all frontends

[](#list-all-frontends)

Just call the `getFrontendCollection` method to have a traversable collection of frontends:

```
$frontendCollection = $client->getFrontendCollection();

foreach ($frontendCollection as $frontend) {
    echo $frontend->getHostname();
}
```

### Create a frontend

[](#create-a-frontend)

There's a `createFrontend` method on the client that allows you to create a frontend:

```
use Hipache\Frontend\Frontend;
use Hipache\Frontend\Exception\FrontendAlreadyExists;

try {
    $frontend = $client->createFrontend(new Frontend('www.example.com'));
} catch (FrontendAlreadyExists $e) {
    // Given frontend can't be created since it already exists...
}
```

### Get a frontend by its domain name

[](#get-a-frontend-by-its-domain-name)

There's a `getFrontend` method that returns a `Frontend` object based on its name.

```
use Hipache\Frontend\Exception\FrontendNotFound;

try {
    $frontend = $client->getFrontend('www.example.com');
} catch (FrontendNotFound $e) {
    // Frontend was not found...
}
```

### Updating frontends' backends

[](#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:

```
use Hipache\Backend\Backend;

$frontend = $client->getFrontend('sroze.io');
$frontend->add(new Backend('http://1.2.3.4:8000'));
$frontend->add(new Backend('http://1.2.3.4:8001'));
```

If you want to remove backends, just add the `remove` method:

```
$frontend = $client->getFrontend('sroze.io');
$frontend->remove(new Backend('http://1.2.3.4:8000'));
```

Adapters
--------

[](#adapters)

There's right know only the Redis adapter (recommended one) that is supported.

### Redis adapter

[](#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:

```
use Predis\Client as RedisClient;
use Hipache\Adapter\RedisAdapter;

$adapter = new RedisAdapter(new RedisClient('tcp://172.17.0.18:6379'));
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

4029d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58b8aaf662150e054108b611b620d1cf8c1cb91e00f76d3dfcd2d7a69a10991c?d=identicon)[sroze](/maintainers/sroze)

---

Top Contributors

[![sroze](https://avatars.githubusercontent.com/u/804625?v=4)](https://github.com/sroze "sroze (6 commits)")

---

Tags

clienthipache

### Embed Badge

![Health badge](/badges/sroze-hipache-client/health.svg)

```
[![Health](https://phpackages.com/badges/sroze-hipache-client/health.svg)](https://phpackages.com/packages/sroze-hipache-client)
```

###  Alternatives

[php-http/httplug

HTTPlug, the HTTP client abstraction for PHP

2.6k307.6M679](/packages/php-http-httplug)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[php-http/client-common

Common HTTP Client implementations and tools for HTTPlug

1.1k225.5M571](/packages/php-http-client-common)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[mashape/unirest-php

Unirest PHP

1.3k9.7M161](/packages/mashape-unirest-php)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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