Giter Club home page Giter Club logo

simplehtmldombundle's Introduction

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.

Build Status

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.

simplehtmldombundle's People

Contributors

erivello avatar nio avatar juliensantos87 avatar

Stargazers

Marcel Gläser avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.