Catalogue\MergeOperation (Component\Translation)
Symfony\Component\Translation\Catalogue\MergeOperation
class MergeOperation extends AbstractOperation
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.
Methods
__construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target) | from AbstractOperation | |
array | getDomains() Returns domains affected by operation. | from AbstractOperation |
array | getMessages(string $domain) Returns all valid messages ('all') after operation. | from AbstractOperation |
array | getNewMessages(string $domain) Returns new messages ('new') after operation. | from AbstractOperation |
array | getObsoleteMessages(string $domain) Returns obsolete messages ('obsolete') after operation. | from AbstractOperation |
MessageCatalogueInterface | getResult() Returns resulting catalogue ('result'). | from AbstractOperation |
Details
public __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target)
public array getDomains()
Returns domains affected by operation.
public array getMessages(string $domain)
Returns all valid messages ('all') after operation.
public array getNewMessages(string $domain)
Returns new messages ('new') after operation.
public array getObsoleteMessages(string $domain)
Returns obsolete messages ('obsolete') after operation.
public MessageCatalogueInterface getResult()
Returns resulting catalogue ('result').
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Translation/Catalogue/MergeOperation.html