Download the PHP package floor9design/json-api-formatter without Composer
On this page you can find all versions of the php package floor9design/json-api-formatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download floor9design/json-api-formatter
More information about floor9design/json-api-formatter
Files in floor9design/json-api-formatter
Package json-api-formatter
Short Description A set classes that allow for creating JSON API compliant objects
License MIT
Homepage https://github.com/floor9design-ltd/json-api-formatter
Informations about the package json-api-formatter
json-api-formatter
A set of classes that allow for creating JSON API compliant objects
Introduction
The JSON API has a precise response format. This set of classes allows these to be easily created and interrogated, meaning easy and reliable output/input processing.
Output is as simple as:
Other responses and elements, such as errors, meta data, links and source elements are all supported.
For more examples, see usage.
Features
The classes offer:
- easy methods to wrap and unwrap content
- default values and settings out of the box, improving the quality of response
- fluent programming approach, allowing objects to be built on the fly
Install
Via Composer/packagist
Via git
Or:
Usage
This is discussed in the usage document.
- usage
Setup
There are no specific config setup steps required. The class should autoload in PSR-4 compliant systems. If you are using the class on its own, simply include it however is most appropriate.
Testing
Tests can be run as follows:
./vendor/phpunit/phpunit/phpunit
Static analysis/code review can be performed by using phpstan:
./vendor/bin/phpstan
The following tests and also creates code coverage (usually maintained at 100%)
./vendor/phpunit/phpunit/phpunit --coverage-html docs/tests/
Note, the following are very useful for validating/testing outputs:
Credits
Changelog
A changelog is generated here:
- Change log
License
This software is available under the MIT licence.
- License File
All versions of json-api-formatter with dependencies
php Version >=7.4