| 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; |
| 13 | |
| 14 | /** |
| 15 | * This interface is used to get, set, and delete metadata about the Catalogue. |
| 16 | * |
| 17 | * @author Hugo Alliaume <[email protected]> |
| 18 | */ |
| 19 | interface CatalogueMetadataAwareInterface |
| 20 | { |
| 21 | /** |
| 22 | * Gets catalogue metadata for the given domain and key. |
| 23 | * |
| 24 | * Passing an empty domain will return an array with all catalogue metadata indexed by |
| 25 | * domain and then by key. Passing an empty key will return an array with all |
| 26 | * catalogue metadata for the given domain. |
| 27 | * |
| 28 | * @return mixed The value that was set or an array with the domains/keys or null |
| 29 | */ |
| 30 | public function getCatalogueMetadata(string $key = '', string $domain = 'messages'): mixed; |
| 31 | |
| 32 | /** |
| 33 | * Adds catalogue metadata to a message domain. |
| 34 | */ |
| 35 | public function setCatalogueMetadata(string $key, mixed $value, string $domain = 'messages'): void; |
| 36 | |
| 37 | /** |
| 38 | * Deletes catalogue metadata for the given key and domain. |
| 39 | * |
| 40 | * Passing an empty domain will delete all catalogue metadata. Passing an empty key will |
| 41 | * delete all metadata for the given domain. |
| 42 | */ |
| 43 | public function deleteCatalogueMetadata(string $key = '', string $domain = 'messages'): void; |
| 44 | } |