芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/lot.mgaplay.com.br/vendor/mongodb/mongodb/src/Model/BSONIterator.php
buffer = $data; $this->bufferLength = strlen($data); $this->options = $options; } /** * @see http://php.net/iterator.current * @return mixed */ #[ReturnTypeWillChange] public function current() { return $this->current; } /** * @see http://php.net/iterator.key * @return mixed */ #[ReturnTypeWillChange] public function key() { return $this->key; } /** * @see http://php.net/iterator.next * @return void */ #[ReturnTypeWillChange] public function next() { $this->key++; $this->current = null; $this->advance(); } /** * @see http://php.net/iterator.rewind * @return void */ #[ReturnTypeWillChange] public function rewind() { $this->key = 0; $this->position = 0; $this->current = null; $this->advance(); } /** * @see http://php.net/iterator.valid * @return boolean */ #[ReturnTypeWillChange] public function valid() { return $this->current !== null; } private function advance() { if ($this->position === $this->bufferLength) { return; } if ($this->bufferLength - $this->position < self::$bsonSize) { throw new UnexpectedValueException(sprintf('Expected at least %d bytes; %d remaining', self::$bsonSize, $this->bufferLength - $this->position)); } [, $documentLength] = unpack('V', substr($this->buffer, $this->position, self::$bsonSize)); if ($this->bufferLength - $this->position < $documentLength) { throw new UnexpectedValueException(sprintf('Expected %d bytes; %d remaining', $documentLength, $this->bufferLength - $this->position)); } $this->current = toPHP(substr($this->buffer, $this->position, $documentLength), $this->options['typeMap']); $this->position += $documentLength; } }