data = $data; $this->pointer = 0; } // ----------------------------------------------------------------------------------------------------------------- /** * {@inheritdoc} */ public function close() {} /** * {@inheritdoc} */ public function readByte() { return $this->readBytes(1); } /** * {@inheritdoc} */ public function readBytes($bytes) { $data = substr($this->data, $this->pointer, $bytes); $this->pointer += strlen($data); return $data; } /** * {@inheritdoc} */ public function seek($position) { $this->pointer = $position; } /** * {@inheritdoc} */ public function skip($position) { $this->pointer += $position; } /** * {@inheritdoc} */ public function eof() { return strlen($this->data) >= $this->pointer; } }