protected function loadRouter(MountHandler $handler)
 {
     $provider = $this->container->get($handler->getTypeName());
     if (!$provider instanceof RouteProviderInterface) {
         throw new \RuntimeException(sprintf('Invalid route provider: %s', get_class($provider)));
     }
     $collector = new RouteCollector();
     $provider->connectRoutes($collector);
     return new Router($collector);
 }
 public function __construct($pathPrefix, $typeName, $methodName)
 {
     parent::__construct($pathPrefix, $typeName);
     $this->methodName = (string) $methodName;
 }