class Html

Html processing static class Mostly just helpers

Methods

static array
extractText(string $str)

Extract paragraph nodes from HTML block. Each graf will be returned as a node in an array, sans HTML.

static array
extractHtmlGrafs(string $str, array $ignoreEmptyNodes = [])

Extract direct decedent paragraph nodes from HTML block. Each graf will be returned as a node in an array, with html,

Details

at line 18
static array extractText(string $str)

Extract paragraph nodes from HTML block. Each graf will be returned as a node in an array, sans HTML.

Parameters

string $str HTML string

Return Value

array of text

at line 45
static array extractHtmlGrafs(string $str, array $ignoreEmptyNodes = [])

Extract direct decedent paragraph nodes from HTML block. Each graf will be returned as a node in an array, with html,

Parameters

string $str HTML string
array $ignoreEmptyNodes array of tags to ignore if they are empty, none by default

Return Value

array of text