haoyundada/haoyundada-view
最新稳定版本:v1.0.1
Composer 安装命令:
composer require haoyundada/haoyundada-view
包简介
haoyundada wordpress theme template driver
README 文档
README
haoyundada-Template模板引擎驱动
安装
composer require haoyundada/haoyundada-view
用法示例
本扩展不能单独使用,依赖haoyundada framework
首先配置config目录下的template.php配置文件,然后可以按照下面的用法使用。
use haoyundada\facade\View;
// 模板变量赋值和渲染输出
View::assign(['name' => 'haoyundada'])
// 输出过滤
->filter(function($content){
return str_replace('search', 'replace', $content);
})
// 读取模板文件渲染输出
->fetch('index');
// 或者使用助手函数
view('index', ['name' => 'haoyundada']);
具体的模板引擎配置请参考haoyundada-template库。
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2024-09-28