2017 © Pedro Peláez
 

library php-query

jQuery / javascript api for html document manipulation in php

image

jclyons52/php-query

jQuery / javascript api for html document manipulation in php

  • Monday, October 24, 2016
  • by jclyons52
  • Repository
  • 2 Watchers
  • 1 Stars
  • 398 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 2 % Grown

The README.md

PHPQuery

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

Nobody really wants to do imperative dom manipulation on the back end, but sometimes you have to. Given that you've probably done a lot of dom manipulation in javascript, maybe it would be nice to use the same api on the back end. Use cases for this project include: - DOM Crawlers - Integration testing - Link previews, (*2)

Install

Via Composer, (*3)

``` bash composer require jclyons52/php-query, (*4)


## Usage ``` php $html =
First Div
Second Div
Third Div
'; $dom = new Jclyons52\PHPQuery\Document($html); $elements = $dom->querySelector('.col-sm-3'); $element->attr('styles', 'display: block;'); echo $element->attr('styles'); // 'display: block' echo $element->text(); // 'First Div' echo $element->hasClass('col-sm-3); // true $element->css(); // ["color" => "blue", "display" => "none"]; $div3 = $dom->querySelectorAll('.col-sm-3')[2]; $div3->data(); // ["last-value" => 43, "hidden" => true, "options" => '{"name":"John"}'] echo $element->toString(); // '
First Div
'

Change log

Please see CHANGELOG for more information what has changed recently., (*5)

Testing

bash $ composer test, (*6)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*7)

Security

If you discover any security related issues, please email jclyons52@gmail.com instead of using the issue tracker., (*8)

Credits

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

24/10 2016

dev-master

9999999-dev https://github.com/Jclyons52/PHPQuery

jQuery / javascript api for html document manipulation in php

  Sources   Download

MIT

The Requires

 

The Development Requires

phpquery jclyons52

24/10 2016

1.3.2

1.3.2.0 https://github.com/Jclyons52/PHPQuery

jQuery / javascript api for html document manipulation in php

  Sources   Download

MIT

The Requires

 

The Development Requires

phpquery jclyons52

22/10 2016

1.3.1

1.3.1.0 https://github.com/Jclyons52/PHPQuery

jQuery / javascript api for html document manipulation in php

  Sources   Download

MIT

The Requires

 

The Development Requires

phpquery jclyons52

05/07 2016

1.3.0

1.3.0.0 https://github.com/Jclyons52/PHPQuery

jQuery / javascript api for html document manipulation in php

  Sources   Download

MIT

The Requires

 

The Development Requires

phpquery jclyons52

26/04 2016

1.2.0

1.2.0.0 https://github.com/Jclyons52/PHPQuery

jQuery / javascript api for html document manipulation in php

  Sources   Download

MIT

The Requires

 

The Development Requires

phpquery jclyons52

20/04 2016

v1.1.0

1.1.0.0 https://github.com/Jclyons52/PHPQuery

jQuery / javascript api for html document manipulation in php

  Sources   Download

MIT

The Requires

 

The Development Requires

phpquery jclyons52

12/04 2016

v1.0.0

1.0.0.0 https://github.com/Jclyons52/PHPQuery

jQuery / javascript api for html document manipulation in php

  Sources   Download

MIT

The Requires

 

The Development Requires

phpquery jclyons52

12/04 2016

v1.0.0-alpha

1.0.0.0-alpha https://github.com/Jclyons52/PHPQuery

jQuery / javascript api for html document manipulation in php

  Sources   Download

MIT

The Requires

 

The Development Requires

phpquery jclyons52