PHPackages                             alcaeus/fluent-facade - 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. alcaeus/fluent-facade

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

alcaeus/fluent-facade
=====================

Library to create fluent interfaces for classes that don't use them

0.1.0(7y ago)15MITPHPPHP ^7.2

Since Oct 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/alcaeus/fluent-facade)[ Packagist](https://packagist.org/packages/alcaeus/fluent-facade)[ RSS](/packages/alcaeus-fluent-facade/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (5)Versions (3)Used By (0)

fluent-facade
=============

[](#fluent-facade)

🏡 Library to create fluent interfaces for classes that don't support them

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

[](#installation)

To install using composer, run

```
$ composer require alcaeus/fluent-facade
```

Usage
-----

[](#usage)

To wrap an object that does not provide a fluent interface, use the static `ClassWrapper::wrap` helper, then use the class as if it provided a fluent interface:

```
use Alcaeus\Fluent\ClassWrapper;

ClassWrapper::wrap($object)
    ->doSomething()
    ->doSomethingElse();
```

### Getters and other return values

[](#getters-and-other-return-values)

Any non-object return value from a method is ignored and discarded. If a method returns an object, this object is automatically wrapped and returned, allowing nested calls. You can end this nesting by calling the `end()` method:

```
use Alcaeus\Fluent\ClassWrapper;

ClassWrapper::wrap($object)
    ->doSomething()
    ->getNestedObject()
        ->doSomethingElse()
    ->end()
    ->getOtherNestedObject()
        ->doYetAnotherThing();
```

Note that it's not possible to call `end()` on the root object that was wrapped.

### Public properties

[](#public-properties)

If your class contains public properties that contain objects, you can access them and get a wrapped instance of the original object. Properties that contain non-object values will cause an exception to be thrown.

```
use Alcaeus\Fluent\ClassWrapper;

ClassWrapper::wrap($object)
    ->doSomething()
    ->nestedObject
        ->doSomethingElse()
    ->end()
    ->otherNestedObject
        ->doYetAnotherThing();
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

2754d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/383198?v=4)[Andreas Braun](/maintainers/alcaeus)[@alcaeus](https://github.com/alcaeus)

---

Top Contributors

[![alcaeus](https://avatars.githubusercontent.com/u/383198?v=4)](https://github.com/alcaeus "alcaeus (5 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alcaeus-fluent-facade/health.svg)

```
[![Health](https://phpackages.com/badges/alcaeus-fluent-facade/health.svg)](https://phpackages.com/packages/alcaeus-fluent-facade)
```

PHPackages © 2026

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