A small PHP OData Client based on guzzlehttp.
composer require rdrei/odata
Import the ODataClient
use \rdrei\odata\ODataClient;
use \rdrei\odata\ODataQuery;
Create a ODataClient and a EntityHandler.
$client = new ODataClient([
'url' => "https://<odata-server>/"
]);
$entityHandler = $client->CreateHandler("EntityName");
Get Enitities with a Query.
$query = new ODataQuery();
$query = $query->skip(0)->take(10);
$result = $entityHandler->Get($query);
Create a new Entity.
$entityHandler->Insert($entity);
Patch a Entity.
$entityHandler->Update($key, $entity);
Remove a Entity by Key.
$entityHandler->Delete($key);
git clone ...
composer install
./vendor/bin/phpunit