diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-04 17:50:34 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-04 17:50:34 +0200 |
commit | 46b77928f746a4231d064774b5b67fd892c7ce86 (patch) | |
tree | e3ea690b3f0def1744ddae758923cf92171ef985 /vendor/symfony/translation/Symfony/Component/Translation/Extractor | |
parent | 68abd9c71b1d2f7bb2e9d21819584d1d15005b25 (diff) | |
download | wallabag-46b77928f746a4231d064774b5b67fd892c7ce86.tar.gz wallabag-46b77928f746a4231d064774b5b67fd892c7ce86.tar.zst wallabag-46b77928f746a4231d064774b5b67fd892c7ce86.zip |
rm vendor
Diffstat (limited to 'vendor/symfony/translation/Symfony/Component/Translation/Extractor')
-rw-r--r-- | vendor/symfony/translation/Symfony/Component/Translation/Extractor/ChainExtractor.php | 60 | ||||
-rw-r--r-- | vendor/symfony/translation/Symfony/Component/Translation/Extractor/ExtractorInterface.php | 38 |
2 files changed, 0 insertions, 98 deletions
diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Extractor/ChainExtractor.php b/vendor/symfony/translation/Symfony/Component/Translation/Extractor/ChainExtractor.php deleted file mode 100644 index 0d07a93f..00000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Extractor/ChainExtractor.php +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
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\Extractor; | ||
13 | |||
14 | use Symfony\Component\Translation\MessageCatalogue; | ||
15 | |||
16 | /** | ||
17 | * ChainExtractor extracts translation messages from template files. | ||
18 | * | ||
19 | * @author Michel Salib <michelsalib@hotmail.com> | ||
20 | */ | ||
21 | class ChainExtractor implements ExtractorInterface | ||
22 | { | ||
23 | /** | ||
24 | * The extractors. | ||
25 | * | ||
26 | * @var ExtractorInterface[] | ||
27 | */ | ||
28 | private $extractors = array(); | ||
29 | |||
30 | /** | ||
31 | * Adds a loader to the translation extractor. | ||
32 | * | ||
33 | * @param string $format The format of the loader | ||
34 | * @param ExtractorInterface $extractor The loader | ||
35 | */ | ||
36 | public function addExtractor($format, ExtractorInterface $extractor) | ||
37 | { | ||
38 | $this->extractors[$format] = $extractor; | ||
39 | } | ||
40 | |||
41 | /** | ||
42 | * {@inheritDoc} | ||
43 | */ | ||
44 | public function setPrefix($prefix) | ||
45 | { | ||
46 | foreach ($this->extractors as $extractor) { | ||
47 | $extractor->setPrefix($prefix); | ||
48 | } | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * {@inheritDoc} | ||
53 | */ | ||
54 | public function extract($directory, MessageCatalogue $catalogue) | ||
55 | { | ||
56 | foreach ($this->extractors as $extractor) { | ||
57 | $extractor->extract($directory, $catalogue); | ||
58 | } | ||
59 | } | ||
60 | } | ||
diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Extractor/ExtractorInterface.php b/vendor/symfony/translation/Symfony/Component/Translation/Extractor/ExtractorInterface.php deleted file mode 100644 index 6f877c31..00000000 --- a/vendor/symfony/translation/Symfony/Component/Translation/Extractor/ExtractorInterface.php +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
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\Extractor; | ||
13 | |||
14 | use Symfony\Component\Translation\MessageCatalogue; | ||
15 | |||
16 | /** | ||
17 | * Extracts translation messages from a template directory to the catalogue. | ||
18 | * New found messages are injected to the catalogue using the prefix. | ||
19 | * | ||
20 | * @author Michel Salib <michelsalib@hotmail.com> | ||
21 | */ | ||
22 | interface ExtractorInterface | ||
23 | { | ||
24 | /** | ||
25 | * Extracts translation messages from a template directory to the catalogue. | ||
26 | * | ||
27 | * @param string $directory The path to look into | ||
28 | * @param MessageCatalogue $catalogue The catalogue | ||
29 | */ | ||
30 | public function extract($directory, MessageCatalogue $catalogue); | ||
31 | |||
32 | /** | ||
33 | * Sets the prefix that should be used for new found messages. | ||
34 | * | ||
35 | * @param string $prefix The prefix | ||
36 | */ | ||
37 | public function setPrefix($prefix); | ||
38 | } | ||