PHP Client SDK

PHP Client SDK

Updated: March 30, 2021

The Nuxeo PHP Client is a PHP library for Nuxeo REST API.

It is compatible with all Nuxeo versions as of LTS 2015.

Getting Started

Follow this tutorial to have a running Nuxeo instance on your local machine.

Library Import

Download the latest build Nuxeo PHP Client main.

Download the latest stable GitHub release (latest SemVer)

Composer:

  "require": {
    "nuxeo/nuxeo-php-client": "~2.1"
  }

Create a Client

use Nuxeo\Client\NuxeoClient;

$client = new NuxeoClient('http://localhost:8080/nuxeo', 'Administrator', 'Administrator')
    ->schemas('*'); // fetch all document schemas

Client is now ready to execute requests to Nuxeo Server.

Fetch Your First Document

Below is how we can retrieve default domain from a stock Nuxeo Server:

use Nuxeo\Client\Objects\Document;

Document $domain = $client->repository()->fetchDocumentByPath("/default-domain");
$title = $domain->getProperty("dc:title"); // should be equal to "Domain"
Related sections in this documentation