Download the PHP package odxproxy/client without Composer

On this page you can find all versions of the php package odxproxy/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 client

ODXProxy Client for PHP

Latest Version PHP Version License

A high-performance, low-footprint, zero-dependency PHP client for interacting with Odoo instances via the ODXProxy Gateway. This library is designed to be lightweight (using native curl and json extensions only) while maintaining strict type safety and security.

Requirements

Installation

Quick Start (Global Initialization)

Similar to the Android SDK, you can initialize the client once (e.g., in your index.php, bootstrap.php, or Laravel AppServiceProvider). This sets up a Request-Scoped Singleton that allows you to access the API anywhere in your code without passing configuration arrays around.

Usage Guide

1. Reading Data

searchRead

Combines searching and reading in one optimized call.

searchCount

Get the number of records matching a domain.

read

Read specific fields from specific IDs.

2. Writing Data

create

Creates a new record and returns the created ID (or record data depending on context).

write

Updates existing records.

unlink (Delete)

Deletes records.

  1. Calling Methods (RPC) Call any public method on an Odoo model.

Advanced Usage

Pagination & Filtering (KeywordRequest)

Use the KeywordRequest helper to handle offset, limit, order, and fields (projection). This allows you to construct queries fluently.

Multi-User / SaaS Support (Odx::with) In Android, the device usually belongs to one user. In PHP, your server might handle requests for hundreds of different Odoo instances (Multi-tenancy). Do not use Odx::init() inside a loop, as it changes the global state. Instead, use Odx::with() to create a temporary, disposable client.

Error Handling

The library throws OdxProxy\Exception\OdxException for both Network errors (Curl) and Odoo Server errors (XML-RPC/JSON-RPC faults).

Helper Classes Reference

OdxProxy\Model\KeywordRequest

Method Description
setLimit(int) Max records to return
setOffset(int) Number of records to skip
setOrder(string) Sort order (e.g., 'id desc')
setFields(array) List of fields to return (SQL SELECT)
resetPagination() Returns a copy of the request with
limit/offset cleared

OdxProxy\Utils\IdHelper

Method Description
generate() Generates a 13-byte random ID (similar to ULID) for request tracking
normalizeId($val) Robustly converts Odoo responses (which can be [id, name] or false) into a safe ID string or null.

License MIT


All versions of client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-curl Version *
ext-json Version *
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 odxproxy/client contains the following files

Loading the files please wait ...