Class Resolver
The Resolver. Used for constructor and method injection, and to resolve Container bindings.
The Resolver supports method/constructor injection using both PHPDocComments (the @Inject tag), and typehints on the parameters. The syntax for the @Inject tag is
@Inject {bindingKey} {parameterName}
. The Resolver first makes use of the doc, then resolves any dependencies not covered in the doc via the typehints.
Class Resolver
public
|
|
public
mixed
|
|
public
stdClass
|
#
resolveClass(
Syringe\string $classname, array $constructorOverrideArgs = []
)
Resolve a class dependencies and instantiate it (constructor injection) |
public
mixed
|
#
resolveMethod(
StdClass $instance, Syringe\string $methodname,
array $methodOverrideArgs = [] )
Call a method on a resolved class instance |