PHPackages                             mvc5/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. [Framework](/categories/framework)
4. /
5. mvc5/facade

ActiveLibrary[Framework](/categories/framework)

mvc5/facade
===========

Arc5 provides a set of static classes for the Mvc5 Framework

10.0.0(5y ago)07452MITPHPPHP ^8.0

Since Nov 28Pushed 5y ago2 watchersCompare

[ Source](https://github.com/mvc5/facade)[ Packagist](https://packagist.org/packages/mvc5/facade)[ GitHub Sponsors](https://github.com/devosc)[ RSS](/packages/mvc5-facade/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (1)Versions (21)Used By (2)

Arc5
----

[](#arc5)

[**https://mvc5.github.io**](https://mvc5.github.io)

Arc5 provides a set of static classes for the Mvc5 Framework.

Example web application.

```
use Arc5\App;
use Arc5\Request;
use Arc5\Response;
use Arc5\Route;
use Arc5\Service;
use Arc5\View;
use Mvc5\Http\Request as HttpRequest;
use Mvc5\Http\Response as HttpResponse;
use Mvc5\View\ViewModel;
use Mvc5\View\ViewLayout;

use const Mvc5\{ BODY, CONTROLLER, REQUEST, RESPONSE, USER };

Service::context(include __DIR__ . '/../config/config.php');

try {

    $request  = Request::request();
    $response = Response::response();
    $result   = Route::dispatch($request);

    if ($result instanceof HttpRequest) {
        $request = Route::error($result);
        $result  = null;

        Service::service()[REQUEST] = $request;

        $controller = $request[CONTROLLER];

        $request = $request->with(USER, Service::plugin(USER));

        $controller && $result = Service::call(
            $controller, [REQUEST => $request, RESPONSE => $response]
        );
    }

    if ($result instanceof ViewModel) {
        !$result instanceof ViewLayout && ($layout = View::layout())
            && $result = $layout->withModel($result);

        $result = View::render($result);
    }

    ($result instanceof HttpResponse && $response = $result)
        || $response = $response->with(BODY, $result);

    $response = Response::status($request, $response);
    $response = Response::version($request, $response);
    Response::send($response);

}  catch(\Throwable $exception) {

    App::exception($exception);

}
```

#### Aliases

[](#aliases)

Short names can be used to alias class names by registering an alias autoload function and providing an alias configuration.

```
spl_autoload_register(new Mvc5\Service\Alias(include __DIR__ . '/config/alias.php'));
```

When a class cannot be found by the default autoloader (i.e. composer) and it has an alias, the PHP class\_alias method is called; which will call the autoload mechanism again if the aliased class does not already exist. Below is an example alias configuration.

```
return [
    'Config'   => Arc5\Config::class,
    'Log'      => Arc5\Log::class,
    'Message'  => Arc5\Message::class,
    'Request'  => Arc5\Request::class,
    'Response' => Arc5\Response::class,
    'Route'    => Arc5\Route::class,
    'Service'  => Arc5\Service::class,
    'Session'  => Arc5\Session::class,
    'View'     => Arc5\View::class,
];
```

Example using aliases.

```
use Response;
use View;

return Response::response(View::render('about/more'));
```

#### Mvc5 Framework Configuration

[](#mvc5-framework-configuration)

To use static classes within the Mvc5 Framework, the service context needs to be initialized during the web event or middleware stack. Each of the following should be added to their respective configurations.

```
'service\context', //web event
'web\context', //middleware
```

The corresponding service configurations already exist in the Mvc5 service config.

```
'service\context' => new Invoke(Mvc5\Service\Context::class, ['service' => new Link]),
'web\context'     => [Mvc5\Web\Context::class, new Link],
```

Arc5 automatically provides [functions](https://github.com/mvc5/facade/blob/master/functions.php) that can be imported into the [View5 Template Engine](https://github.com/mvc5/view). The following service configuration automatically imports these functions into each template.

```
'view5\template' => [ViewTemplate::class, ['import' => ['arc5']]],
```

The functions currently provided are `message`, `messages` and `url`.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity77

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 ~85 days

Recently: every ~107 days

Total

20

Last Release

1830d ago

Major Versions

5.0.3 → 6.0.02020-02-22

6.0.0 → 7.0.02020-03-07

7.0.1 → 8.0.02020-03-27

8.0.0 → 9.0.02020-04-12

9.0.0 → 10.0.02021-05-11

PHP version history (4 changes)2.0PHP ^7.0

5.0PHP ^7.1

6.0.0PHP ^7.4

10.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/61002?v=4)[devosc](/maintainers/devosc)[@devosc](https://github.com/devosc)

---

Top Contributors

[![devosc](https://avatars.githubusercontent.com/u/61002?v=4)](https://github.com/devosc "devosc (60 commits)")

---

Tags

staticfacade

### Embed Badge

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

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

###  Alternatives

[nette/di

💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP features.

92140.6M1.4k](/packages/nette-di)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91245.3M590](/packages/laravel-pail)[nette/bootstrap

🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.

68435.8M592](/packages/nette-bootstrap)[stenope/stenope

Static site builder for Symfony

13518.6k](/packages/stenope-stenope)[defstudio/pest-plugin-laravel-expectations

A plugin to add laravel tailored expectations to Pest

98548.9k4](/packages/defstudio-pest-plugin-laravel-expectations)

PHPackages © 2026

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