PHP Class PHPHtmlParser\StaticDom

Show file Open project: paquettg/php-html-parser Class Usage Examples

Public Methods

Method Description
__callStatic ( string $method, array $arguments ) : mixed Attempts to call the given method on the most recent created dom from bellow.
load ( string $str ) Creates a new dom object and calls load() on the new object.
loadFromFile ( string $file ) Creates a new dom object and calls loadFromFile() on the new object.
loadFromUrl ( string $url, array $options = [], phphtmlparser\CurlInterface $curl = null ) Creates a new dom object and calls loadFromUrl() on the new object.
mount ( string $className = 'Dom', Dom $dom = null ) : boolean Call this to mount the static facade. The facade allows you to use this object as a $className.
unload ( ) Sets the $dom variable to null.

Method Details

__callStatic() public static method

Attempts to call the given method on the most recent created dom from bellow.
public static __callStatic ( string $method, array $arguments ) : mixed
$method string
$arguments array
return mixed

load() public static method

Creates a new dom object and calls load() on the new object.
public static load ( string $str )
$str string

loadFromFile() public static method

Creates a new dom object and calls loadFromFile() on the new object.
public static loadFromFile ( string $file )
$file string

loadFromUrl() public static method

Creates a new dom object and calls loadFromUrl() on the new object.
public static loadFromUrl ( string $url, array $options = [], phphtmlparser\CurlInterface $curl = null )
$url string
$options array
$curl phphtmlparser\CurlInterface

mount() public static method

Call this to mount the static facade. The facade allows you to use this object as a $className.
public static mount ( string $className = 'Dom', Dom $dom = null ) : boolean
$className string
$dom Dom
return boolean

unload() public static method

Sets the $dom variable to null.
public static unload ( )