コード例 #1
0
ファイル: DaoResultIterator.php プロジェクト: enyo/rincewind
 /**
  * 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;
 }