PHPackages                             flaviojr/silex-controller-provider - 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. flaviojr/silex-controller-provider

ActiveLibrary[Framework](/categories/framework)

flaviojr/silex-controller-provider
==================================

Controller provider for silex applications

v1.0(8y ago)321MITPHPPHP &gt;=5.5.9

Since Jul 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/flavio-jr/silex-controller-provider)[ Packagist](https://packagist.org/packages/flaviojr/silex-controller-provider)[ RSS](/packages/flaviojr-silex-controller-provider/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

silex-controller-provider
=========================

[](#silex-controller-provider)

Controller provider for silex

What is this?
=============

[](#what-is-this)

This provider contains the logic to load your controllers dynamically, registering them in you Silex Applications. With this, you no longer needs to manually register each one of your controllers, passing their respective dependencies.

Usage
=====

[](#usage)

To install it:

```
$ composer require "flaviojr/silex-controller-provider":"1.0"
```

To use this provider, you simply need to register it within your application:

```
//Don't forget to register this provider first
$app->register(new Silex\Provider\ServiceControllerServiceProvider);

$app->register(new Sneek\Providers\ControllerProvider('controller-dir', 'Your-root-namespace'[, 'your-namespace-mirror']));
```

- The first parameter indicate where your **controller files** are.
- The second one is the root namespace from where your controllers are. For example, if your controller namespace is `App\Controllers\HomeController`, then the value to be passed is the string 'App'.
- The last parameter is optional, you should use it if your root namespace isn't the name of your root directory. For example, if you have a folder structure like this: `src/Controllers/CoffeeController`, having the namespace `App\Controllers\CoffeeController`you have to pass the 'src' string, so that the provider know that 'src' is equivalent to 'App' in this case.

Using the registered controllers
================================

[](#using-the-registered-controllers)

The provider register your controllers using their namespaces as index. To access they in your routes, you just need to pass their namespace followed by the method you are trying to access.

```
$app->get('/', 'App\Controllers\CoffeeController:index');
```

Notes
=====

[](#notes)

- You don't have to worry about your controller dependencies, the provider will recursively resolve each one of them.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3213d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8a80a2a2857da5ae28ca7b0ec20abf347884da8ccee76f56947c35311d63f31?d=identicon)[flaviojr](/maintainers/flaviojr)

---

Top Contributors

[![flavioribeirojr](https://avatars.githubusercontent.com/u/21633230?v=4)](https://github.com/flavioribeirojr "flavioribeirojr (7 commits)")

### Embed Badge

![Health badge](/badges/flaviojr-silex-controller-provider/health.svg)

```
[![Health](https://phpackages.com/badges/flaviojr-silex-controller-provider/health.svg)](https://phpackages.com/packages/flaviojr-silex-controller-provider)
```

###  Alternatives

[php-di/silex-bridge

PHP-DI integration in Silex

2465.4k1](/packages/php-di-silex-bridge)[mouf/pimple-interop

This project is a very simple extension to the Pimple microframework. It adds to Pimple compatibility with the container-interop APIs.

102.4M2](/packages/mouf-pimple-interop)[stikmanw/silex-newrelic

Integrate the NewRelic PHP API into Silex framework

2014.7k](/packages/stikmanw-silex-newrelic)

PHPackages © 2026

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