library pquery
A jQuery like html dom parser written in php.
tburry/pquery
A jQuery like html dom parser written in php.
- Wednesday, March 23, 2016
- by tburry
- Repository
- 4 Watchers
- 104 Stars
- 62,570 Installations
- PHP
- 5 Dependents
- 0 Suggesters
- 17 Forks
- 8 Open issues
- 6 Versions
- 15 % Grown
pQuery
, (*1)
pQuery is a jQuery like html dom parser written in php. It is a fork of the ganon dom parser., (*2)
Basic usage
To get started using pQuery do the following., (*3)
- Require the pQuery library into your project using composer.
- Parse a snippet of html using
pQuery::parseStr()
or pQuery::parseFile()
to return a document object model (DOM).
- Run jQuery like functions on the DOM.
Example
The following example parses an html string and does some manipulation on it., (*4)
$html = '
';
$dom = pQuery::parseStr($html);
$dom->query('.inner')
->tagName('span');
$dom->query('.adj')
->html('Beautiful')
->tagName('i');
echo $dom->html();
Differences between pQuery and ganon
pQuery is a fork of the ganon php processor. Most of the functionality is identical to ganon with the following exceptions., (*5)
- pQuery is a composer package.
- pQuery renames ganon's classes and puts them into a namespace.
- pQuery is used only with objects rather than functions so that it can be autoloaded.
- pQuery Adds the
IQuery
interface and the pQuery
object that define the jQuery-like interface for querying the dom.
- pQuery implements more of jQuery's methods. See the
IQuery
interface for a list of methods.
- pQuery supports adding tags to the dom using the
<div class="something"></div>
notation rather than just div
.
dev-master
9999999-dev
A jQuery like html dom parser written in php.
Sources
Download
LGPL-2.1
The Requires
The Development Requires
by
Todd Burry
php
dom
ganon
v1.1.1
1.1.1.0
A jQuery like html dom parser written in php.
Sources
Download
LGPL-2.1
The Requires
The Development Requires
by
Todd Burry
php
dom
ganon
v1.1.0
1.1.0.0
A jQuery like html dom parser written in php.
Sources
Download
LGPL-2.1
The Requires
The Development Requires
by
Todd Burry
php
dom
ganon
v1.0.1
1.0.1.0
A jQuery like html dom parser written in php.
Sources
Download
LGPL-2.1
The Requires
The Development Requires
by
Todd Burry
php
dom
ganon
v1.0.0
1.0.0.0
A jQuery like html dom parser written in php.
Sources
Download
LGPL-2.1
The Requires
The Development Requires
by
Todd Burry
php
dom
ganon
v1.0.0-beta
1.0.0.0-beta
A jQuery like html dom parser written php.
Sources
Download
LGPL-2.1
The Development Requires
by
Todd Burry
php
dom
ganon