original_string: protected function _normalizeAssociations($associations)
      {
          $result = [];
          foreach ((array)$associations as $table => $options) {
              $pointer =& $result;
  
              if (is_int($table)) {
                  $table = $options;
                  $options = [];
              }
  
              if (!strpos($table, '.')) {
                  $result[$table] = $options;
                  continue;
              }
  
              $path = explode('.', $table);
              $table = array_pop($path);
              $first = array_shift($path);
              $pointer += [$first => []];
              $pointer =& $pointer[$first];
              $pointer += ['associated' => []];
  
              foreach ($path as $t) {
                  $pointer += ['associated' => []];
                  $pointer['associated'] += [$t => []];
                  $pointer['associated'][$t] += ['associated' => []];
                  $pointer =& $pointer['associated'][$t];
              }
  
              $pointer['associated'] += [$table => []];
              $pointer['associated'][$table] = $options + $pointer['associated'][$table];
          }
  
          return isset($result['associated']) ? $result['associated'] : $result;
      }
code: protected function _normalizeAssociations($associations)
      {
          $result = [];
          foreach ((array)$associations as $table => $options) {
              $pointer =& $result;
  
              if (is_int($table)) {
                  $table = $options;
                  $options = [];
              }
  
              if (!strpos($table, '.')) {
                  $result[$table] = $options;
                  continue;
              }
  
              $path = explode('.', $table);
              $table = array_pop($path);
              $first = array_shift($path);
              $pointer += [$first => []];
              $pointer =& $pointer[$first];
              $pointer += ['associated' => []];
  
              foreach ($path as $t) {
                  $pointer += ['associated' => []];
                  $pointer['associated'] += [$t => []];
                  $pointer['associated'][$t] += ['associated' => []];
                  $pointer =& $pointer['associated'][$t];
              }
  
              $pointer['associated'] += [$table => []];
              $pointer['associated'][$table] = $options + $pointer['associated'][$table];
          }
  
          return isset($result['associated']) ? $result['associated'] : $result;
      }
code_tokens: protected function _normalizeAssociations ( $ associations ) { $ result = [ ] ; foreach ( ( array ) $ associations as $ table => $ options ) { $ pointer = & $ result ; if ( is_int ( $ table ) ) { $ table = $ options ; $ options = [ ] ; } if ( ! strpos ( $ table , '.' ) ) { $ result [ $ table ] = $ options ; continue ; } $ path = explode ( '.' , $ table ) ; $ table = array_pop ( $ path ) ; $ first = array_shift ( $ path ) ; $ pointer += [ $ first => [ ] ] ; $ pointer = & $ pointer [ $ first ] ; $ pointer += [ 'associated' => [ ] ] ; foreach ( $ path as $ t ) { $ pointer += [ 'associated' => [ ] ] ; $ pointer [ 'associated' ] += [ $ t => [ ] ] ; $ pointer [ 'associated' ] [ $ t ] += [ 'associated' => [ ] ] ; $ pointer = & $ pointer [ 'associated' ] [ $ t ] ; } $ pointer [ 'associated' ] += [ $ table => [ ] ] ; $ pointer [ 'associated' ] [ $ table ] = $ options + $ pointer [ 'associated' ] [ $ table ] ; } return isset ( $ result [ 'associated' ] ) ? $ result [ 'associated' ] : $ result ; }
docstring: Returns an array out of the original passed associations list where dot notation
  is transformed into nested arrays so that they can be parsed by other routines
  
  @param array $associations The array of included associations.
  @return array An array having dot notation transformed into nested arrays
docstring_tokens: Returns an array out of the original passed associations list where dot notation is transformed into nested arrays so that they can be parsed by other routines