TwigExtractor

TwigExtractor

class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface

TwigExtractor extracts translation messages from a twig template.

Methods

__construct(Environment $twig)
extract(string|array $resource, MessageCatalogue $catalogue)

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

__construct(Environment $twig)

Parameters

Environment $twig

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

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

Parameters

string|array $resource files, a file or a directory
MessageCatalogue $catalogue The catalogue

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/3.3/Symfony/Bridge/Twig/Translation/TwigExtractor.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部