PHPackages                             shadowprince/slimext - 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. shadowprince/slimext

ActiveLibrary[Framework](/categories/framework)

shadowprince/slimext
====================

Addon for Slim microframework, adding components and routes prefix support

0.1.5(12y ago)1392BSDPHPPHP &gt;=5.2.0

Since Oct 11Pushed 12y ago1 watchersCompare

[ Source](https://github.com/ShadowPrince/slimext)[ Packagist](https://packagist.org/packages/shadowprince/slimext)[ Docs](http://shadowprince.github.com/slimext)[ RSS](/packages/shadowprince-slimext/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (7)Used By (2)

SlimExt
-------

[](#slimext)

SlimExt - monkeypatched extension to [slim](http://slimframework.com), that added functionality of nested routes (for easy url prefixing and adding middlewares), component support (not symfony).

Route url prefixes
------------------

[](#route-url-prefixes)

```
$app->prefix("/uac", function () use ($app) {
    // Route registered as /uac/login
    $app->get("/login", function () use ($app) {
        $app->render("login", array());
    });
});
```

or even

```
$app->prefix("/uac", Middleware::userLogged(), function () use ($app) {
    $app->prefix("/edit", function () use ($app) {
        $app->map("/avatar", function () use ($app) {});
        $app->map("/info", function () use ($app) {});
        $app->prefix("/photos", Middleware::userCanManagePhotos(), function () use ($app) {
            $app->map("/upload", function () use ($app) {});
            $app->map("/delete/:id", function ($id) use ($app) {});
            $app->map("/edit/:id", function ($id) use ($app) {});
        });
    });
});
```

Middleware
----------

[](#middleware)

```
$app->prefix("/admin", Midleware::userAdmin(), function () use ($app) {
    // Routes registered with Middleware::userAdmin() middleware
    $app->get("/", function () use ($app) {/* ... */});
    $app->get("/users", function () use ($app) {/* ... */});
});
```

Components
----------

[](#components)

```
// Uac/urls.php
$app->prefix("/uac", function () use ($app) {
    $app->map("/login", function () use ($app) {
        // ...
    });
});
// bootstrap
$app->config("comps", array("Uac"));
$app->loadComponents();
```

Route /uac/login/ registered and ready.

Another example - integration with [autoparis](http://github.com/shadowprince/autoparis). You can automaticly grab all models (detached to components) just from `$app->config("comps")`.

Services
--------

[](#services)

Service - instance for adding new functionality into $app:

```
class MyApp extends \SlimExt\SlimExt {
    public function user() {
        return $this->user_service_instance;
    }
}

class UserService extends \SlimExt\SlimService {
    public function __construct($app) {
        $this->defaultConfig($app, array(
            "default config" => "can be here"
        ));
    }

    public function isLogged() {
        // ...
    }
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Total

6

Last Release

4562d ago

### Community

Maintainers

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

---

Tags

slimmicroframeworkaddon

### Embed Badge

![Health badge](/badges/shadowprince-slimext/health.svg)

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

###  Alternatives

[slim/slim-skeleton

A Slim Framework skeleton application for rapid development

1.6k458.7k6](/packages/slim-slim-skeleton)[slim/twig-view

Slim Framework 4 view helper built on top of the Twig 3 templating component

3708.0M210](/packages/slim-twig-view)[mathmarques/smarty-view

Slim Framework 4 view helper built on top of the Smarty templating component

24134.7k1](/packages/mathmarques-smarty-view)[projek-xyz/slim-plates

Render your Slim 3 application views using Plates template engine.

2678.2k3](/packages/projek-xyz-slim-plates)[adbario/slim-secure-session-middleware

Secure session middleware for Slim 3 framework

2932.3k2](/packages/adbario-slim-secure-session-middleware)[bnf/slim3-psr15

PSR-15 middleware support for Slim Framework v3

10177.0k5](/packages/bnf-slim3-psr15)

PHPackages © 2026

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