original_string: protected function _parseParent($child, $data, $attributes) {
          $parent = $child->xpath("parent::*");
  
          if (is_object($parent[0]['name'])) {
              foreach ($attributes as $attribute) {
                  $name = $attribute['name'];
  
                  if (is_object($parent[0][$name])) {
                      /** @var SimpleXMLElement $element */
                      $element = $parent[0][$name];
  
                      if ($attribute['concatenate'] == true) {
                          if ($data[$name] != '') {
                              $data[$name] = $element->__toString() . $attribute['separator'] . $data[$name];
                          }
                          else {
                              $data[$name] = $element->__toString();
                          }
                      }
                      else {
                          if ($data[$name] == '') {
                              $data[$name] = $element->__toString();
                          }
                      }
                  }
              }
  
              $data = $this->_parseParent($parent[0], $data, $attributes);
          }
  
          return $data;
      }
code: protected function _parseParent($child, $data, $attributes) {
          $parent = $child->xpath("parent::*");
  
          if (is_object($parent[0]['name'])) {
              foreach ($attributes as $attribute) {
                  $name = $attribute['name'];
  
                  if (is_object($parent[0][$name])) {
                      /** @var SimpleXMLElement $element */
                      $element = $parent[0][$name];
  
                      if ($attribute['concatenate'] == true) {
                          if ($data[$name] != '') {
                              $data[$name] = $element->__toString() . $attribute['separator'] . $data[$name];
                          }
                          else {
                              $data[$name] = $element->__toString();
                          }
                      }
                      else {
                          if ($data[$name] == '') {
                              $data[$name] = $element->__toString();
                          }
                      }
                  }
              }
  
              $data = $this->_parseParent($parent[0], $data, $attributes);
          }
  
          return $data;
      }
code_tokens: protected function _parseParent ( $ child , $ data , $ attributes ) { $ parent = $ child -> xpath ( "parent::*" ) ; if ( is_object ( $ parent [ 0 ] [ 'name' ] ) ) { foreach ( $ attributes as $ attribute ) { $ name = $ attribute [ 'name' ] ; if ( is_object ( $ parent [ 0 ] [ $ name ] ) ) { /** @var SimpleXMLElement $element */ $ element = $ parent [ 0 ] [ $ name ] ; if ( $ attribute [ 'concatenate' ] == true ) { if ( $ data [ $ name ] != '' ) { $ data [ $ name ] = $ element -> __toString ( ) . $ attribute [ 'separator' ] . $ data [ $ name ] ; } else { $ data [ $ name ] = $ element -> __toString ( ) ; } } else { if ( $ data [ $ name ] == '' ) { $ data [ $ name ] = $ element -> __toString ( ) ; } } } } $ data = $ this -> _parseParent ( $ parent [ 0 ] , $ data , $ attributes ) ; } return $ data ; }
docstring: parse parent node
  @access protected
  @param $child      \SimpleXMLElement
  @param $data []
  @param $attributes array
  @return array
  @since 3.0
  @package Gcs\Framework\Core\Config
docstring_tokens: parse parent node