private function getInputStream() { if (null === $this->inputStream) { $this->inputStream = fopen('php://memory', 'r+', false); } return $this->inputStream; }