public function setData($data) { $handle = tmpfile(); fwrite($handle, $data); $this->setStream($handle); return $this; }