Neos\Flow\ObjectManagement\DependencyInjection\PropertyInjectionTrait::Flow_Proxy_LazyPropertyInjection PHP Méthode

Flow_Proxy_LazyPropertyInjection() private méthode

Used in proxy classes.
private Flow_Proxy_LazyPropertyInjection ( string $propertyObjectName, string $propertyClassName, string $propertyName, string $setterArgumentHash, callable $lazyInjectionResolver ) : void
$propertyObjectName string
$propertyClassName string
$propertyName string
$setterArgumentHash string
$lazyInjectionResolver callable
Résultat void
    private function Flow_Proxy_LazyPropertyInjection($propertyObjectName, $propertyClassName, $propertyName, $setterArgumentHash, callable $lazyInjectionResolver)
    {
        $injection_reference =& $this->{$propertyName};
        $this->{$propertyName} = \Neos\Flow\Core\Bootstrap::$staticObjectManager->getInstance($propertyObjectName);
        if ($this->{$propertyName} === null) {
            $this->{$propertyName} = \Neos\Flow\Core\Bootstrap::$staticObjectManager->getLazyDependencyByHash($setterArgumentHash, $injection_reference);
            if ($this->{$propertyName} === null) {
                $this->{$propertyName} = \Neos\Flow\Core\Bootstrap::$staticObjectManager->createLazyDependency($setterArgumentHash, $injection_reference, $propertyClassName, $lazyInjectionResolver);
            }
        }
    }
PropertyInjectionTrait