ContainerInteropDoctrine\AbstractFactory::retrieveDependency PHP Метод

retrieveDependency() защищенный Метод

If the container does not know about the dependency, it is pulled from a fresh factory. This saves the user from registering factories which they are not gonna access themself at all, and thus minimized configuration.
protected retrieveDependency ( Interop\Container\ContainerInterface $container, string $configKey, string $section, string $factoryClassName ) : mixed
$container Interop\Container\ContainerInterface
$configKey string
$section string
$factoryClassName string
Результат mixed
    protected function retrieveDependency(ContainerInterface $container, $configKey, $section, $factoryClassName)
    {
        $containerKey = sprintf('doctrine.%s.%s', $section, $configKey);
        if ($container->has($containerKey)) {
            return $container->get($containerKey);
        }
        return (new $factoryClassName($configKey))->__invoke($container);
    }