rherb/php-odata-query-builder
最新稳定版本:v1.0.1
Composer 安装命令:
composer require rherb/php-odata-query-builder
包简介
OData Query Builder for PHP
README 文档
README
This library is used to fluently build OData Query strings. View on Packagist.
Install the Library
You can install the PHP Library with Composer.
composer require rherb/php-odata-query-builder
To create a builder, pass in the service URL and entity set into the constructor.
$builder = new ODataQueryBuilder('http://services.odata.org/V4/TripPinService/', 'People');
Build the Query String
Use the various functions followed by the buildQuery() function to generate and return the query string.
$builder->from('People')->top(10)->buildQuery(); $builder->from('People')->find('bobjoe')->buildQuery(); $builder->from('Books')->filter('Cost')->lessThan(20)->buildQuery(); $builder->from('People')->filter('LastName')->equals('Smith')->buildQuery(); $builder->from('People')->filter('LastName')->equals('Smith')->andFilter('FirstName')->equals('Joe')->buildQuery();
Please view the test cases for more complex examples.
统计信息
- 总下载量: 2.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-06-24