protected function createController($controller)
    {
        $this->checkClass($controller);
        $handler = Application::container()->make($controller);
        if (! $handler instanceof ControllerInterface) {
            throw new InvalidControllerException(
                "The class '{$controller}' does not implement ControllerInterface."
            );
        }
        return $handler;
    }