private function registerInitializers(array $initializers)
    {
        foreach ($initializers as $initializer) {
            if (is_string($initializer) && class_exists($initializer)) {
                $initializer = new $initializer();
                if (! ($initializer instanceof InitializerInterface)) {
                    throw InvalidArgumentException::fromInvalidInitializer($initializer);
                }
            }
            if (is_callable($initializer)) {
                $this->initializers[] = $initializer;
            } else {
                throw InvalidArgumentException::fromInvalidInitializer($initializer);
            }
        }
    }