original_string: public function offsetGet($index)
      {
          if (is_string($index) && isset($this->_keysMap[$index])) {
              $index = $this->_keysMap[$index];
          }
  
          return parent::offsetGet($index);
      }
code: public function offsetGet($index)
      {
          if (is_string($index) && isset($this->_keysMap[$index])) {
              $index = $this->_keysMap[$index];
          }
  
          return parent::offsetGet($index);
      }
code_tokens: public function offsetGet ( $ index ) { if ( is_string ( $ index ) && isset ( $ this -> _keysMap [ $ index ] ) ) { $ index = $ this -> _keysMap [ $ index ] ; } return parent :: offsetGet ( $ index ) ; }
docstring: Allows access fields by numeric index or by machine-name.
  
  ### Example:
  
  ```php
  $fields => [
  [0] => [
  [name] => user-age,
  [label] => User Age,
  [value] => 22,
  [extra] => null,
  [metadata] => [ ... ]
  ],
  [1] => [
  [name] => user-phone,
  [label] => User Phone,
  [value] => null,
  [extra] => null,
  [metadata] => [ ... ]
  ]
  ];
  
  $collection = new FieldCollection($fields);
  if ($collection[1] === $collection['user-phone']) {
  echo "SUCCESS";
  }
  
  // outputs: SUCCESS
  ```
  
  @param int|string $index Numeric index or machine-name
  @return mixed \Field\Model\Entity\Field on success or NULL on failure
docstring_tokens: Allows access fields by numeric index or by machine - name .