SDK
SDK PHP v3.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

publish #

Publishes the content of this document as a real-time message.


publish([options]) #

Arguments Type Description
options JSON Object Optional parameters

Options #

Option Type Description Default
volatile JSON Object Additional information passed to notifications to other users null
queuable boolean Make this request queuable or not true

Return Value #

Returns this Document object to allow chaining.

Usage #

Copied to clipboard!
<?php
use \Kuzzle\Document;
// ...
/**
  * @var $document Document
  */
try {
  $document->publish();
} catch (ErrorException $e) {
}