dataMapping.setHeaders({someContent: 'someValue'}, true);
JSONObject headers = new JSONObject();
headers.put("someContent", "someValue");
dataMapping.setHeaders(headers, true);

use \Kuzzle\DataMapping;

// ...

$headers = [
  'someContent' => 'someValue'

 * @var $dataMapping DataMapping

This is a helper function returning itself, allowing to easily chain calls.

setHeaders(content, [replace])

contentJSON ObjectNew content
replacebooleantrue: replace the current content with the provided data, false: merge it

Note: by default, the replace argument is set to false

Return value

Returns this CollectionMapping object to allow chaining.