martyrer/simple-html-dom-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Bundle around Simple HTML DOM library

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Maintainers

Package info

github.com/Martyrer/SimpleHtmlDomBundle

Type:symfony-bundle

pkg:composer/martyrer/simple-html-dom-bundle

Transparency log

Statistics

Installs: 33 620

Dependents: 0

Suggesters: 0

Stars: 1

1.2 2023-04-20 09:48 UTC

This package is not auto-updated.

Last update: 2026-08-20 09:03:50 UTC


README

This bundle provides a simple integration of the Simple HTML DOM Parser into Symfony 3.4/4.0. 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

    composer require martyrer/simple-html-dom-bundle

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.