Download the PHP package saintsystems/odata-client without Composer

On this page you can find all versions of the php package saintsystems/odata-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package odata-client

Get started with the OData Client for PHP

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

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.

HTTP Provider Configuration

Starting from version 0.10.0, the OData Client requires an HTTP provider to be explicitly set. This allows you to use any HTTP client implementation that suits your needs.

As of version 1.0.0, we will be using semver.

Using Guzzle (recommended for most users)

First, install Guzzle:

Then configure the OData client:

Using PSR-17/PSR-18 implementations

You can also use any PSR-17/PSR-18 compatible HTTP client:

Call an OData Service

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

Advanced Usage

Custom Headers

You can add custom headers to your OData requests for authentication, tracking, or other purposes:

Custom Query Options

You can add custom query parameters to your OData requests that are not part of the standard OData specification. This is useful for passing additional parameters to your OData service:

Key Features:

Custom Timeout Configuration

If you need to configure custom network timeouts for your OData requests, you can create a subclass of ODataClient and override the createRequest method:

This approach allows you to customize request creation without having to override the entire request flow, following the template method pattern.

Key Features:

For a complete working example, see examples/custom_headers_example.php.

Nested Property Access

The OData Client provides powerful support for accessing nested properties in OData entities, making it easy to work with complex data structures returned by modern OData services.

Object-Style Access

Access nested properties naturally using object notation:

Dot Notation Access

Use dot notation for safe navigation through nested properties:

Property Existence Checking

Check if nested properties exist before accessing them:

Working with Collections

Handle arrays and collections within nested structures:

Real-World ShareFile OData Example

Working with ShareFile-style OData responses with Info objects and Children collections:

Integration with Query Building

Nested property access works seamlessly with OData query operations:

Key Features:

For comprehensive examples and advanced usage patterns, see examples/nested_properties_example.php.

Lambda Operators (any/all)

The OData Client supports lambda operators any and all for filtering collections within entities. These operators allow you to filter based on conditions within related navigation properties.

Basic Usage

Available Lambda Methods

Complex Conditions

Key Features:

For comprehensive examples and advanced usage patterns, see examples/lambda_operators.php.

Batch Operations

The OData Client supports batch operations, which allow you to send multiple HTTP requests in a single batch request. This can significantly improve performance when you need to perform multiple operations.

Basic Batch Usage

Changesets for Atomic Operations

Changesets ensure that all operations within the changeset are executed atomically (all succeed or all fail):

Mixed Batch Operations

You can combine individual requests and changesets in a single batch:

Available Batch Methods

Key Features:

For comprehensive examples, see examples/batch_operations.php.

Develop

Run Tests

Run 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.


All versions of odata-client with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3 || ^8.4
nesbot/carbon Version ^2.0 || ^3.0
illuminate/support Version ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package saintsystems/odata-client contains the following files

Loading the files please wait ...