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 2w 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 31% 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

4608d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43979443?v=4)[ShadowPrince](/maintainers/ShadowPrince)[@shadowprince](https://github.com/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/twig-view

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

3738.4M230](/packages/slim-twig-view)[itsgoingd/slim-facades

"Static" interface for various Slim features

7453.0k5](/packages/itsgoingd-slim-facades)[itsgoingd/slim-services

Service manager for Slim compatible with Laravel packages

7515.7k2](/packages/itsgoingd-slim-services)[duxweb/dux-lite

The lightweight framework based on slim php

161.0k9](/packages/duxweb-dux-lite)

PHPackages © 2026

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