PHPackages                             flame/modules - 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. flame/modules

ActiveLibrary[Framework](/categories/framework)

flame/modules
=============

Nette modules on the Steroids

v2.3.0(11y ago)1361.6k↓33.3%7[4 issues](https://github.com/flame-org/Modules/issues)3LGPL-3.0PHPPHP &gt;=5.3.2

Since Jul 18Pushed 10y ago3 watchersCompare

[ Source](https://github.com/flame-org/Modules)[ Packagist](https://packagist.org/packages/flame/modules)[ Docs](https://github.com/flame-org/Modules)[ RSS](/packages/flame-modules/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (13)Used By (3)

\#Nette Modules on the Steroids [![Build Status](https://camo.githubusercontent.com/30bcbc82f987c88c40cc6b57fb813f2e644eefc40a6cef3eade193a5e0de3191/68747470733a2f2f7472617669732d63692e6f72672f666c616d652d6f72672f4d6f64756c65732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/flame-org/Modules)

**Simple registration and management of Nette modules &amp; extensions.**

Read more on [project homepage](http://flame-org.github.io/Modules/).

\##Features

\###Simple configuration ####config.neon In config.neon register extension **Flame\\Modules\\DI\\ModulesExtension**

```
extensions:
	- Flame\Modules\DI\ModulesExtension
```

\####Add your extensions Register extensions very simply

```
extensions:
	- App\AppModule\DI\AppExtension
	rest: Flame\Rest\DI\RestExtension
	events: Kdyby\Events\DI\EventsExtension
	# ...
	- Flame\Modules\DI\ModulesExtension # Do not forget to add it!
```

That's all, nothing more! Simple!

**TIP!** *Make sure the ModulesExtension is registered as the last nette extensions. You will avoid a lot of misunderstanding.*

\##Examples ###[IRouterProvider](https://github.com/flame-org/Modules/blob/master/Flame/Modules/Providers/IRouterProvider.php)

```
class AppExtension extends CompilerExtension implements Flame\Modules\Providers\IRouterProvider
{

	/**
	 * Returns array of ServiceDefinition,
	 * that will be appended to setup of router service
	 *
 	 * @example https://github.com/nette/sandbox/blob/master/app/router/RouterFactory.php - createRouter()
	 * @return \Nette\Application\IRouter
	 */
	public function getRoutesDefinition()
	{
		return new Nette\Application\Routers\Route('//[/]', array(
			'module' => 'App',
			'Presenter' => 'Homepage',
			'action' => 'default',
			'id' => null
		);
	}
}
```

\###NEW! **You can add your separated service as your router factory**

```
class AppExtension extends CompilerExtension
{
	public function loadConfiguration()
    	{
    		$builder = $this->getContainerBuilder();
    		$builder->addDefinition('service.routerFactory')
    			->setClass('Modules\RouterFactory') // YOUR ROUTER FACTORY CLASS
    			->addTag(Flame\Modules\ModulesExtension::TAG_ROUTER); // DONT FORGET TO ADD THE TAG!
    	}
}
```

\###[IPresenterMappingProvider](https://github.com/flame-org/Modules/blob/master/Flame/Modules/Providers/IPresenterMappingProvider.php)

```
class AppExtension extends CompilerExtension implements Flame\Modules\Providers\IPresenterMappingProvider
{

	/**
    	 * Returns array of ClassNameMask => PresenterNameMask
    	 *
    	 * @example return array('*' => 'Booking\*Module\Presenters\*Presenter');
    	 * @return array
    	 */
    	public function getPresenterMapping()
    	{
    		return array(
    			'*' => 'App\*Module\Presenters\*Presenter'
    		);
    	}
}
```

\###[IParametersProvider](https://github.com/flame-org/Modules/blob/master/Flame/Modules/Providers/IParametersProvider.php)

```
class AppExtension extends CompilerExtension implements Flame\Modules\Providers\IParametersProvider
{

	/**
	 * Return array of parameters,
	 * which you want to add into DIC
	 *
	 * @example return array('images' => 'path/to/folder/with/images');
	 * @return array
	 */
	public function getParameters()
	{
		return array(
			'images' => '%wwwDir%/path/to/folder/with/images',
			'consoleMode' => true,
			'appDir' => 'aa'
		);
	}

}
```

\###[ITemplateHelpersProvider](https://github.com/flame-org/Modules/blob/master/Flame/Modules/Providers/ITemplateHelpersProvider.php)

```
class HelperExtension extends CompilerExtension implements Flame\Modules\Providers\ITemplateHelpersProvider
{

	/**
	 * Return list of helpers definitions or providers
	 *
	 * @return array
	 */
	public function getHelpersConfiguration()
	{
		return array(
			'App\HelperModule\Template\HelperProvider'
		);
	}
}
```

\###[ILatteMacrosProvider](https://github.com/flame-org/Modules/blob/master/Flame/Modules/Providers/ILatteMacrosProvider.php)

```
class MacroExtension extends CompilerExtension implements Flame\Modules\Providers\ILatteMacrosProvider
{

	/**
	 * Get array of latte macros classes
	 *
	 * @return array
	 */
	public function getLatteMacros()
	{
		return array(
			'App\MacroModule\Template\MacroInstaller'
		);
	}
}
```

\###[IErrorPresenterProvider](https://github.com/flame-org/Modules/blob/master/Flame/Modules/Providers/IErrorPresenterProvider.php)

```
class ErrorExtension extends CompilerExtension implements Flame\Modules\Providers\IErrorPresenterProvider
{

	/**
	 * Return name of error presenter
	 *
	 * @return string
	 */
	public function getErrorPresenterName()
	{
		return 'Error:CustomError';
	}
}
```

and more: **[ITracyBarPanelsProvider](https://github.com/flame-org/Modules/blob/master/Flame/Modules/Providers/ITracyPanelsProvider.php), [ITracyPanelsProvider](https://github.com/flame-org/Modules/blob/master/Flame/Modules/Providers/ITracyBarPanelsProvider.php)**

\###What next? Look into the [project homepage](http://flame-org.github.io/Modules/) for more details.

Read more about this package on [blog](http://blog.jsifalda.name/post/detail/15/nette-moduly-a-vlastni-instalator-3) \[CZE\].

Based on [SOLID MODULAR CONCEPT](http://forum.nette.org/en/1193-extending-extensions-solid-modular-concept).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 83.2% 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 ~43 days

Recently: every ~55 days

Total

11

Last Release

4255d ago

Major Versions

v0.7.0 → v1.0.02014-02-16

v1.0.0 → v2.0.02014-05-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/25aa07e004e9743a4332fbcfd17628e92f82c6457916442530850183cf7c0bf3?d=identicon)[jsifalda](/maintainers/jsifalda)

---

Top Contributors

[![jsifalda](https://avatars.githubusercontent.com/u/1549390?v=4)](https://github.com/jsifalda "jsifalda (188 commits)")[![Budry](https://avatars.githubusercontent.com/u/990676?v=4)](https://github.com/Budry "Budry (29 commits)")[![frosty22](https://avatars.githubusercontent.com/u/905993?v=4)](https://github.com/frosty22 "frosty22 (5 commits)")[![jirinapravnik](https://avatars.githubusercontent.com/u/2507653?v=4)](https://github.com/jirinapravnik "jirinapravnik (4 commits)")

---

Tags

frameworknetteSimplemodulestoolsflamejsifalda

### Embed Badge

![Health badge](/badges/flame-modules/health.svg)

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

###  Alternatives

[flame/framework

Flame is simple and smart FRAMEWORK based on Nette

182.5k1](/packages/flame-framework)[flame/tiny-rest

Smart implementation of REST for Nette

101.1k](/packages/flame-tiny-rest)

PHPackages © 2026

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