Php objects for working with hypermedia Collection+JSON (http://amundsen.com/media-types/)
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.web_package
lib/loft_php_lib/dist
src/AKlump/Http
tests/AKlump/Http
vendor
.gitignore
CHANGELOG.txt
README.md
composer.json
composer.lock
web_package.info

README.md

How to create a collection object programatically

Creating objects from JSON strings

The key method will be Object::import, which converts JSON strings into the appropriate object based on it's format.

You can also create a Collection object from json using Collection->setContent().

Converting objects to JSON

Cast any object to string to get it's JSON equivalent.

Converting from Collection+JSON to JSON

Take a look at the class CollectionJsonToJson.