Documentation

Misc
in package

Table of Contents

Methods

extractHydra()  : object|null
Get `__UNIVERSAL_DATA_FOR_REHYDRATION__` from `DOMDocument` or string if `$dom` is null
getDoc()  : DomDocument|null
Builds `DomDocument` from php-xml from a string
__extractByTagName()  : object|null
Get JSON data from tag inside document

Methods

extractHydra()

Get `__UNIVERSAL_DATA_FOR_REHYDRATION__` from `DOMDocument` or string if `$dom` is null

public static extractHydra(string $body[, DOMDocument|null $dom = null ]) : object|null
Parameters
$body : string

HTML body as a string

$dom : DOMDocument|null = null
Return values
object|null

getDoc()

Builds `DomDocument` from php-xml from a string

public static getDoc(string $body) : DomDocument|null
Parameters
$body : string

HTML body as a string

Return values
DomDocument|null

Document if successful, null if string is empty

__extractByTagName()

Get JSON data from tag inside document

private static __extractByTagName(string $tagName, string $body[, DOMDocument|null $dom = null ]) : object|null
Parameters
$tagName : string

HTML element id

$body : string

HTML body as a string

$dom : DOMDocument|null = null

HTML body as DOMDocument

Return values
object|null

Object with JSON data if successful, null if not


        
On this page

Search results