miovisman/parserus
最新稳定版本:1.5.0
Composer 安装命令:
composer require miovisman/parserus
包简介
BBCode parser.
README 文档
README
BBCode parser.
Note
Version 1.x is incompatible with version 0.9.x.
Requirements
- PHP 7.3.0+
Installation
Include Parserus.php or install the composer package.
Example
$parser = new Parserus(); echo $parser->addBBCode([ 'tag' => 'b', 'handler' => function($body) { return '<b>' . $body . '</b>'; } ])->addBBcode([ 'tag' => 'i', 'handler' => function($body) { return '<i>' . $body . '</i>'; }, ])->parse("[i]Hello\n[b]World[/b]![/i]") ->getHTML(); #output: <i>Hello<br><b>World</b>!</i>
More examples in the wiki.
License
This project is under MIT license. Please see the license file for details.
统计信息
- 总下载量: 52
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-25