Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Metadata for hydrator generation? #38

@sandermarechal

Description

@sandermarechal

@Ocramius and others, I wonder what your opinion is about metadata for hydrator generation.

For example, I'd like to see integration for hydrator strategies or nesting hydrators, but it seems to me that you'd need to have some kind of metadata about how to map the array to the object. Thinks like, for example:

  • DateTime hydration. What format is the date in?
  • Nesting hydrators. Have ['bar' => ['quu' => 'quuz']] arary, hydrate to a Foo object that has a Bar object as property. The FooHydrator would need to call (or inline) the BarHydrator.
  • Array hydration. How to hydrate or extract an array of objects.

I think some kind of metadata is required to support these use cases, but I don't think you'd want to replicate a large part of e.g. JMS/Serializer. The point of generated hydrators is to be very, very fast.

What would be a sane way to go about this?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions