PhpExtractor

class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface

PhpExtractor extracts translation messages from a PHP template.

Constants

MESSAGE_TOKEN
METHOD_ARGUMENTS_TOKEN
DOMAIN_TOKEN

Methods

extract(string|array $resource, MessageCatalogue $catalog)

Extracts translation messages from files, a file or a directory to the catalogue.

setPrefix(string $prefix)

Sets the prefix that should be used for new found messages.

Details

extract(string|array $resource, MessageCatalogue $catalog)

Extracts translation messages from files, a file or a directory to the catalogue.

Parameters

string|array $resource Files, a file or a directory
MessageCatalogue $catalog

setPrefix(string $prefix)

Sets the prefix that should be used for new found messages.

Parameters

string $prefix The prefix

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Translation/Extractor/PhpExtractor.html