bison-digital / odata-client-php
OData Client Library for PHP
Fund package maintenance!
bison-digital
bimsonz
Requires
- php: ^8.1
- guzzlehttp/psr7: ^2.5
- psr/http-client: ^1.0
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.
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.