SimpleHtmlDomBundle
This bundle provides a simple integration of the Simple HTML DOM Parser into Symfony2.
Simple HTML DOM Parser is a HTML DOM parser written in PHP5+ that let you manipulate HTML,
find tags on an HTML page with selectors just like jQuery and extract contents from HTML.
Installation
Installation is very easy, it makes use of Composer.
Add SimpleHtmlDomBundle to your composer.json
"require": {
"erivello/simple-html-dom-bundle": "dev-master"
}
Register the bundle in app/AppKernel.php
:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Erivello\SimpleHtmlDomBundle\ErivelloSimpleHtmlDomBundle(),
);
}
Usage
You can access the SimpleHtmlDomBundle by the simple_html_dom
service:
<?php
$parser = $this->container->get('simple_html_dom');
$parser->load('http://www.google.com/');
// Find all links
foreach($parser->find('a') as $element) {
echo $element->href . '<br/>';
}
License
The SimpleHtmlDomBundle is licensed under the MIT license.
Copyright (c) 2012 Edoardo Rivello
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-
update simple_html_dom library
By erivello, 7 years ago
-
Merge branch 'hotfix/1.1.1'
By erivello, 7 years ago
-
update composer dependencies
By erivello, 7 years ago
-
Merge pull request #2 from juliensantos87/master
By erivello, 7 years ago
-
accept 2.* symfony version
By juliensantos87, 7 years ago
-
Merge branch 'hotfix/01.01.01'
By erivello, 7 years ago
-
fix namespace error
By erivello, 7 years ago
-
fix typo
By erivello, 7 years ago
-
add tests folder
By erivello, 8 years ago
-
fix bundle namespace
By erivello, 8 years ago
-
add symfony dependency
By erivello, 8 years ago
-
update documentation
By erivello, 8 years ago
-
add travis integration
By erivello, 8 years ago
-
update php version
By erivello, 8 years ago
-
initial commit
By erivello, 8 years ago