You are here

function simple_html_dom_node::innertext in simplehtmldom API 7

Same name and namespace in other branches
  1. 5.2 simplehtmldom/simple_html_dom.php \simple_html_dom_node::innertext()
  2. 6 simplehtmldom/simple_html_dom.php \simple_html_dom_node::innertext()
3 calls to simple_html_dom_node::innertext()
simple_html_dom_node::outertext in simplehtmldom/simple_html_dom.php
simple_html_dom_node::xmltext in simplehtmldom/simple_html_dom.php
simple_html_dom_node::__get in simplehtmldom/simple_html_dom.php

File

simplehtmldom/simple_html_dom.php, line 166

Class

simple_html_dom_node

Code

function innertext() {
  if (isset($this->_[HDOM_INFO_INNER])) {
    return $this->_[HDOM_INFO_INNER];
  }
  if (isset($this->_[HDOM_INFO_TEXT])) {
    return $this->dom
      ->restore_noise($this->_[HDOM_INFO_TEXT]);
  }
  $ret = '';
  foreach ($this->nodes as $n) {
    $ret .= $n
      ->outertext();
  }
  return $ret;
}