/**
* Parse the format of the request
*
* @param SiteRouter &$router Router object
* @param Uri &$uri URI object to process
*
* @return void
*
* @since 4.0.0
*/
public function parseFormat(&$router, &$uri)
{
$route = $uri->getPath();
// Identify format
if (!(substr($route, -9) === 'index.php' || substr($route, -1) === '/') && ($suffix = pathinfo($route, PATHINFO_EXTENSION))) {
$uri->setVar('format', $suffix);
$route = str_replace('.' . $suffix, '', $route);
$uri->setPath($route);
}
}