Ejemplo n.º 1
0
 protected function parse_hierarchy($self_close = null)
 {
     $tag_curr = strtolower($this->status['tag_name']);
     if ($self_close === null) {
         $this->status['self_close'] = $self_close = isset($this->tags_selfclose[$tag_curr]);
     }
     if (!($self_close || $this->status['closing_tag'])) {
         $tag_prev = strtolower($this->hierarchy[count($this->hierarchy) - 1]->tag);
         if (isset($this->tags_optional_close[$tag_curr], $this->tags_optional_close[$tag_curr][$tag_prev])) {
             array_pop($this->hierarchy);
         }
     }
     parent::parse_hierarchy($self_close);
 }