thipages/quicktag
Composer 安装命令:
composer require thipages/quicktag
包简介
Quick html tags builder
README 文档
README
Quick Html tags builder
Installation
composer require thipages\quicktag
Usage of QTag class
Basic usage
Maps are associative arrays mapping tags attributes
// ************* // CONTENT TAGS // ************* QTag::tag ($tag, ...$map)($content) : String QTag::tag ($tag, ...$map1)($content,$map2]) : String // ************* // VOID TAGS // ************* QTag::tag ($tag, ...$map):String
Examples
$blue=['style'=>'color:blue']; $html=QTag::tag('span',$blue)('Hello QTag'); /* <span style="color:blue">Hello QTag</span> */ $html=QTag::tag('input', ['type'=>'num','min'=>2]); /* <input type="num" min="2" /> */
Templating usage - Content tags
QTag::tag ($tag, ...$map1)[($content, ...$map2, true)]n($content, ...$mapN) : String
Examples
$blue=['style'=>'color:blue']; $template=QTag::tag('span',$blue)('Hello QTag', true); $html=$template('...and more"); /* <span style="color:blue">Hello QTag...and more</span> */
统计信息
- 总下载量: 44
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-05