/**
* Class constructor.
*
* @param \Joomla\CMS\Application\CMSApplication $app Application-object that the router should use
* @param \Joomla\CMS\Menu\AbstractMenu $menu Menu-object that the router should use
*
* @since 3.4
*/
public function __construct($app = null, $menu = null)
{
if ($app) {
$this->app = $app;
} else {
$this->app = Factory::getApplication();
}
if ($menu) {
$this->menu = $menu;
} else {
$this->menu = $this->app->getMenu();
}
}