Lines Matching defs:pos
393 * If the $pos parameter is negative the start buffer position will be the $pos'th position from
396 * If the $pos parameter is negative and the absolute value is bigger then the totalLength of
397 * the file $pos will set to zero.
399 * @param int|null $pos Start position of the new buffer
402 public function reset($pos = 0, $length = 200)
404 if ($pos === null) {
405 $pos = $this->position + $this->offset;
406 } elseif ($pos < 0) {
407 $pos = \max(0, $this->getTotalLength() + $pos);
410 \fseek($this->stream, $pos);
412 $this->position = $pos;
430 * @param int $pos
434 public function ensure($pos, $length)
436 if ($pos >= $this->position
437 && $pos < ($this->position + $this->bufferLength)
438 && ($this->position + $this->bufferLength) >= ($pos + $length)
440 $this->offset = $pos - $this->position;
442 $this->reset($pos, $length);