You are here

function simple_html_dom_node::__set in simplehtmldom API 7

Same name and namespace in other branches
  1. 5.2 simplehtmldom/simple_html_dom.php \simple_html_dom_node::__set()
  2. 6 simplehtmldom/simple_html_dom.php \simple_html_dom_node::__set()
2 calls to simple_html_dom_node::__set()
simple_html_dom_node::removeAttribute in simplehtmldom/simple_html_dom.php
simple_html_dom_node::setAttribute in simplehtmldom/simple_html_dom.php

File

simplehtmldom/simple_html_dom.php, line 432

Class

simple_html_dom_node

Code

function __set($name, $value) {
  switch ($name) {
    case 'outertext':
      return $this->_[HDOM_INFO_OUTER] = $value;
    case 'innertext':
      if (isset($this->_[HDOM_INFO_TEXT])) {
        return $this->_[HDOM_INFO_TEXT] = $value;
      }
      return $this->_[HDOM_INFO_INNER] = $value;
  }
  if (!isset($this->attr[$name])) {
    $this->_[HDOM_INFO_SPACE][] = array(
      ' ',
      '',
      '',
    );
    $this->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_DOUBLE;
  }
  $this->attr[$name] = $value;
}