soliphp/view

Smarty 和 Twig 视图解析器包

v1.1.0 2019-04-01 08:37 UTC

This package is auto-updated.

Last update: 2024-08-29 04:37:04 UTC


README

本项目对常用模版引擎进行封装,便于集成到开发者所熟悉的框架。 目前支持以下模版引擎:

  • Twig
  • Smarty

安装

使用 composer 将其安装到你的项目中:

composer require soliphp/view

使用

examples 目录下提供了 Soli View 的相关示例。

Twig

安装 Twig 模版引擎:

composer require twig/twig

运行示例:

php examples/twig.php

Smarty

安装 Smarty 模版引擎:

composer require smarty/smarty

运行示例:

php examples/smarty.php

许可证

MIT 公共许可证