maveius/liphte
最新稳定版本:1.0
Composer 安装命令:
composer require maveius/liphte
包简介
Lightweight & minimalistic HTML Builder/Generator for PHP
README 文档
README
Liphte
Lightweight & minimalistic HTML Builder/Generator (or maybe Template Engine) for PHP
What is liphte ?
It's lightweight and minimalistic wrapper of html or dom builder based on windwalker-dom and windwalker-html, but inspired by projects rudykocur/pyeve and rudykocur/breve which is simplest way to create or generate html from controllers or others php files.
Example:
/** Import **/ use liphte\tags\html\Tag; use liphte\tags\html\Attribute as a; /** In your code (for example controller) **/ $t = Liphte::tag(); $result = $t->table ([ 'style' => 'border: 1px solid #070;' ], [ $t->tr( [ $t->td( a::style( 'border: 1px solid #000;' ), 'Column 1' ), $t->td( a::style( 'border: 1px solid #000;' ), 'Column 2' ) ] ) ] ); echo $result . "\n";
Output:
<table style="border: 1px solid #070;"><tr><td style="border: 1px solid #000;">Column 1</td><td style="border: 1px solid #000;">Column 2</td></tr></table>
Installing Liphte
Composer required:
{
"require": {
"maveius/liphte": "1.0"
}
}
or
{
"require": {
"maveius/liphte": "dev-master"
}
}
- Add required package to
composer.json - Run
composer updatein your project directory. - Enjoy! Import library and use like in example.
Requirements:
- Tested on: Apache
- PHP >= 5.6(.9)
- MySQL 5+
Changelog
-
v1.0 : 10 June 2015:
- Refactoring code and direcotries structure
-
v0.1 : 6 June 2015:
- Init repository & implement first concept.
Main Developers
Licence
- MIT
Home Page
统计信息
- 总下载量: 144
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-06-10