netzmacht / php-dom-manipulator
This package is abandoned and no longer maintained.
No replacement package was suggested.
This library is an html dom document manipulator.
1.0.2
2015-08-24 12:22 UTC
Requires
- php: >=5.3.2
Requires (Dev)
- bossa/phpspec2-expect: ~1.0
- henrikbjorn/phpspec-code-coverage: ~0.2
- masterminds/html5: ~2.0
- netzmacht/contao-build-tools: ~1.1
- netzmacht/contao-build-tools: ~1.1
- phpspec/phpspec: ~2.1
- phpspec/phpspec: ~2.1
Suggests
- masterminds/html5: HTML 5 parser and serializer. Required if Html5Converter is used.
This package is auto-updated.
Last update: 2020-04-06 10:40:57 UTC
README
This library provides a rule based dom document manipulator.
Install
This library can be installed using composer
$ php composer.phar require netzmacht/php-dom-manipulator:~1.0
$ php composer.phar update
Usage
<?php $converter = new Netzmacht\DomManipulator\Converter\DomDocumentConverter(); $manipulator = new Netzmacht\DomManipulator\DomManipulator($converter); $query = new Netzmacht\DomManipulator\Query\XPathQuery('xpath query'); $rule = new Netzmacht\DomManipulator\Rule\AttributeRule($query, 'class'); $result = $manipulator ->addRule($rule) ->loadHtml('<html> </html>') ->manipulate();
Credits
This library initially was extracted from the toflar/contao-css-class-replacer which is maintained by Yanick Witschi alias @Toflar.