Пример #1
0
 public function rewind()
 {
     $this->iterator = new \ArrayIterator();
     if (is_null($this->offset)) {
         if ($this->direction == KeyReader::DIRECTION_BACKWARD) {
             $this->setOffset($this->index->getFile()->getFileSize() - 1);
         } else {
             $this->setOffset(0);
         }
     }
 }
Пример #2
0
 /**
  * Returns the length of one read operation 
  * 
  * @return int
  */
 public function getReadLength()
 {
     return $this->index->getFile()->getBlockSize() * $this->readBlockCount;
 }