DependencyProxy
class DependencyProxy (View source)
A Proxy Class Builder which integrates Dependency Injection.
Properties
protected string | $className | ||
protected Closure | $builder | ||
protected array | $propertyVariables |
Methods
Activate the dependency and set it in the object.
Returns the class name of the proxied dependency
Adds another variable by reference where the actual dependency object should be injected into once this proxy is activated.
Proxy magic call method which triggers the injection of the real dependency and returns the result of a call to the original method in the dependency
Details
__construct(string $className, Closure $builder)
Constructs this proxy
object
_activateDependency()
Activate the dependency and set it in the object.
string
_getClassName()
Returns the class name of the proxied dependency
void
_addPropertyVariable(mixed $propertyVariable)
Adds another variable by reference where the actual dependency object should be injected into once this proxy is activated.
mixed
__call(string $methodName, array $arguments)
Proxy magic call method which triggers the injection of the real dependency and returns the result of a call to the original method in the dependency