classPropertyHydration
final class PropertyHydration
Hydrates objects by assigning existing properties.
Methods§
public function hydrateViaProperties<T of object>(
ReflectionClass<T> $reflection,
array<string, mixed> $data,
): TParameters
$reflection | ReflectionClass<T> | |
$data | array<string, mixed> |
Returns
TThrows
ReflectionException When the requested object cannot be reflected or instantiatedCalled from 1
Calls 6
- method-call
ReflectionClass::newInstanceWithoutConstructor()line 27 - method-call PropertyNames::toCamelCase() line 30
- new PropertyNames line 30
- method-call
ReflectionClass::hasProperty()line 32 - method-call
ReflectionClass::getProperty()line 37 - method-call PropertyHydration::setProperty() line 40
public function setProperty(object $instance, ReflectionProperty $property, mixed $value): voidAssigns property.
Parameters
$instance | object | |
$property | ReflectionProperty | |
$value | mixed |
Called from 1
Calls 5
- method-call
ReflectionProperty::getType()line 51 - static-call ConversionTarget::tryFrom() line 52
- method-call
ReflectionProperty::setValue()line 53 - method-call ValueConversion::castValue() line 53
- new ValueConversion line 53
Test cases 14§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
PropertyHydrationTestcalls
Other tests reaching this symbol 13
PostgreSqlEndToEndTestcallsSqliteIntegrationTestcallsDatabaseFixtureProviderTestcallsFileFixtureProviderTestcallsRowMaterializerTestcallsPlanGeneratorTestcallsRowGenerationTestcallsFixtureGeneratorTestcallsFixtureProviderTestcallsHydratorInterfaceTestcallsConstructorHydrationTestcallsReflectionHydratorTestcallsSqlSchemaProviderTestcalls