public function stream_close() { if ($this->upload !== null) { $this->upload->complete(); $this->upload = null; } if ($this->download !== null) { $this->download = null; } }