Documentation

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

Constants

ALL_BATCH  = 'all'
NEW_BATCH  = 'new'
OBSOLETE_BATCH  = 'obsolete'

Properties

$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

Methods

__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').
moveMessagesToIntlDomainsIfPossible()  : void
processDomain()  : mixed
Performs operation on source and target catalogues for the given domain and stores the results.

Constants

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(string $domain) : array<string|int, mixed>
Parameters
$domain : string
Return values
array<string|int, mixed>

getNewMessages()

Returns new messages ('new') after operation.

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

getObsoleteMessages()

Returns obsolete messages ('obsolete') after operation.

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

moveMessagesToIntlDomainsIfPossible()

public moveMessagesToIntlDomainsIfPossible([self::*_BATCH $batch = self::ALL_BATCH ]) : void
Parameters
$batch : self::*_BATCH = self::ALL_BATCH

processDomain()

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

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

The domain which the operation will be performed for


        
On this page

Search results