final class ConstructorHydration

Hydrates objects through their declared constructor.

Methods§

public function hydrateViaConstructor<T of object>(
    ReflectionClass<T> $reflection,
    array<ReflectionParameter> $parameters,
    array<string, mixed> $data,
): T

Parameters

$reflectionReflectionClass<T>
$parametersarray<ReflectionParameter>
$dataarray<string, mixed>

Returns

T

Throws

ReflectionException When the requested object cannot be reflected or instantiated
Called from 1
Calls 9

Test cases 14§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 13

Relations§

Instantiated in 1
Method calls 1