original_string: protected function _parseLang($src = null, $lang) {
          if ($src == null) {
              $file = APP_RESOURCE_LANG_PATH . $lang . '.xml';
              $src = 'app';
          }
          else {
              $file = SRC_PATH . $src . '/' . SRC_RESOURCE_LANG_PATH . $lang . '.xml';
          }
  
          $this->config['lang']['' . $src . '']['' . $lang . ''] = [];
  
          if (file_exists($file)) {
              if ($xml = simplexml_load_file($file)) {
                  $values = $xml->xpath('//lang');
  
                  /** @var SimpleXMLElement[] $value */
                  foreach ($values as $value) {
                      $data = null;
  
                      foreach ($this->_langAttribute as $attribute) {
                          $attributeType = $attribute['name'];
  
                          if (is_object($value[$attributeType])) {
                              $data[$attributeType] = $value[$attributeType]->__toString();
                          }
                          else {
                              $data[$attributeType] = '';
                          }
  
                          /** @var SimpleXMLElement $value */
                          $data['content'] = $value->__toString();
                      }
  
                      $data = $this->_parseParent($value, $data, $this->_langAttribute);
  
                      $this->config['lang']['' . $src . '']['' . $lang . '']['' . $data['name'] . ''] = $data;
                      $this->config['lang']['' . $src . '']['' . $lang . '']['' . $data['name'] . ''] = $this->config['lang']['' . $src . '']['' . $lang . '']['' . $data['name'] . '']['content'];
                  }
              }
              else {
                  throw new MissingConfigException('can\'t read file "' . $file . '"');
              }
          }
          else {
              throw new MissingConfigException('can\'t open file "' . $file . '"');
          }
      }
code: protected function _parseLang($src = null, $lang) {
          if ($src == null) {
              $file = APP_RESOURCE_LANG_PATH . $lang . '.xml';
              $src = 'app';
          }
          else {
              $file = SRC_PATH . $src . '/' . SRC_RESOURCE_LANG_PATH . $lang . '.xml';
          }
  
          $this->config['lang']['' . $src . '']['' . $lang . ''] = [];
  
          if (file_exists($file)) {
              if ($xml = simplexml_load_file($file)) {
                  $values = $xml->xpath('//lang');
  
                  /** @var SimpleXMLElement[] $value */
                  foreach ($values as $value) {
                      $data = null;
  
                      foreach ($this->_langAttribute as $attribute) {
                          $attributeType = $attribute['name'];
  
                          if (is_object($value[$attributeType])) {
                              $data[$attributeType] = $value[$attributeType]->__toString();
                          }
                          else {
                              $data[$attributeType] = '';
                          }
  
                          /** @var SimpleXMLElement $value */
                          $data['content'] = $value->__toString();
                      }
  
                      $data = $this->_parseParent($value, $data, $this->_langAttribute);
  
                      $this->config['lang']['' . $src . '']['' . $lang . '']['' . $data['name'] . ''] = $data;
                      $this->config['lang']['' . $src . '']['' . $lang . '']['' . $data['name'] . ''] = $this->config['lang']['' . $src . '']['' . $lang . '']['' . $data['name'] . '']['content'];
                  }
              }
              else {
                  throw new MissingConfigException('can\'t read file "' . $file . '"');
              }
          }
          else {
              throw new MissingConfigException('can\'t open file "' . $file . '"');
          }
      }
code_tokens: protected function _parseLang ( $ src = null , $ lang ) { if ( $ src == null ) { $ file = APP_RESOURCE_LANG_PATH . $ lang . '.xml' ; $ src = 'app' ; } else { $ file = SRC_PATH . $ src . '/' . SRC_RESOURCE_LANG_PATH . $ lang . '.xml' ; } $ this -> config [ 'lang' ] [ '' . $ src . '' ] [ '' . $ lang . '' ] = [ ] ; if ( file_exists ( $ file ) ) { if ( $ xml = simplexml_load_file ( $ file ) ) { $ values = $ xml -> xpath ( '//lang' ) ; /** @var SimpleXMLElement[] $value */ foreach ( $ values as $ value ) { $ data = null ; foreach ( $ this -> _langAttribute as $ attribute ) { $ attributeType = $ attribute [ 'name' ] ; if ( is_object ( $ value [ $ attributeType ] ) ) { $ data [ $ attributeType ] = $ value [ $ attributeType ] -> __toString ( ) ; } else { $ data [ $ attributeType ] = '' ; } /** @var SimpleXMLElement $value */ $ data [ 'content' ] = $ value -> __toString ( ) ; } $ data = $ this -> _parseParent ( $ value , $ data , $ this -> _langAttribute ) ; $ this -> config [ 'lang' ] [ '' . $ src . '' ] [ '' . $ lang . '' ] [ '' . $ data [ 'name' ] . '' ] = $ data ; $ this -> config [ 'lang' ] [ '' . $ src . '' ] [ '' . $ lang . '' ] [ '' . $ data [ 'name' ] . '' ] = $ this -> config [ 'lang' ] [ '' . $ src . '' ] [ '' . $ lang . '' ] [ '' . $ data [ 'name' ] . '' ] [ 'content' ] ; } } else { throw new MissingConfigException ( 'can\'t read file "' . $ file . '"' ) ; } } else { throw new MissingConfigException ( 'can\'t open file "' . $ file . '"' ) ; } }
docstring: parse lang files and put data in an array
  @access protected
  @param $src  string
  @param $lang string
  @return void
  @since 3.0
  @throws \Gcs\Framework\Core\Exception\MissingConfigException if lang config file doesn't exist
  @package Gcs\Framework\Core\Config
docstring_tokens: parse lang files and put data in an array