PHPackages                             mvccore/ext-router-module-media - 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. mvccore/ext-router-module-media

ActiveLibrary[Framework](/categories/framework)

mvccore/ext-router-module-media
===============================

MvcCore - Extension - Router - Modules With Media - extension to manage multiple websites in a single project and to manage website media versions (full/tablet/mobile) for different templates/CSS/JS files rendering, optionally contained in a domain or in URL address in the beginning.

v5.3.0(1y ago)1141BSD-3-ClausePHPPHP &gt;=5.4.0

Since Jan 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mvccore/ext-router-module-media)[ Packagist](https://packagist.org/packages/mvccore/ext-router-module-media)[ RSS](/packages/mvccore-ext-router-module-media/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

MvcCore - Extension - Router - Modules With Media
=================================================

[](#mvccore---extension---router---modules-with-media)

[![Latest Stable Version](https://camo.githubusercontent.com/6a0e9e7da98c52006afe617f10a93df0da2dce64b73eedf5b9b3fcee6bfb6039/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f537461626c652d76352e332e302d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://github.com/mvccore/ext-router-module-media/releases)[![License](https://camo.githubusercontent.com/53baed538c1c87a033a212f6f4acce684d36137f8622307643ab25e08118452e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d425344253230332d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://mvccore.github.io/docs/mvccore/5.0.0/LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)

MvcCore Router extension to manage multiple websites in single project and to manage website media versions (`full`/`tablet`/`mobile` for different templates/css/js files rendering, optionaly contained in URL address domain part or in URL address beinning), defined by domain routes, targeted by module property in URL completing.

This router is the way, how to route your requests in domain level with website media versions with params or variable sections, namespaces, default param values and more.

Outline
-------

[](#outline)

1. [Installation](#user-content-1-installation)
2. [Features](#user-content-2-features)
3. [How It Works](#user-content-3-how-it-works)
4. [Usage](#user-content-4-usage)

1. Installation
---------------

[](#1-installation)

```
composer require mvccore/ext-router-module-media
```

[go to top](#user-content-outline)

2. Features
-----------

[](#2-features)

Extension has the same features as extensions bellow together:

- [Features for `mvccore/ext-router-module`](https://github.com/mvccore/ext-router-module#user-content-2-features)
- [Features for `mvccore/ext-router-media`](https://github.com/mvccore/ext-router-media#user-content-2-features)

Website media version could be contained in any module domain route as param named `` match URL requests like this:

- `http://www.example.com/anything`
- `http://mobile.example.com/anything`

```
new \MvcCore\Ext\Routers\Modules\Route([
    "pattern"              => "//.example.com",
    "module"               => "main",
    "constraints"          => ["media_version" => "www|mobile"],
]);
```

If there is not contained param `` in matched module domain route pattern, website media version param has to be contained (or is automaticly inserted) in URL address beginning like this:

- `http://www.example.com/anything`
- `http://www.example.com/mobile/anything`How precisely is conained in URL address depends on advanced router configuration like allowed media version and more...

[go to top](#user-content-outline)

3. How It Works
---------------

[](#3-how-it-works)

Extension works in the same way as extensions bellow together:

- [How It Works - `mvccore/ext-router-module`](https://github.com/mvccore/ext-router-module#user-content-3-how-it-works)
- [How It Works - `mvccore/ext-router-media`](https://github.com/mvccore/ext-router-media#user-content-3-how-it-works)

Router is composed from traits in extensions named above.

[go to top](#user-content-outline)

4. Usage
--------

[](#4-usage)

### Usage - `Bootstrap` Initialization

[](#usage---bootstrap-initialization)

Add this to `/App/Bootstrap.php` or to **very application beginning**, before application routing or any other extension configuration using router for any purposes:

```
$app = \MvcCore\Application::GetInstance();
$app->SetRouterClass('\MvcCore\Ext\Routers\ModuleMedia');
...
// to get router instance for next configuration:
/** @var \MvcCore\Ext\Routers\ModuleMedia $router */
$router = \MvcCore\Router::GetInstance();
```

All other specific usage and advanced configuration is the same as extensions bellow together:

- [More usage and configuration for `mvccore/ext-router-module`](https://github.com/mvccore/ext-router-module#user-content-42-usage---targeting-custom-application-part)
- [More usage and configuration for `mvccore/ext-router-media`](https://github.com/mvccore/ext-router-media#user-content-42-usage---media-url-prefixes-and-allowed-media-versions)

[go to top](#user-content-outline)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance40

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

Every ~351 days

Total

5

Last Release

534d ago

### Community

Maintainers

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

---

Top Contributors

[![tomFlidr](https://avatars.githubusercontent.com/u/1833722?v=4)](https://github.com/tomFlidr "tomFlidr (27 commits)")

---

Tags

pluginframeworkaddressroutesrouterroutingmobilemediamvcextensionmodulesplug-inprojectsflagversionsitemultipleexttabletsitesmvccorefull

### Embed Badge

![Health badge](/badges/mvccore-ext-router-module-media/health.svg)

```
[![Health](https://phpackages.com/badges/mvccore-ext-router-module-media/health.svg)](https://phpackages.com/packages/mvccore-ext-router-module-media)
```

PHPackages © 2026

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