Resolvable
class Resolvable
Properties
protected mixed | $object | Contains the original object. | |
protected Pouch | $pouch | Holds the Pouch instance. Default to singleton version (pouch()). | |
string | $name | From createClassDependency's inner class |
Methods
From createClassDependency's inner class
Set the object for the resolvable. Also resolve constructor dependencies if needed.
Return the current object of this instance.
Get the type of an anything accurately. If it's an object, the exact class name will be returned.
Magic __call method to handle the automatic resolution of parameters.
Resolve the dependencies for all parameters.
Returns params (dependencies) for internal anonymous classes.
Creates missing class if it can be found in the container. Auto-injecting classes from within the container require them to be prefixed with \Pouch\Key.
Name getter.
From createClassDependency's inner class
Adapter to comply to ReflectionClass.
Details
at line 279
void
__construct(string $name, mixed $content)
From createClassDependency's inner class
at line 59
Resolvable
make(mixed $object)
Set the object for the resolvable. Also resolve constructor dependencies if needed.
at line 89
mixed
getObject()
Return the current object of this instance.
at line 101
string
getType(mixed $element = null)
Get the type of an anything accurately. If it's an object, the exact class name will be returned.
at line 121
mixed
__call(string $method, array $args)
Magic __call method to handle the automatic resolution of parameters.
at line 152
protected array
resolveDependencies(array $params, array $args = [])
Resolve the dependencies for all parameters.
When resolving internal pouch keys, it will register an anonymous class and handle the autowiring for the first occurrence. But, when the same internal key is used twice in different classes, then this method will also take care of properly re-instantiating the anonymous class.
at line 208
array
resolveInternalDependencies(string $anonymousClass)
Returns params (dependencies) for internal anonymous classes.
at line 237
protected ItemInterface
createClassDependency(string $rawClassName, bool $nullable)
Creates missing class if it can be found in the container. Auto-injecting classes from within the container require them to be prefixed with \Pouch\Key.
at line 290
string|null
getName()
Name getter.
at line 300
mixed
getContent()
From createClassDependency's inner class
at line 310
bool
isAnonymous()
Adapter to comply to ReflectionClass.