If you do not want to set a parameter in each init controller, you can also set the parameter as a global route parameter. In your bootstrap, pull out the router instance and call
$router->setGlobalParam('format', 'xml');
Or you can set the default values ββin the routes you define or, possibly, when using the default router anywhere in your URL after your name params / format / xml.
source
share