protected function getGenerator(RouteCollection $routes, array $parameters = array(), $logger = null) {
$context = new RequestContext('/app.php');
foreach ($parameters as $key => $value) {
$method = 'set' . $key;
$context
->{$method}($value);
}
$generator = new UrlGenerator($routes, $context, $logger);
return $generator;
}