nette/nette — pull request #1223 by xificurk (2013-08-29 19:12:25+00:00)
Title: Route: Global filters can reject the route.

Adds ability to reject the whole route in global filters.

Motivation: Probably the most common use of global filters is for URL localization. But there is a problem with localizing special routes (e.g. for top-level pages). You cannot simply replace

```php
$route = new Route(
'',
array(
'presenter' => 'Whatever',
'action' => 'default',
)
);
```

by this

```php
$route = new Route(
'[/]',
array(
'presenter' => 'Whatever',
'action' => 'default',
NULL => array(Route::FILTER_IN => 'filterIn', Route::FILTER_OUT => 'filterOut'),
)
);
```

The translation (by global filter) is the last thing that happens in match and the first thing that happens in constructUrl, so the canonical English names are not available when matching against regexp.

This PR overcomes this problem by allowing to reject the route in the global filter.