Ejemplo n.º 1
0
 /**
  * Gets a string representation of the node.
  *
  * @return string
  */
 public function __toString()
 {
     $ret = "";
     foreach ($this->elements as $element) {
         $ret = Text::concat("\n", $ret, Dom::dom2str($element));
     }
     return $ret;
 }
Ejemplo n.º 2
0
 /**
  * Gets the string representation of a node.
  *
  * @param DOMNode $node DOMNode object
  *
  * @return string
  */
 public function dom2str($node)
 {
     return Dom::dom2str($node);
 }
 /**
  * Gets inner HTML code.
  *
  * @return string
  */
 private function _getInnerHtml()
 {
     $ret = "";
     foreach ($this->elements() as $element) {
         $childNodes = $element->childNodes;
         $str = "";
         foreach ($childNodes as $node) {
             $str .= Dom::dom2str($node);
         }
         $ret = Text::concat("\n", $ret, $str);
     }
     return $ret;
 }