PHPackages                             tobento/service-support - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tobento/service-support

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tobento/service-support
=======================

Interfaces and classes for supporting applications.

2.0.3(5mo ago)0531↑100%18MITPHPPHP &gt;=8.4

Since Jun 23Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/tobento-ch/service-support)[ Packagist](https://packagist.org/packages/tobento/service-support)[ Docs](https://www.tobento.ch)[ RSS](/packages/tobento-service-support/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (9)Used By (18)

Support Service
===============

[](#support-service)

The Support Service provides interfaces and classes supporting applications.

Table of Contents
-----------------

[](#table-of-contents)

- [Getting started](#getting-started)
    - [Requirements](#requirements)
- [Documentation](#documentation)
    - [Interfaces](#interfaces)
        - [Arrayable](#arrayable)
        - [Htmlable](#htmlable)
        - [Jsonable](#jsonable)
        - [Renderable](#renderable)
        - [Responsable](#responsable)
    - [Html String](#html-string)
- [Credits](#credits)

---

Getting started
===============

[](#getting-started)

Add the latest version of the support service running this command.

```
composer require tobento/service-support

```

Requirements
------------

[](#requirements)

- PHP 8.4 or greater

Documentation
=============

[](#documentation)

Interfaces
----------

[](#interfaces)

### Arrayable

[](#arrayable)

```
use Tobento\Service\Support\Arrayable;

interface Arrayable
{
    /**
     * Get the object as an array.
     *
     * @return array
     */
    public function toArray(): array;
}
```

### Htmlable

[](#htmlable)

```
use Tobento\Service\Support\Htmlable;

interface Htmlable
{
    /**
     * Get content as a string of HTML.
     *
     * @return string
     */
    public function toHtml(): string;
}
```

### Jsonable

[](#jsonable)

```
use Tobento\Service\Support\Jsonable;

interface Jsonable
{
    /**
     * Get the object as a JSON string.
     *
     * @param int $options
     * @return string
     */
    public function toJson(int $options = 0): string;
}
```

### Renderable

[](#renderable)

```
use Tobento\Service\Support\Renderable;

interface Renderable
{
    /**
     * Get the evaluated contents of the object.
     *
     * @return string
     */
    public function render(): string;
}
```

### Responsable

[](#responsable)

```
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Tobento\Service\Support\Responsable;

interface Responsable
{
    /**
     * Create a HTTP response that represents the object.
     *
     * @param ServerRequestInterface $request
     * @return ResponseInterface
     */
    public function toResponse(ServerRequestInterface $request): ResponseInterface;
}
```

Html String
-----------

[](#html-string)

The `HtmlString::class` can be useful in certain situations where a string should not be escaped by another function.

```
use Tobento\Service\Support\HtmlString;

$htmlString = new HtmlString('foo');

// you may check if the string is empty or not:
var_dump($htmlString->isEmpty());
// bool(false)
```

Credits
=======

[](#credits)

- [Tobias Strub](https://www.tobento.ch)
- [All Contributors](../../contributors)

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance71

Regular maintenance activity

Popularity16

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity74

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

Every ~204 days

Recently: every ~27 days

Total

9

Last Release

161d ago

Major Versions

1.x-dev → 2.02025-09-23

PHP version history (2 changes)1.0.0PHP &gt;=8.0

2.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/055d6a1b5c2384bb179c75ab0b55914231d898fdc4dffeb30770f81200e52206?d=identicon)[TOBENTOch](/maintainers/TOBENTOch)

---

Top Contributors

[![tobento-ch](https://avatars.githubusercontent.com/u/16684832?v=4)](https://github.com/tobento-ch "tobento-ch (19 commits)")

---

Tags

packagetobento

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tobento-service-support/health.svg)

```
[![Health](https://phpackages.com/badges/tobento-service-support/health.svg)](https://phpackages.com/packages/tobento-service-support)
```

PHPackages © 2026

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