diff options
Diffstat (limited to 'php/src/Google/Protobuf/Internal/CodedInputStream.php')
-rw-r--r-- | php/src/Google/Protobuf/Internal/CodedInputStream.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/php/src/Google/Protobuf/Internal/CodedInputStream.php b/php/src/Google/Protobuf/Internal/CodedInputStream.php index 6131d5d1..b612da5b 100644 --- a/php/src/Google/Protobuf/Internal/CodedInputStream.php +++ b/php/src/Google/Protobuf/Internal/CodedInputStream.php @@ -78,13 +78,18 @@ class CodedInputStream return $this->buffer_end - $this->current; } - private function current() + public function current() { return $this->total_bytes_read - ($this->buffer_end - $this->current + $this->buffer_size_after_limit); } + public function substr($start, $end) + { + return substr($this->buffer, $start, $end - $start); + } + private function recomputeBufferLimits() { $this->buffer_end += $this->buffer_size_after_limit; |