final class PropertyHydration

Hydrates objects by assigning existing properties.

Methods§

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

Parameters

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

Returns

T

Throws

ReflectionException When the requested object cannot be reflected or instantiated
Called from 1
Calls 6
public function setProperty(object $instance, ReflectionProperty $property, mixed $value): void

Assigns property.

Parameters

$instanceobject
$propertyReflectionProperty
$valuemixed
Called from 1
Calls 5

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