original_string: public function getCurrentIndex($idfield = 'id')
      {
          // TODO: think more to optimize this method
          if (is_array($this->data)) {
              return array_search(current($this->data), $this->data);
          }
  
          // else it is dsql dataset...
          return $this->current_row[$idfield];
      }
code: public function getCurrentIndex($idfield = 'id')
      {
          // TODO: think more to optimize this method
          if (is_array($this->data)) {
              return array_search(current($this->data), $this->data);
          }
  
          // else it is dsql dataset...
          return $this->current_row[$idfield];
      }
code_tokens: public function getCurrentIndex ( $ idfield = 'id' ) { // TODO: think more to optimize this method if ( is_array ( $ this -> data ) ) { return array_search ( current ( $ this -> data ) , $ this -> data ) ; } // else it is dsql dataset... return $ this -> current_row [ $ idfield ] ; }
docstring: Returns ID of record.
  
  @param string $idfield ID field name
  
  @return mixed
docstring_tokens: Returns ID of record .