public createLazyDependency ( string $hash, &$propertyReferenceVariable, string $className, Closure $builder ) : |
||
$hash | string | An md5 hash over the code needed to actually build the dependency instance |
$className | string | Name of the class of the dependency which eventually will be instantiated |
$builder | Closure | An anonymous function which creates the instance to be injected |
return |
public function createLazyDependency($hash, &$propertyReferenceVariable, $className, \Closure $builder)
{
$this->dependencyProxies[$hash] = new DependencyProxy($className, $builder);
$this->dependencyProxies[$hash]->_addPropertyVariable($propertyReferenceVariable);
return $this->dependencyProxies[$hash];
}