hydrator
hydrator copied to clipboard
Add dehydration
Can you describe you vision of concept?
Do you mean serialization?
I mean hydration and vice versa (aka toArray()).
https://github.com/yiisoft/var-dumper/blob/master/src/VarDumper.php#L175 :)
I mean hydration and vice versa (aka
toArray()).
Seems, it's not hydrator package responsibility. Hydration is a one-way process, it's not serilization/deserilization.
It's not deserialization exactly. We have Map attribute.
// request data is ['a' => 'foo', 'b' => 'bar']
#[Map(['x' => 'a', 'y' => 'b'])
class MyDto
{
public string $x;
public string $y;
}
Result of dehyration should be ['a' => 'foo', 'b' => 'bar'] not ['x' => 'foo', 'y' => 'bar'].
$request->getParsedBody()?
$request->getParsedBody()?
Any input.