You are here

function simple_html_dom::clear in simplehtmldom API 6

Same name and namespace in other branches
  1. 5.2 simplehtmldom/simple_html_dom.php \simple_html_dom::clear()
  2. 7 simplehtmldom/simple_html_dom.php \simple_html_dom::clear()
2 calls to simple_html_dom::clear()
simple_html_dom::prepare in simplehtmldom/simple_html_dom.php
simple_html_dom::__destruct in simplehtmldom/simple_html_dom.php

File

simplehtmldom/simple_html_dom.php, line 581

Class

simple_html_dom

Code

function clear() {
  foreach ($this->nodes as $n) {
    $n
      ->clear();
    $n = null;
  }
  if (isset($this->parent)) {
    $this->parent
      ->clear();
    unset($this->parent);
  }
  if (isset($this->root)) {
    $this->root
      ->clear();
    unset($this->root);
  }
  unset($this->doc);
  unset($this->noise);
}