Flarum\Http\Handler\ControllerRouteHandler::resolveController PHP Method

resolveController() protected method

protected resolveController ( string $class ) : Flarum\Http\Controller\ControllerInterface
$class string
return Flarum\Http\Controller\ControllerInterface
    protected function resolveController($class)
    {
        $controller = $this->container->make($class);
        if (!$controller instanceof ControllerInterface) {
            throw new InvalidArgumentException('Controller must be an instance of ' . ControllerInterface::class);
        }
        return $controller;
    }