06/04
2015
dev-master
9999999-devA small library that weaves HTML together
MIT
The Development Requires
Wallogit.com
2017 © Pedro Peláez
A small library that weaves HTML together
Weaves HTML blocks and fragments together., (*1)
<?php $weaver = new \MarcW\Weaver\Weaver(); $body = 'foobar, (*2)
barfoo, (*3)
'; $fragments = ['<img src="/foobar.png" />']; $result = $weaver->weave($body, $fragments); // $results contains:foobar, (*4)
<img src="/foobar.png" />barfoo, (*5)
It's also possible to implicity tells the library where to weaves the HTML pieces., (*6)
<?php $weaver = new \MarcW\Weaver\Weaver(); $body = 'foobar, (*7)
barfoo, (*8)
__WEAVE__'; $fragments = ['<img src="/foobar.png" />']; $result = $weaver->weave($body, $fragments); // $results contains:foobar, (*9)
barfoo, (*10)
<img src="/foobar.png" />
See LICENSE file in this repository, (*11)
A small library that weaves HTML together
MIT