2017 © Pedro Peláez
 

library weaver

A small library that weaves HTML together

image

marcw/weaver

A small library that weaves HTML together

  • Monday, April 6, 2015
  • by futurecat
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Weaver

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)

The Versions

06/04 2015

dev-master

9999999-dev

A small library that weaves HTML together

  Sources   Download

MIT

The Development Requires