메소드 | 설명 | |
---|---|---|
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. |
메소드 | 설명 | |
---|---|---|
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 | |
리턴 | string |
protected static getDescendants ( DOMNode $node ) : array | ||
$node | DOMNode | |
리턴 | array |
protected static getElementsByCaseInsensitiveTagName ( DOMDocument $dom, string $tag ) : DOMNodeList | ||
$dom | DOMDocument | |
$tag | string | |
리턴 | DOMNodeList |
protected static getNodeText ( DOMNode $node ) : string | ||
$node | DOMNode | |
리턴 | string |
public static prepareString ( string $string ) : string | ||
$string | string | |
리턴 | string |
public static removeCharacterDataNodes ( DOMNode $node ) | ||
$node | DOMNode |
public static xmlToVariable ( DOMElement $element ) : mixed | ||
$element | DOMElement | |
리턴 | mixed |