public function onPreDispatch(Enlight_Controller_EventArgs
$args) { /** @var Enlight_Controller_Front $front */
$front =
$args->
getSubject();
$request =
$front->
Request();
/** @var RouterInterface $router */
$router =
$front->
ensureRouter();
// Fix context on forward
$context =
$router->
getContext();
$context->
setGlobalParams($context::
getGlobalParamsFromRequest($request));
} private function convertIteratorToArray(iterable
$iterator): array
{ if (\
is_array($iterator)) { return $iterator;
} return iterator_to_array($iterator, false
);
}}