private function createResolvers($container, $autowire)
    {
        if (!$container instanceof ContainerInterface) {
            throw new WrongContainerClassException(
                sprintf(
                    'Service container is expected to implement `Psr\Container\ContainerInterface`, but `%s` does not.',
                    get_class($container)
                ),
                get_class($container)
            );
        }

        if ($autowire) {
            return array(new ServicesResolver($container), new AutowiringResolver($container));
        }

        return array(new ServicesResolver($container));
    }