class ChainExtractor in Plug 7
ChainExtractor extracts translation messages from template files.
@author Michel Salib <michelsalib@hotmail.com>
Hierarchy
- class \Symfony\Component\Translation\Extractor\ChainExtractor implements ExtractorInterface
Expanded class hierarchy of ChainExtractor
File
- lib/
Symfony/ translation/ Extractor/ ChainExtractor.php, line 21
Namespace
Symfony\Component\Translation\ExtractorView source
class ChainExtractor implements ExtractorInterface {
/**
* The extractors.
*
* @var ExtractorInterface[]
*/
private $extractors = array();
/**
* Adds a loader to the translation extractor.
*
* @param string $format The format of the loader
* @param ExtractorInterface $extractor The loader
*/
public function addExtractor($format, ExtractorInterface $extractor) {
$this->extractors[$format] = $extractor;
}
/**
* {@inheritdoc}
*/
public function setPrefix($prefix) {
foreach ($this->extractors as $extractor) {
$extractor
->setPrefix($prefix);
}
}
/**
* {@inheritdoc}
*/
public function extract($directory, MessageCatalogue $catalogue) {
foreach ($this->extractors as $extractor) {
$extractor
->extract($directory, $catalogue);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ChainExtractor:: |
private | property | The extractors. | |
ChainExtractor:: |
public | function | Adds a loader to the translation extractor. | |
ChainExtractor:: |
public | function |
Extracts translation messages from files, a file or a directory to the catalogue. Overrides ExtractorInterface:: |
|
ChainExtractor:: |
public | function |
Sets the prefix that should be used for new found messages. Overrides ExtractorInterface:: |