private function registerAbstractFactories(array $abstractFactories)
    {
        foreach ($abstractFactories as $abstractFactory) {
            if (is_string($abstractFactory) && class_exists($abstractFactory)) {
                if (isset($this->abstractFactoryTags[$abstractFactory])) {
                    continue;
                }
                $this->abstractFactoryTags[$abstractFactory] = true;
                $abstractFactory = new $abstractFactory;
            }
            if ($abstractFactory instanceof Factory\AbstractFactoryInterface) {
                $this->abstractFactories[spl_object_hash($abstractFactory)] = $abstractFactory;
            } else {
                throw InvalidArgumentException::fromInvalidAbstractFactory($abstractFactory);
            }
        }
    }