File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55
66## [ Unreleased] [ ]
77
8+ ### Added
9+
10+ - Documentation (see docs/ folder)
11+ - Every object has got a ` get() ` and ` has() ` method for better value access
12+ - Every object can list his own keys with ` keyKeys() `
13+
14+ ### Removed
15+
16+ - All old getter like ` getMeta() ` or ` hasId() ` were removed
17+
818## 0.1 - 2015-08-11
919
1020### Added
Original file line number Diff line number Diff line change 44[ ![ Software License] [ ico-license ]] ( LICENSE )
55[ ![ Build Status] [ ico-travis ]] [ link-travis ]
66
7- JSON API Client is a PHP Library to handle the response body from a [ JSON API] ( http://jsonapi.org ) Server.
7+ JSON API Client is a PHP Library to validate and handle the response body from a [ JSON API] ( http://jsonapi.org ) Server.
88
99Format: [ JSON API] ( http://jsonapi.org/format ) 1.0
1010
@@ -28,12 +28,17 @@ $jsonapi_string = '{"meta":{"info":"Testing the JSON API Client."}}';
2828
2929$document = \Art4\JsonApiClient\Utils\Helper::parse($jsonapi_string);
3030
31- if ($document->hasMeta( ) and $document->getMeta( )->hasInfo( ))
31+ if ($document->has('meta' ) and $document->get('meta' )->has('info' ))
3232{
33- echo $document->getMeta( )->getInfo();
33+ echo $document->get('meta' )->get('info'); // "Testing the JSON API Client."
3434}
3535
36- // "Testing the JSON API Client."
36+ // List all keys
37+ var_dump($document->getKeys());
38+
39+ // array(
40+ // 0 => "meta"
41+ // )
3742```
3843
3944### Using as validator
You can’t perform that action at this time.
0 commit comments