1<?php
2/**
3 * Copyright since 2007 PrestaShop SA and Contributors
4 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
5 *
6 * NOTICE OF LICENSE
7 *
8 * This source file is subject to the Open Software License (OSL 3.0)
9 * that is bundled with this package in the file LICENSE.md.
10 * It is also available through the world-wide-web at this URL:
11 * https://opensource.org/licenses/OSL-3.0
12 * If you did not receive a copy of the license and are unable to
13 * obtain it through the world-wide-web, please send an email
14 * to license@prestashop.com so we can send you a copy immediately.
15 *
16 * DISCLAIMER
17 *
18 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
19 * versions in the future. If you wish to customize PrestaShop for your
20 * needs please refer to https://devdocs.prestashop.com/ for more information.
21 *
22 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
23 * @copyright Since 2007 PrestaShop SA and Contributors
24 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25 */
26
27namespace PrestaShop\PrestaShop\Core\Translation\Storage\Provider\Definition;
28
29/**
30 * Defines translation type and any element to know how and where to find translations catalogue
31 */
32interface ProviderDefinitionInterface
33{
34    public const TYPE_BACK = 'back';
35    public const TYPE_FRONT = 'front';
36    public const TYPE_MAILS = 'mails';
37    public const TYPE_MAILS_BODY = 'mails_body';
38    public const TYPE_OTHERS = 'others';
39    public const TYPE_MODULES = 'modules';
40    public const TYPE_THEMES = 'themes';
41    public const TYPE_CORE_DOMAIN = 'core_domain';
42
43    public const ALLOWED_TYPES = [
44        self::TYPE_BACK,
45        self::TYPE_FRONT,
46        self::TYPE_MAILS,
47        self::TYPE_MAILS_BODY,
48        self::TYPE_OTHERS,
49        self::TYPE_MODULES,
50        self::TYPE_THEMES,
51        self::TYPE_CORE_DOMAIN,
52    ];
53
54    public const ALLOWED_EXPORT_TYPES = [
55        self::TYPE_BACK,
56        self::TYPE_FRONT,
57        self::TYPE_MAILS,
58        self::TYPE_MAILS_BODY,
59        self::TYPE_OTHERS,
60        self::TYPE_MODULES,
61        self::TYPE_THEMES,
62    ];
63
64    /**
65     * @return string
66     */
67    public function getType(): string;
68
69    /**
70     * Returns a list of patterns to filter catalogue files.
71     * Depends on the translation type.
72     *
73     * @return array<int, string>
74     */
75    public function getFilenameFilters(): array;
76
77    /**
78     * Returns a list of patterns to filter translation domains.
79     * Depends on the translation type.
80     *
81     * @return array<int, string>
82     */
83    public function getTranslationDomains(): array;
84}
85