flame-org/Modules — pull request #16 by TomasVotruba (2014-08-21 14:36:15+00:00)
Title: Enable services in route definitions

Solves [situation with filterIn/Out](http://forum.nette.org/cs/19594-jak-ziskat-sluzbu-ve-staticke-tride-nebo-objektu-mimo-di#p135577).

Big pron is that syntax is the same as in default RouterFactory.

I'm using this and it work properly.

---

Next step (not now) and more clear would be adding tag to the service (viz [@matej21](http://forum.nette.org/cs/19594-jak-ziskat-sluzbu-ve-staticke-tride-nebo-objektu-mimo-di#p135875)).

```php
$router = $builder->getDefinition('router');
foreach(array_keys($builder->findByTag(...)) as $name) {
$router->addSetup('offsetSet(?, ?)', array(NULL, '@' . $name));
}
```

What do you think?