定制 geraint/odata-query-builder 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

geraint/odata-query-builder

最新稳定版本:v1.2.0

Composer 安装命令:

composer require geraint/odata-query-builder

包简介

A simple OData Query Builder with fluent interface

README 文档

README

Build and Test

This is basic query builder with a fluent interface for constructing OData URL's.

It is not intended to be a full implementation but, if your needs are modest, then it could be a good fit for your project.

Install

composer require geraint/odata-query-builder

Example

<?php

use ODataQueryBuilder\ODataQueryBuilder;

$serviceRootUrl = 'https://services.odata.org/V4/TripPinService/';
$resourcePath = 'People';
$builder = new ODataQueryBuilder($serviceRootUrl, $resourcePath);
$query = $builder
    ->filter("FirstName eq 'Scott'")
    ->select('UserName, LastName, FirstName')
    ->orderBy('LastName asc')
    ->format('json')
    ->build();

$query should now contain the following:

https://services.odata.org/V4/TripPinService/People?$filter=FirstName%20eq%20%27Scott%27&$select=UserName%2C%20LastName%2C%20FirstName&$orderby=LastName%20asc&$format=json

See doc/methods.md for more info.

License

See the LICENSE file for license rights and limitations (GNU GPLv3).

Alternatives

统计信息

  • 总下载量: 960
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2022-02-10