stamina / phpquery-tools
phpQuery tools for extracting links and sanitizing HTML documents using phpQuery
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/stamina/phpquery-tools
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2025-11-08 18:59:45 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