public static function resolve(array $controllers)
    {
        $callbacks = [];

        foreach ($controllers as $controller) {
            $qualifiedController = '\\' . trim($controller, '\\');

            $callbacks[$controller] = function (ContainerInterface $container) use ($qualifiedController) {
                $controller = new $qualifiedController();

                if ($controller instanceof Controller) {
                    $controller->setContainer($container);
                }

                return $controller;
            };
        }

        return $callbacks;
    }