classConstructorHydration
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,
): TParameters
$reflection | ReflectionClass<T> | |
$parameters | array<ReflectionParameter> | |
$data | array<string, mixed> |
Returns
TThrows
ReflectionException When the requested object cannot be reflected or instantiatedCalled from 1
Calls 9
- method-call PropertyNames::toSnakeCase() line 36
- new PropertyNames line 36
- function-call
array_key_existsline 38 - new MissingConstructorArgumentException line 47
- method-call
ReflectionClass::getName()line 48 - static-call ConversionTarget::tryFrom() line 54
- method-call ValueConversion::castValue() line 55
- new ValueConversion line 55
- method-call
ReflectionClass::newInstanceArgs()line 58
Test cases 14§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ConstructorHydrationTestcalls
Other tests reaching this symbol 13
PostgreSqlEndToEndTestcallsSqliteIntegrationTestcallsDatabaseFixtureProviderTestcallsFileFixtureProviderTestcallsRowMaterializerTestcallsPlanGeneratorTestcallsRowGenerationTestcallsFixtureGeneratorTestcallsFixtureProviderTestcallsHydratorInterfaceTestcallsPropertyHydrationTestcallsReflectionHydratorTestcallsSqlSchemaProviderTestcalls