1 | <?php |
||
23 | final class JsFileExtractor implements FileExtractor |
||
24 | { |
||
25 | /** @var JsTranslationExtractorInterface */ |
||
26 | private $extractor; |
||
27 | |||
28 | /** @var string */ |
||
29 | private $type; |
||
30 | |||
31 | /** |
||
32 | * JsFileExtractor constructor. |
||
33 | * |
||
34 | * @param string $type the type of file handled by this extractor |
||
35 | * @param JsTranslationExtractorInterface|null $extractor extractor instance to use |
||
36 | */ |
||
37 | 1 | public function __construct($type = 'js', JsTranslationExtractorInterface $extractor = null) |
|
42 | |||
43 | 1 | public function getSourceLocations(SplFileInfo $file, SourceCollection $collection): void |
|
53 | |||
54 | public function supportsExtension(string $extension): bool |
||
55 | { |
||
56 | return $this->type === $extension; |
||
57 | } |
||
58 | |||
59 | 1 | private function findTranslations(SplFileInfo $file): TranslationCollection |
|
63 | } |
||
64 |