weierophinney/PhlyRestfully — pull request #64 by weierophinney (2013-05-15 21:58:52+00:00)
Title: Add ability to map objects to resources

If you have a resource object that contains nested objects, currently the only way to ensure they are rendered as embedded resources is if they are themselves HalResource or HalCollection instances. Ideally, this shouldn't be necessary.

One idea gleaned from #zftalk.dev is to inject a "metadata map" into the renderer and/or HalLinks plugin. When traversing an object's properties, if a given property has a match in the map, the data in that map will be used to seed a HalResource or HalCollection during hydration and/or rendering.