2017 © Pedro Peláez
 

library pquery

A jQuery like html dom parser written in php.

image

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

The README.md

pQuery

Build Status Coverage Latest Stable Version, (*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)

  1. Require the pQuery library into your project using composer.
  2. Parse a snippet of html using pQuery::parseStr() or pQuery::parseFile() to return a document object model (DOM).
  3. Run jQuery like functions on the DOM.

Example

The following example parses an html string and does some manipulation on it., (*4)

$html = '

Hello
Cruel
World
'; $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.

The Versions

23/03 2016

dev-master

9999999-dev

A jQuery like html dom parser written in php.

  Sources   Download

LGPL-2.1

The Requires

  • php >=5.3.0

 

The Development Requires

by Todd Burry

php dom ganon

14/01 2016

v1.1.1

1.1.1.0

A jQuery like html dom parser written in php.

  Sources   Download

LGPL-2.1

The Requires

  • php >=5.3.0

 

The Development Requires

by Todd Burry

php dom ganon

16/07 2014

v1.1.0

1.1.0.0

A jQuery like html dom parser written in php.

  Sources   Download

LGPL-2.1

The Requires

  • php >=5.3.0

 

The Development Requires

by Todd Burry

php dom ganon

08/01 2014

v1.0.1

1.0.1.0

A jQuery like html dom parser written in php.

  Sources   Download

LGPL-2.1

The Requires

  • php >=5.3.0

 

The Development Requires

by Todd Burry

php dom ganon

07/01 2014

v1.0.0

1.0.0.0

A jQuery like html dom parser written in php.

  Sources   Download

LGPL-2.1

The Requires

  • php >=5.3.0

 

The Development Requires

by Todd Burry

php dom ganon

07/01 2014

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