コード例 #1
0
ファイル: reader.php プロジェクト: chernogolov/blank
 protected function readSectionSize(SeekableIterator $it)
 {
     $it->seek($this->start_line);
     if (!$it->valid()) {
         throw new phpMorphy_Mrd_Exception("Can`t read section size, iterator not valid");
     }
     $size = trim($it->current());
     if (!preg_match('~^[0-9]+$~', $size)) {
         throw new phpMorphy_Mrd_Exception("Invalid section size: {$size}");
     }
     return (int) $size;
 }
コード例 #2
0
 /**
  * Seeks the pointer.
  *
  * @param int $pointer
  */
 public function seek($pointer)
 {
     $this->iterator->seek($pointer);
 }