stamina / phpquery-tools
phpQuery tools for extracting links and sanitizing HTML documents using phpQuery
dev-master
2013-01-30 10:29 UTC
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2026-02-28 20:19:01 UTC
README
Is a small set of helper tools to manipulate HTML documents.
It is using phpQuery library, which in turn is a PHP port of jQuery.
Currently there are two of them:
- LinksExtractor - for extracting links
- Sanitizer - for sanitizing/linting HTML
Usage
Check the tool's docs for general info, and the source code annotations for the API.
Installing
The best way is to use composer. Add the stamina/phpquery-tools package to your composer.json:
You will also need a phpQuery library. You can use mine, but it's not hosted on packagist:
{
"require": {
"stamina/phpquery": "1.*",
"stamina/phpquery-tools": "1.*"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/panrafal/phpquery.git"
}
]
}
Testing
phpunit --bootstrap Tests/bootstrap.php Tests