Esempio n. 1
0
 /**
  * Return the current Record.
  * If getAsArray() has been called, returns an array instead of the Record.
  *
  * @return Record|array
  */
 public function current()
 {
     if (!$this->valid()) {
         return null;
     }
     $record = null;
     if ($this->userRequestCache) {
         $record = $this->getCachedRecord();
     }
     if (!$record) {
         $record = $this->cacheAndReturnRecord($this->dao->getRecordFromData($this->getCurrentData()));
     }
     return $this->returnRecordsAsArray ? $record->getArray() : $record;
 }