Method | Description | |
---|---|---|
assertValidKeys ( array $hash, array $validKeys ) : array | Validate list of keys in the associative array. | |
convertSelectToTag ( string $selector, mixed $content = TRUE ) : array | Parse a CSS selector into an associative array suitable for use with findNodes(). | |
cssSelect ( array $selector, string $content, mixed $actual, boolean $isHtml = TRUE ) : false | array | Parse an $actual document and return an array of DOMNodes matching the CSS $selector. If an error occurs, it will return FALSE. | |
findNodes ( DOMDocument $dom, array $options, boolean $isHtml = TRUE ) : array | Parse out the options from the tag using DOM object tree. | |
load ( string | DOMDocument $actual, boolean $isHtml = FALSE, string $filename = '' ) : DOMDocument | Load an $actual document into a DOMDocument. This is called from the selector assertions. | |
loadFile ( string $filename, boolean $isHtml = FALSE ) : DOMDocument | Loads an XML (or HTML) file into a DOMDocument object. | |
nodeToText ( DOMNode $node ) : string | ||
prepareString ( string $string ) : string | ||
removeCharacterDataNodes ( DOMNode $node ) | ||
xmlToVariable ( DOMElement $element ) : mixed | "Convert" a DOMElement object into a PHP variable. |
Method | Description | |
---|---|---|
convertToUtf8 ( string $string ) : string | Converts a string to UTF-8 encoding. | |
getDescendants ( DOMNode $node ) : array | Recursively get flat array of all descendants of this node. | |
getElementsByCaseInsensitiveTagName ( DOMDocument $dom, string $tag ) : DOMNodeList | Gets elements by case insensitive tagname. | |
getNodeText ( DOMNode $node ) : string | Get the text value of this node's child text node. | |
isUtf8 ( string $string ) : boolean | Checks a string for UTF-8 encoding. |
protected static convertToUtf8 ( string $string ) : string | ||
$string | string | |
return | string |
protected static getDescendants ( DOMNode $node ) : array | ||
$node | DOMNode | |
return | array |
protected static getElementsByCaseInsensitiveTagName ( DOMDocument $dom, string $tag ) : DOMNodeList | ||
$dom | DOMDocument | |
$tag | string | |
return | DOMNodeList |
protected static getNodeText ( DOMNode $node ) : string | ||
$node | DOMNode | |
return | string |
public static nodeToText ( DOMNode $node ) : string | ||
$node | DOMNode | |
return | string |
public static prepareString ( string $string ) : string | ||
$string | string | |
return | string |
public static removeCharacterDataNodes ( DOMNode $node ) | ||
$node | DOMNode |
public static xmlToVariable ( DOMElement $element ) : mixed | ||
$element | DOMElement | |
return | mixed |