src/Table.php
public function getRecord($index) {
        if (!$this->isValid()) {
            throw new Exception('File is not opened', Exception::FILE_NOT_OPENED);
        }
        if (!$this->offsetExists($index)) {
            throw new Exception('Offset '.strval($index).' does not exists', Exception::INVALID_OFFSET);
        }
        if (isset($this->buffer[$index])) {
            return $this->buffer[$index];
        }
        $this->buffer = $this->getFormat()->getRecords($index, $this->getBufferSize());
        return $this->buffer[$index];
    }
public function getRecord($index) {
        if (!$this->isValid()) {
            throw new Exception('File is not opened', Exception::FILE_NOT_OPENED);
        }
        if (!$this->offsetExists($index)) {
            throw new Exception('Offset '.strval($index).' does not exists', Exception::INVALID_OFFSET);
        }
        if (isset($this->buffer[$index])) {
            return $this->buffer[$index];
        }
        $this->buffer = $this->getFormat()->getRecords($index, $this->getBufferSize());
        return $this->buffer[$index];
    }
public function getRecord ( $ index ) { if ( ! $ this -> isValid ( ) ) { throw new Exception ( 'File is not opened' , Exception :: FILE_NOT_OPENED ) ; } if ( ! $ this -> offsetExists ( $ index ) ) { throw new Exception ( 'Offset ' . strval ( $ index ) . ' does not exists' , Exception :: INVALID_OFFSET ) ; } if ( isset ( $ this -> buffer [ $ index ] ) ) { return $ this -> buffer [ $ index ] ; } $ this -> buffer = $ this -> getFormat ( ) -> getRecords ( $ index , $ this -> getBufferSize ( ) ) ; return $ this -> buffer [ $ index ] ; }
Reads record from table
@param integer $index
@return \org\majkel\dbase\Record
@throws \org\majkel\dbase\Exception
Reads record from table