dqneo/smarty-delimiter-converter
Composer 安装命令:
composer require dqneo/smarty-delimiter-converter
包简介
a cli tool to convert delimiters in smarty template files
关键字:
README 文档
README
convert tool to replace delimiters (e.g. from { } to {{ }}) in your smarty template files.
DESCRIPTION
It converts the content
{if $config.smarty_debug}
{debug}
{/if}
into this
{{if $config.smarty_debug}}
{{debug}}
{{/if}}
You can customize delimiters as you like.
INSTALL
composer require dqneo/smarty-delimiter-converter
USAGE
use DQNEO\SmartyDelimiterConverter\Converter; // define delimiters $from = ['{', '}']; $to = ['{{', '}}']; $converter = new Converter($from, $to); // convert a content $converted = $converter->convert('hello {$name}'); // => 'hello {{$name}}' # convert a file $converted = $converter->convert('/path/to/file.tpl'); // returns a converted content
you can convert all template files under a directory recursivlely
./bin/smarty-delimiter-converter /path/to/dir/
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0
- 更新时间: 2016-02-10