zendframework/zf2 — pull request #939 by juriansluiman (2012-03-18 13:46:18+00:00)
Title: Add listener to add RouteMatch to DI instance manager

With this PR, it is possible to inject the routeMatch object in instances pulled from the DIC. For example, you can add the RouteMatch to the url view helper in the application module.config.php:

```php
'Zend\View\Helper\Url' => array(
'parameters' => array(
'router' => 'Zend\Mvc\Router\RouteStack',
'routeMatch' => 'Zend\Mvc\Router\Http\RouteMatch'
),
)
```
But many other use cases exist. Subject to change perhaps:

1. A separate class, can be a closure instead in `Zend\Mvc\Bootstrap::setupRouter()`
2. Inject during bootstrap, might be in `Zend\Mvc\Application` as well?