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

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

bapcat/facade
=============

Pseudo-static accessors for Phi bindings

5.1(2mo ago)0125[1 issues](https://github.com/BapCat/Facade/issues)GPL-3.0-or-laterPHPPHP ^8.2

Since Jun 15Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/BapCat/Facade)[ Packagist](https://packagist.org/packages/bapcat/facade)[ Docs](https://github.com/BapCat/Facade)[ RSS](/packages/bapcat-facade/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (17)Used By (0)

[![Build Status](https://camo.githubusercontent.com/46cfa29b98d53eb424e8c4bfd78ee692b5dbc769232d7f9a6d025d6a412a1c6a/68747470733a2f2f7472617669732d63692e6f72672f4261704361742f4661636164652e7376673f6272616e63683d312e302e31)](https://travis-ci.org/BapCat/Facade)[![Coverage Status](https://camo.githubusercontent.com/9be784857f9d505948119ee1d4a4a5618428ef6fff821a961437ff9fd6d95846/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f4261704361742f4661636164652f62616467652e7376673f6272616e63683d312e302e31)](https://coveralls.io/r/BapCat/Facade?branch=1.0.1)[![License](https://camo.githubusercontent.com/901f9d821fc3729d54512e62dd62ebed1653427cb95d35304fb3e8f46daa3f85/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f4261704361742f4661636164652e737667)](https://img.shields.io/packagist/l/BapCat/Facade.svg)

Phi Facades
===========

[](#phi-facades)

Facades are a way to make Phi bindings feel more natural.

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

[](#installation)

### Composer

[](#composer)

[Composer](https://getcomposer.org/) is the recommended method of installation for Facade.

```
$ composer require bapcat/facade

```

### GitHub

[](#github)

Facade may be downloaded from [GitHub](https://github.com/BapCat/Facade/).

Features
--------

[](#features)

### Pseudo-Static Access To Phi Singletons

[](#pseudo-static-access-to-phi-singletons)

A common use-case for Phi Facades is logging:

```
namespace Vendor\Package\Logging;

class Logger {
  public function warning($text) {
    // ...
  }
}
```

```
$logger = new Vendor\Package\Logging\Logger;

$phi = BapCat\Phi\Phi::instance();
$phi->bind('core.log', $logger);
```

```
use BapCat\Facade\Facade;

class Log extends Facade {
  protected static $_binding = 'core.log';
}
```

Once the facade is set up, the `Vendor\Package\Logging` singleton can be accessed like this:

```
Log::warning('Something bad happened!');
```

Phi Facades can even be used to create a facade for Phi:

```
$phi = BapCat\Phi\Phi::instance();
$phi->bind('phi', $phi);
```

```
use BapCat\Facade\Facade;

class Phi extends Facade {
  protected static $_binding = 'phi';
}
```

This will allow Phi to be accessed as such:

```
Phi::bind('Bar', 'Foo');
$foo = Phi::make('Bar');
```

### Phi Custom Resolvers

[](#phi-custom-resolvers)

If you are using Phi 1.2.0 or greater, Phi facades will work seamlessly with custom resolvers.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance88

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 95.7% 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 ~262 days

Recently: every ~463 days

Total

16

Last Release

61d ago

Major Versions

1.0.1 → 2.0.02017-03-31

2.0.3 → 3.02019-01-04

0.4.0 → 4.0.02021-02-19

4.0.2 → 5.02024-05-28

PHP version history (8 changes)1.0.0PHP &gt;=5.4.0

1.0.1PHP &gt;=5.5.0

2.0.0PHP &gt;=5.6

3.0PHP ^7.1

0.4.0PHP ^7.4

4.0.1PHP ^7.4|^8.0

5.0PHP ^8.0

5.1PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/246ea082e8ed7f6e8ace29950179d4dfb1e3a58bac53aef49a3d2e43ab1e7f04?d=identicon)[LordMonoxide](/maintainers/LordMonoxide)

---

Top Contributors

[![LordMonoxide](https://avatars.githubusercontent.com/u/437657?v=4)](https://github.com/LordMonoxide "LordMonoxide (44 commits)")[![crossbap](https://avatars.githubusercontent.com/u/18564250?v=4)](https://github.com/crossbap "crossbap (1 commits)")[![rascopeeko](https://avatars.githubusercontent.com/u/6076349?v=4)](https://github.com/rascopeeko "rascopeeko (1 commits)")

---

Tags

dependency-injectiondiiocfacadeinversion of control

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[level-2/dice

A minimalist Dependency injection container (DIC) for PHP. Please note: 3.0+ is only compatible with PHP 7.0. The 2.0 branch is compatbile with PHP 5.6.

437730.3k17](/packages/level-2-dice)[mouf/mouf

The Mouf PHP framework: an open-source PHP framework providing an easy way to download, install, use and reuse components, with a graphical user interface.

55146.0k17](/packages/mouf-mouf)[capsule/di

A PSR-11 compliant autowiring dependency injection container.

2857.5k2](/packages/capsule-di)[x-wp/di

The dependency injection container for WordPress

301.1k10](/packages/x-wp-di)[michaels/data-manager

Simple data manager for nested data, dot notation array access, extendability, and container interoperability.

121.9k2](/packages/michaels-data-manager)

PHPackages © 2026

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