function children($idx = -1) { if ($idx === -1) { return $this->children; } if (isset($this->children[$idx])) { return $this->children[$idx]; } return null; }
/** * @param \simple_html_dom_node $node */ private function emptyNodeContent(\simple_html_dom_node $node) { $node->innertext = ''; foreach ($node->children() as $child) { $this->emptyNodeContent($child); } }