You are here

function simple_html_dom_node::__get in simplehtmldom API 7

Same name and namespace in other branches
  1. 5.2 simplehtmldom/simple_html_dom.php \simple_html_dom_node::__get()
  2. 6 simplehtmldom/simple_html_dom.php \simple_html_dom_node::__get()
1 call to simple_html_dom_node::__get()
simple_html_dom_node::getAttribute in simplehtmldom/simple_html_dom.php

File

simplehtmldom/simple_html_dom.php, line 421

Class

simple_html_dom_node

Code

function __get($name) {
  if (isset($this->attr[$name])) {
    return $this->attr[$name];
  }
  switch ($name) {
    case 'outertext':
      return $this
        ->outertext();
    case 'innertext':
      return $this
        ->innertext();
    case 'plaintext':
      return $this
        ->text();
    case 'xmltext':
      return $this
        ->xmltext();
    default:
      return array_key_exists($name, $this->attr);
  }
}