@@ -22,14 +22,14 @@ discard block |
||
| 22 | 22 | * $xml can either be an XML string, a DOMDocument, or a DOMElement. |
| 23 | 23 | * You can also pass FALSE or NULL (or omit it) and load XML later using loadXML or loadHTML |
| 24 | 24 | * |
| 25 | - * @param mixed $auto_register_namespaces |
|
| 25 | + * @param boolean $auto_register_namespaces |
|
| 26 | 26 | * Auto-register namespaces. All namespaces in the root element will be registered for use in xpath queries. |
| 27 | 27 | * Namespaces that are not declared in the root element will not be auto-registered |
| 28 | 28 | * Defaults to TRUE (Meaning it will auto register all auxiliary namespaces but not the default namespace). |
| 29 | 29 | * Pass a prefix string to automatically register the default namespace. |
| 30 | 30 | * Pass FALSE to disable auto-namespace registeration |
| 31 | 31 | * |
| 32 | - * @param bool $error_checking |
|
| 32 | + * @param string|boolean $error_checking |
|
| 33 | 33 | * Can be 'strict', 'warning', or 'none. Defaults to 'strict'. |
| 34 | 34 | * 'none' supresses all errors |
| 35 | 35 | * 'warning' is the default behavior in DOMDocument |
@@ -472,10 +472,10 @@ discard block |
||
| 472 | 472 | /** |
| 473 | 473 | * Given a pair of nodes, replace the first with the second |
| 474 | 474 | * |
| 475 | - * @param mixed $node |
|
| 475 | + * @param \DOMElement $node |
|
| 476 | 476 | * Node to be replaced. Can either be an xpath string or a DOMDocument (or even a DOMNode). |
| 477 | 477 | * |
| 478 | - * @param mixed $replace |
|
| 478 | + * @param \DOMElement $replace |
|
| 479 | 479 | * Replace $node with $replace. Replace can be an XML string, or a DOMNode |
| 480 | 480 | * |
| 481 | 481 | * @return mixed |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | * $context can either be an xpath string, or a DOMElement. Ommiting it |
| 536 | 536 | * results in transforming the entire document |
| 537 | 537 | * |
| 538 | - * @return a new DOMDoc |
|
| 538 | + * @return DOMDoc new DOMDoc |
|
| 539 | 539 | */ |
| 540 | 540 | public function tranform($xsl, $context = NULL) { |
| 541 | 541 | if (!$context) { |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | * it will transform all elements with xlink:type = simple into a <a href> element. |
| 618 | 618 | * Alternatively you may specify your own xpath for selecting which elements get transformed |
| 619 | 619 | * into <a href> tags. |
| 620 | - * @return HTML string |
|
| 620 | + * @return string string |
|
| 621 | 621 | */ |
| 622 | 622 | public function asHTML($context = NULL, $options = array()) { |
| 623 | 623 | $xslSimple = ' |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | * $context can either be an xpath string, or a DOMElement. Ommiting it |
| 700 | 700 | * results in outputting the entire document |
| 701 | 701 | * |
| 702 | - * @return XML string |
|
| 702 | + * @return string string |
|
| 703 | 703 | */ |
| 704 | 704 | public function out($context = NULL) { |
| 705 | 705 | $this->createContext($context, 'xpath'); |
@@ -747,6 +747,9 @@ discard block |
||
| 747 | 747 | ); |
| 748 | 748 | } |
| 749 | 749 | |
| 750 | + /** |
|
| 751 | + * @param string|boolean $error_checking |
|
| 752 | + */ |
|
| 750 | 753 | public function setErrorChecking($error_checking) { |
| 751 | 754 | // Check up error-checking |
| 752 | 755 | if ($error_checking == FALSE) { |
@@ -776,6 +779,10 @@ discard block |
||
| 776 | 779 | return boolval($success); |
| 777 | 780 | } |
| 778 | 781 | |
| 782 | + /** |
|
| 783 | + * @param string $source |
|
| 784 | + * @param integer $options |
|
| 785 | + */ |
|
| 779 | 786 | public function loadXML($source, $options = NULL) { |
| 780 | 787 | $success = parent::loadXML($source, $options); |
| 781 | 788 | $this->AutoRegisterNamespace(TRUE); |