Typed Documents and sorted raw data
This release adds typed Documents for each API
- OpenFoodFacts\Document\FoodDocument;
- OpenFoodFacts\Document\PetDocument;
- OpenFoodFacts\Document\BeautyDocument;
- OpenFoodFacts\Document\ProductDocument;
These all extend from the fromer used OpenFoodFacts\Document - so no breaking interfaces.
The Document Class now also has a function "getData()" which returns the array representation of the Document.
As the OFF-API returns a randomly ordered JSON on each call, the function also recursively sorts the data by key and string.
Updated README for better usage.