/**
 * Set a router for a component
 *
 * @param   string  $component  Component name with com_ prefix
 * @param   object  $router     Component router
 *
 * @return  boolean  True if the router was accepted, false if not
 *
 * @since   3.3
 */
public function setComponentRouter($component, $router)
{
    $reflection = new \ReflectionClass($router);
    if (\in_array('Joomla\\CMS\\Component\\Router\\RouterInterface', $reflection->getInterfaceNames())) {
        $this->componentRouters[$component] = $router;
        return true;
    } else {
        return false;
    }
}