I'm about to start writing a new php library for hateoas stuff. Here are my thoughts about what features it should have. If you have comments/suggestions/ideas/requests/whatever, please comment the gist.
- php 5.3 library
- hooking into the jms serializer
- support multiple hateoas "formats/standards" (hal, etc)
- configuration layer
- static configuration: php, yaml, annotations, extension api for other libraries (being cached)
- dynamic configuration, attach configuration to an object
In yaml/annotations, when configuring links, href/rel/content/parameters value can be a
string, number etc ... But if it starts with a @
, the content is replaced by a handler.
@{handler_id}.{rest}
, handler_id is the handler id, and rest will be passed to the handler.
In the example, @this is a handler, which will use PropertyAccess and {rest}
to get the
value on the object
@j Embedded resources are configured with the
content
property, maybe I should rename that to "embed"