bison-digital/odata-client-php

OData Client Library for PHP

Fund package maintenance!
bison-digital
bimsonz

Installs: 12

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/bison-digital/odata-client-php

0.1.3 2023-05-22 19:24 UTC

This package is auto-updated.

Last update: 2025-09-29 03:07:02 UTC


README

Lightweight library designed to make calling OData REST services in PHP applications easy.

The SDK is designed to around PSR 7 (Message) and 18 (Client) to allow for ultimate flexibility of implimentation. It is using Guzzles implementation of PSR-7 Request internally but is compatible with any PSR-18 Client.

Latest Version

Requirements

  • PHP ^8.1

Install

composer require bison-digital/odata-client-php

Example Usage

use BisonDigital\Odata\DTO\Query;
use BisonDigital\Odata\DTO\Table;
use BisonDigital\Odata\Service\OdataService;
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Uri;


$oDataService = new OdataService(
  new Client(),
  new Uri('https://services.odata.org/V4/(S(ka3ts5ohyioxa1fcbdcb0jub))/TripPinServiceRW')
);

$query = (new Query())
    ->select('FirstName', 'LastName')
    ->filterString('UserName', 'willieashmore', 'contains')
    ->orderBy('Concurrency')
;

$oDataService->query(new Table('People'), $query);

Issues

Please report any issues using the issues tab in this repository.

All pull requests and suggestions are welcome.