dcis/odata-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

dcis/odata-client

Composer 安装命令:

composer require dcis/odata-client

包简介

DCIS OData Client for PHP based on saintsystems

README 文档

README

NOTE: This is a fork of https://github.com/saintsystems/odata-client-php/ since no actions were taken to fix bugs and no changes have been done to the project since several months.

A fluent library for calling OData REST services inspired by and based on the Laravel Query Builder.

This library is currently in preview. Please continue to provide feedback as we iterate towards a production-supported library.

Build Status Latest Version on Packagist Total Downloads

For WordPress users, please see our Gravity Forms Dynamics 365 Add-On.

Install the SDK

You can install the PHP SDK with Composer.

composer require dcis/odata-client

Call an OData Service

The following is an example that shows how to call an OData service.

<?php

require_once __DIR__ . '/vendor/autoload.php';

use SaintSystems\OData\ODataClient;

class UsageExample
{
	public function __construct()
	{
		$odataServiceUrl = 'https://services.odata.org/V4/TripPinService';

		$odataClient = new ODataClient($odataServiceUrl);

		// Retrieve all entities from the "People" Entity Set
		$people = $odataClient->from('People')->get();

		// Or retrieve a specific entity by the Entity ID/Key
		try {
			$person = $odataClient->from('People')->find('russellwhyte');
			echo "Hello, I am $person->FirstName ";
		} catch (Exception $e) {
			echo $e->getMessage();
		}

		// Want to only select a few properties/columns?
		$people = $odataClient->from('People')->select('FirstName','LastName')->get();
	}
}

$example = new UsageExample();

Develop

Run Tests

Run vendor/bin/phpunit from the base directory.

Documentation and resources

Issues

View or log issues on the Issues tab in the repo.

Copyright and license

Copyright (c) Saint Systems, LLC. All Rights Reserved. Licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-17