public function useContainer(
        ContainerInterface $container,
        $injectByTypeHint = false,
        $injectByParameterName = false
    ) {
        $this->container = $container;

        $resolver = $this->createParameterResolver();
        if ($injectByTypeHint) {
            $resolver->appendResolver(new TypeHintContainerResolver($container));
        }
        if ($injectByParameterName) {
            $resolver->appendResolver(new ParameterNameContainerResolver($container));
        }

        $this->invoker = new Invoker($resolver, $container);
    }