W3cubDocs

/Symfony 4.1

AbstractOperation

abstract class AbstractOperation implements OperationInterface

Base catalogues binary operation class.

A catalogue binary operation performs operation on source (the left argument) and target (the right argument) catalogues.

Properties

protected $source
protected $target
protected $result
protected array $messages This array stores 'all', 'new' and 'obsolete' messages for all valid domains.

Methods

__construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target)
array getDomains()

Returns domains affected by operation.

array getMessages(string $domain)

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

array getNewMessages(string $domain)

Returns new messages ('new') after operation.

array getObsoleteMessages(string $domain)

Returns obsolete messages ('obsolete') after operation.

MessageCatalogueInterface getResult()

Returns resulting catalogue ('result').

processDomain(string $domain)

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

Details

__construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target)

Parameters

MessageCatalogueInterface $source
MessageCatalogueInterface $target

Exceptions

LogicException

array getDomains()

Returns domains affected by operation.

Return Value

array

array getMessages(string $domain)

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

Parameters

string $domain

Return Value

array

array getNewMessages(string $domain)

Returns new messages ('new') after operation.

Parameters

string $domain

Return Value

array

array getObsoleteMessages(string $domain)

Returns obsolete messages ('obsolete') after operation.

Parameters

string $domain

Return Value

array

MessageCatalogueInterface getResult()

Returns resulting catalogue ('result').

Return Value

MessageCatalogueInterface

abstract protected processDomain(string $domain)

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

Parameters

string $domain The domain which the operation will be performed for

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Translation/Catalogue/AbstractOperation.html