php-extended / php-api-endpoint-http-json-object
A library that implements the php-extended/php-api-endpoint-http-json-interface library
5.0.0
2022-12-18 14:56 UTC
Requires
Requires (Dev)
This package is auto-updated.
Last update: 2023-03-18 15:30:56 UTC
README
A library that implements the php-extended/php-api-endpoint-http-json-interface library.
Installation
The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.
- Download
composer.phar
from their website. - Then run the following command to install this library as dependency :
php composer.phar php-extended/php-api-endpoint-http-json-object": "^5"
Basic Usage
This library is made to be extended. The HttpEndpoint implementation is a generic object that is made to ease the transform into a really useful endpoint that may be something like :
use PhpExtended\Endpoint\HttpJsonEndpoint;
class MyEndpoint extends HttpJsonEndpoint
{
public function getFoo() : Foo
{
return $this->jsonObjectGet(Foo::class, 'https://example.com');
}
}
License
MIT (See license file).