jasir/clipper
Composer 安装命令:
composer require jasir/clipper
包简介
Clips out marked parts from textfile
README 文档
README
Clipper is a small utility to take a text and clip regions marked with your own marks. Use it for example to clip only relevant parts from your html pages to generate pdf. Marks can be nested
$text = <<<EOF
<html>
<!--start-->
<body>
<!--end-->
<ul class="menu">
<li> Wow
</ul>
<!--start-->
<p>LoremIpsum</p>
<!--end-->
<footer>
</footer>
<!--start-->
</body>
<!--end-->
</html>
EOF;
Clipping text between marks
$clipper = new Clipper('<!--start-->', '<!--end-->');
$result = $cliper->clip($text)
# $result contains <body><p>LoremIpsum</p>
Clipping text not between marks
$result = $clipper->clipExclued($text);
#result contains <html><body><ul class="menu"><li>Wow</ul><footer></footer></html>
统计信息
- 总下载量: 117
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2013-02-24