nilportugues / php-json-api

JSON API transformer outputting valid (PSR-7) API Responses.
http://nilportugues.com
MIT License
71 stars 35 forks source link

JSONAPI - Relationship #1

Closed nilportugues closed 9 years ago

nilportugues commented 9 years ago

Get from "included" objects the relationship and append it to its parent.

In the provided example, comments from "included" should be in post's relationship.

This requires all classes to implement or have an add relationship method to construct the URI to the resource.

nilportugues commented 9 years ago

https://github.com/nilportugues/json-api/commit/639ffa07fe73cbdf3566f9ac497028c86fa3169d