protected function childrenByInstance($class_name) {
    $matches = [];
    $child = $this->head;
    while ($child) {
      if ($child instanceof $class_name) {
        $matches[] = $child;
      }
      $child = $child->next;
    }
    return $matches;
  }
protected function childrenByInstance($class_name) {
    $matches = [];
    $child = $this->head;
    while ($child) {
      if ($child instanceof $class_name) {
        $matches[] = $child;
      }
      $child = $child->next;
    }
    return $matches;
  }
protected function childrenByInstance ( $ class_name ) { $ matches = [ ] ; $ child = $ this -> head ; while ( $ child ) { if ( $ child instanceof $ class_name ) { $ matches [ ] = $ child ; } $ child = $ child -> next ; } return $ matches ; }
Get children that are instance of class.
@param string $class_name
@return Node[]
Get children that are instance of class .