/**
* @param string $type
*/
private static function configureFactory($type)
{
if (version_compare(Kernel::VERSION, '2.5', '<')) {
// nothing to configure as Request::setFactory require SF > 2.5
return;
}
if (!in_array($type, array('host_with_path', 'host_with_path_by_locale'))) {
return;
}
Request::setFactory(function (array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) {
return new SiteRequest($query, $request, $attributes, $cookies, $files, $server, $content);
});
}