FileAccess Orion

MergeOperation extends AbstractOperation
in package

Merge operation between two catalogues as follows: all = source ∪ target = {x: x ∈ source ∨ x ∈ target} new = all ∖ source = {x: x ∈ target ∧ x ∉ source} obsolete = source ∖ all = {x: x ∈ source ∧ x ∉ source ∧ x ∉ target} = ∅ Basically, the result contains messages from both catalogues.

Tags
author

Jean-François Simon contact@jfsimon.fr

Table of Contents

$messages  : array<string|int, mixed>
This array stores 'all', 'new' and 'obsolete' messages for all valid domains.
$result  : mixed
$source  : mixed
$target  : mixed
$domains  : array<string|int, mixed>|null
__construct()  : mixed
getDomains()  : array<string|int, mixed>
Returns domains affected by operation.
getMessages()  : array<string|int, mixed>
Returns all valid messages ('all') after operation.
getNewMessages()  : array<string|int, mixed>
Returns new messages ('new') after operation.
getObsoleteMessages()  : array<string|int, mixed>
Returns obsolete messages ('obsolete') after operation.
getResult()  : MessageCatalogueInterface
Returns resulting catalogue ('result').
processDomain()  : mixed
Performs operation on source and target catalogues for the given domain and stores the results.

Properties

$messages

This array stores 'all', 'new' and 'obsolete' messages for all valid domains.

protected array<string|int, mixed> $messages

The data structure of this array is as follows:

[ 'domain 1' => [ 'all' => [...], 'new' => [...], 'obsolete' => [...] ], 'domain 2' => [ 'all' => [...], 'new' => [...], 'obsolete' => [...] ], ... ]

The array that stores 'all', 'new' and 'obsolete' messages

$domains

private array<string|int, mixed>|null $domains

The domains affected by this operation

Methods

getDomains()

Returns domains affected by operation.

public getDomains() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMessages()

Returns all valid messages ('all') after operation.

public getMessages(mixed $domain) : array<string|int, mixed>
Parameters
$domain : mixed
Return values
array<string|int, mixed>

getNewMessages()

Returns new messages ('new') after operation.

public getNewMessages(mixed $domain) : array<string|int, mixed>
Parameters
$domain : mixed
Return values
array<string|int, mixed>

getObsoleteMessages()

Returns obsolete messages ('obsolete') after operation.

public getObsoleteMessages(mixed $domain) : array<string|int, mixed>
Parameters
$domain : mixed
Return values
array<string|int, mixed>

processDomain()

Performs operation on source and target catalogues for the given domain and stores the results.

protected processDomain(mixed $domain) : mixed
Parameters
$domain : mixed

The domain which the operation will be performed for

Return values
mixed

Search results