Debian Codegraph @

lib/3rdParty/composer/symfony/translation/Catalogue/OperationInterface.php

raw symbols SCIP
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Translation\Catalogue;
13
14 use Symfony\Component\Translation\MessageCatalogueInterface;
15
16 /**
17 * Represents an operation on catalogue(s).
18 *
19 * An instance of this interface performs an operation on one or more catalogues and
20 * stores intermediate and final results of the operation.
21 *
22 * The first catalogue in its argument(s) is called the 'source catalogue' or 'source' and
23 * the following results are stored:
24 *
25 * Messages: also called 'all', are valid messages for the given domain after the operation is performed.
26 *
27 * New Messages: also called 'new' (new = all ∖ source = {x: x ∈ all ∧ x ∉ source}).
28 *
29 * Obsolete Messages: also called 'obsolete' (obsolete = source ∖ all = {x: x ∈ source ∧ x ∉ all}).
30 *
31 * Result: also called 'result', is the resulting catalogue for the given domain that holds the same messages as 'all'.
32 *
33 * @author Jean-François Simon <[email protected]>
34 */
35 interface OperationInterface
36 {
37 /**
38 * Returns domains affected by operation.
39 */
40 public function getDomains(): array;
41
42 /**
43 * Returns all valid messages ('all') after operation.
44 */
45 public function getMessages(string $domain): array;
46
47 /**
48 * Returns new messages ('new') after operation.
49 */
50 public function getNewMessages(string $domain): array;
51
52 /**
53 * Returns obsolete messages ('obsolete') after operation.
54 */
55 public function getObsoleteMessages(string $domain): array;
56
57 /**
58 * Returns resulting catalogue ('result').
59 */
60 public function getResult(): MessageCatalogueInterface;
61 }