AbstractOperation
in package
implements
OperationInterface
Base catalogues binary operation class.
A catalogue binary operation performs operation on source (the left argument) and target (the right argument) catalogues.
Tags
Interfaces, Classes, Traits and Enums
- OperationInterface
- Represents an operation on catalogue(s).
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
$result
protected
mixed
$result
$source
protected
mixed
$source
$target
protected
mixed
$target
$domains
private
array<string|int, mixed>|null
$domains
The domains affected by this operation
Methods
__construct()
public
__construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target) : mixed
Parameters
- $source : MessageCatalogueInterface
- $target : MessageCatalogueInterface
Tags
Return values
mixed —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> —getResult()
Returns resulting catalogue ('result').
public
getResult() : MessageCatalogueInterface
Return values
MessageCatalogueInterface —processDomain()
Performs operation on source and target catalogues for the given domain and stores the results.
protected
abstract processDomain(string $domain) : mixed
Parameters
- $domain : string
-
The domain which the operation will be performed for