patinthehat/templated-text
Composer 安装命令:
composer require patinthehat/templated-text
包简介
Basic text templating system
README 文档
README
Permafrost Templated Text
Basic text templating for PHP 5+.
Installation
Install with composer:
composer require patinthehat/templated-text
Sample Usage
<?php include 'vendor/autoload.php'; use Permafrost\TemplatedText\TemplatedText; $tt = new TemplatedText; $tt ->variable('one', 'OONNEE') ->variable('hw', 'Hello World') ->filter('test', function($v) { return '->>'.$v.'<<-'; }) ->template('This is a test template, one is {{one|aquote}} and {{hw}}! then, {{hw | quote | test}}!! and {{one | quote}} '); echo $tt->process() . PHP_EOL . PHP_EOL;
Sample Output
This is a test template, one is ->OONNEE<- and Hello World! then, ->>"Hello World"<<-!! and "OONNEE"
License
This project is licensed under the MIT License.
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-31