marcw/weaver
Composer 安装命令:
composer require marcw/weaver
包简介
A small library that weaves HTML together
README 文档
README
Weaves HTML blocks and fragments together.
<?php
$weaver = new \MarcW\Weaver\Weaver();
$body = '<p>foobar</p><p>barfoo</p>';
$fragments = ['<img src="/foobar.png" />'];
$result = $weaver->weave($body, $fragments);
// $results contains: <p>foobar</p><img src="/foobar.png" /><p>barfoo</p>
It's also possible to implicity tells the library where to weaves the HTML pieces.
<?php
$weaver = new \MarcW\Weaver\Weaver();
$body = '<p>foobar</p><p>barfoo</p>__WEAVE__';
$fragments = ['<img src="/foobar.png" />'];
$result = $weaver->weave($body, $fragments);
// $results contains: <p>foobar</p><p>barfoo</p><img src="/foobar.png" />
License and Copyright
See LICENSE file in this repository
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-25