public function write($string) { if ($this->tell() < 0) { throw new RuntimeException('Invalid pointer position'); } return $this->decoratedStream->write($string); }