original_string: public function getConfig($name, $default = null)
      {
          /*
           * Array field name, eg: field[key][key2][key3]
           */
          $keyParts = HtmlHelper::nameToArray($name);
  
          /*
           * First part will be the field name, pop it off
           */
          $fieldName = array_shift($keyParts);
          if (!isset($this->config->{$fieldName})) {
              return $default;
          }
  
          $result = $this->config->{$fieldName};
  
          /*
           * Loop the remaining key parts and build a result
           */
          foreach ($keyParts as $key) {
              if (!array_key_exists($key, $result)) {
                  return $default;
              }
  
              $result = $result[$key];
          }
  
          return $result;
      }
code: public function getConfig($name, $default = null)
      {
          /*
           * Array field name, eg: field[key][key2][key3]
           */
          $keyParts = HtmlHelper::nameToArray($name);
  
          /*
           * First part will be the field name, pop it off
           */
          $fieldName = array_shift($keyParts);
          if (!isset($this->config->{$fieldName})) {
              return $default;
          }
  
          $result = $this->config->{$fieldName};
  
          /*
           * Loop the remaining key parts and build a result
           */
          foreach ($keyParts as $key) {
              if (!array_key_exists($key, $result)) {
                  return $default;
              }
  
              $result = $result[$key];
          }
  
          return $result;
      }
code_tokens: public function getConfig ( $ name , $ default = null ) { /*
           * Array field name, eg: field[key][key2][key3]
           */ $ keyParts = HtmlHelper :: nameToArray ( $ name ) ; /*
           * First part will be the field name, pop it off
           */ $ fieldName = array_shift ( $ keyParts ) ; if ( ! isset ( $ this -> config -> { $ fieldName } ) ) { return $ default ; } $ result = $ this -> config -> { $ fieldName } ; /*
           * Loop the remaining key parts and build a result
           */ foreach ( $ keyParts as $ key ) { if ( ! array_key_exists ( $ key , $ result ) ) { return $ default ; } $ result = $ result [ $ key ] ; } return $ result ; }
docstring: Safe accessor for configuration values.
  @param string $name Config name, supports array names like "field[key]"
  @param string $default Default value if nothing is found
  @return string
docstring_tokens: Safe accessor for configuration values .