private function injectPragmas(array $config, Pragma\PragmaCollection $pragmas, ContainerInterface $container)
    {
        if (! isset($config['pragmas']) || ! is_array($config['pragmas'])) {
            return;
        }

        foreach ($config['pragmas'] as $pragma) {
            if ($pragma instanceof Pragma\PragmaInterface) {
                $pragmas->add($pragma);
                continue;
            }

            if (! is_string($pragma)) {
                continue;
            }

            if ($container->has($pragma)) {
                $pragmas->add($container->get($pragma));
                continue;
            }

            if (class_exists($pragma)) {
                $pragmas->add(new $pragma());
                continue;
            }
        }
    }