2017 © Pedro Peláez
 

library html

Library to abstract html manipulation

image

innmind/html

Library to abstract html manipulation

  • Monday, February 12, 2018
  • by Baptouuuu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 407 Installations
  • HTML
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 10 % Grown

The README.md

HTML

Build Status codecov Type Coverage, (*1)

This library is an extension of innmind/xml to support working properly with html as a node tree., (*2)

Important: you must use vimeo/psalm to make sure you use this library correctly., (*3)

Installation

composer require innmind/html

Usage

use Innmind\Html\Reader\Reader;
use Innmind\Xml\Node;
use Innmind\Filesystem\File\Content;
use Innmind\Immutable\Maybe;

$read = Reader::default();

$html = $read(
    Content::ofString(\file_get_contents('https://github.com/')),
); // Maybe<Node>

Extract some elements of the tree

This library provides some visitors to extract elements out of the dom tree, the example below show you how to extract all the h1 elements of a tree:, (*4)

use Innmind\Html\Visitor\Elements;

$h1s = Elements::of('h1')($html);

Here $h1s is a set of Element which are all h1 elements., (*5)

Here's the full list of visitors you have access to:, (*6)

The Versions

12/02 2018

dev-master

9999999-dev http://github.com/Innmind/Html

Library to abstract html manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

html

12/02 2018

3.1.0

3.1.0.0 http://github.com/Innmind/Html

Library to abstract html manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

html

12/02 2018

dev-develop

dev-develop http://github.com/Innmind/Html

Library to abstract html manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

html

19/09 2017

3.0.0

3.0.0.0 http://github.com/Innmind/Html

Library to abstract html manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

html

12/02 2017

2.0.0

2.0.0.0 http://github.com/Innmind/Html

Library to abstract html manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

html

05/11 2016

1.1.0

1.1.0.0 http://github.com/Innmind/Html

Library to abstract html manipulation

  Sources   Download

MIT

The Requires

 

html

30/10 2016

1.0.0

1.0.0.0 http://github.com/Innmind/Html

Library to abstract html manipulation

  Sources   Download

MIT

The Requires

 

html