Oihana PHP Arango

DiffReport

Read onlyYes

The typed result of a declaration ↔ server comparison for one structure object — a collection, the declared indexes of a collection, or an ArangoSearch View ({@see DiffKind}).

Produced by the diff primitives (collectionDiff() / indexesDiff() / viewDiff()) and returned by their sync counterparts with $applied set when something was actually created or updated. The model-level diagnose() / repair() and the doctor command aggregate lists of these reports.

$changes carries one human-readable line per detected difference (e.g. places.fields.description : not indexed on the server), empty when the object is DiffStatus::IN_SYNC.

Tags
author

Marc Alcaraz (ekameleon)

since
1.2.0

Table of Contents

Properties

$applied  : bool
$changes  : array<string|int, mixed>
$kind  : string
$name  : string
$status  : string

Methods

__construct()  : mixed
inSync()  : bool
Returns true when the object matches its declaration ({@see DiffStatus::IN_SYNC}).

Properties

$changes

public array<string|int, mixed> $changes = []

Methods

__construct()

public __construct(string $name, string $status[, array<int, string> $changes = [] ][, bool $applied = false ][, string $kind = DiffKind::VIEW ]) : mixed
Parameters
$name : string

The name of the object the report is about (View name, collection name, …).

$status : string

One of the DiffStatus constants.

$changes : array<int, string> = []

One line per difference, error or warning — empty when in sync.

$applied : bool = false

Whether the sync counterpart actually created or updated the object.

$kind : string = DiffKind::VIEW

The kind of object — one of the DiffKind constants.

inSync()

Returns true when the object matches its declaration ({@see DiffStatus::IN_SYNC}).

public inSync() : bool
Return values
bool
On this page

Search results