Documentation

InstanceInjector extends ObjectCreator
in package
implements DefinitionResolver

Injects dependencies on an existing instance.

Tags
template-implements
since
5.0
author

Matthieu Napoli matthieu@mnapoli.fr

Table of Contents

Interfaces

DefinitionResolver
Resolves a definition to a value.

Methods

__construct()  : mixed
isResolvable()  : bool
The definition is not resolvable if the class is not instantiable (interface or abstract) or if the class doesn't exist.
resolve()  : mixed
Injects dependencies on an existing instance.
setPrivatePropertyValue()  : void
injectMethodsAndProperties()  : void

Methods

isResolvable()

The definition is not resolvable if the class is not instantiable (interface or abstract) or if the class doesn't exist.

public isResolvable(Definition $definition[, array<string|int, mixed> $parameters = [] ]) : bool
Parameters
$definition : Definition
$parameters : array<string|int, mixed> = []

Optional parameters to use to build the entry.

Return values
bool

resolve()

Injects dependencies on an existing instance.

public resolve(InstanceDefinition $definition[, array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
$definition : InstanceDefinition
$parameters : array<string|int, mixed> = []

Optional parameters to use to build the entry.

Tags
psalm-suppress

ImplementedParamTypeMismatch

Return values
mixed

Value obtained from the definition.

setPrivatePropertyValue()

public static setPrivatePropertyValue(string|null $className, mixed $object, string $propertyName, mixed $propertyValue) : void
Parameters
$className : string|null
$object : mixed
$propertyName : string
$propertyValue : mixed

        
On this page

Search results