diff options
-rw-r--r-- | CREDITS | 1 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | example.php | 6 |
3 files changed, 6 insertions, 2 deletions
@@ -8,3 +8,4 @@ Rune Christensen [MrElectronic] <[email protected]> (contributor) Mišo Belica [miso-belica] <[email protected]> (contributor) Asmir Mustafic [goetas] <[email protected]> (contributor) KITAITI Makoto [KitaitiMakoto] <[email protected]> (contributor) +Jacob Floyd [cognifloyd] <[email protected]> (contributor) @@ -43,6 +43,7 @@ Here is how you use the high-level `HTML5` library API: <?php // Assuming you installed from Composer: require "vendor/autoload.php"; +use Masterminds/HTML5; // An example HTML document: diff --git a/example.php b/example.php index ed0d86e..1f5b523 100644 --- a/example.php +++ b/example.php @@ -1,6 +1,7 @@ <?php require "vendor/autoload.php"; +use Masterminds/HTML5; $html = <<< 'HERE' @@ -24,8 +25,9 @@ $html = <<< 'HERE' </body></html> HERE; -$dom = \HTML5Helper::loadHTML($html); +$html5 = new HTML5(); +$dom = $html5->loadHTML($html); print "Converting to HTML 5\n"; -\HTML5Helper::save($dom, fopen("php://stdin", 'w')); +$html5->save($dom, fopen("php://stdin", 'w')); |