php-extended / php-api-endpoint-http-object
An implementation of the php-extended/php-api-endpoint-http-interface library
Requires
Requires (Dev)
- dev-master
- 4.0.0
- 3.2.23
- 3.2.22
- 3.2.21
- 3.2.20
- 3.2.19
- 3.2.18
- 3.2.17
- 3.2.16
- 3.2.15
- 3.2.14
- 3.2.13
- 3.2.12
- 3.2.11
- 3.2.10
- 3.2.9
- 3.2.8
- 3.2.7
- 3.2.6
- 3.2.5
- 3.2.4
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.14
- 3.0.13
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
This package is auto-updated.
Last update: 2022-07-31 00:18:47 UTC
README
An implementation of the php-extended/php-api-endpoint-http-interface library.
Installation
The installation of this library is made via composer.
Download composer.phar
from their website.
Then add to your composer.json :
"require": {
...
"php-extended/php-api-endpoint-http-object": "^3"
...
}
Then run php composer.phar update
to install this library.
The autoloading of all classes of this library is made through composer's autoloader.
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\Endpoint;
class MyEndpoint extends HttpEndpoint
{
public function getFoo() : Foo
{
$stringData = $this->httpGet($this->createUri('https://example.com'));
return $this->getObject(Foo::class, new CustomDataProvider($stringData));
}
}
Where getDataProvider()
is a method that returns a data provider that
get raw data, either from a file (csv, json, yaml, etc.) or network (json api,
rest api, xml, parsed html, etc, even semantic formats..)
License
MIT (See license file).