CodeIgniter Forums
Output Class in CI4? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Output Class in CI4? (/showthread.php?tid=80170)



Output Class in CI4? - objecttothis - 09-23-2021

I'm converting an app from CI3x to CI4x. I see that the Input class is more or less replaced by Request, but I don't see a counterpart for Output.

For example, how would I convert this?

PHP Code:
$this->output->set_content_type(get_mime_by_extension($thumb_path));
$this->output->set_output(file_get_contents($thumb_path)); 

Nevermind. It's Response for anyone else looking for it.


RE: Output Class in CI4? - kilishan - 09-23-2021

The equivalents are basically the IncomingRequest class (for input), and the Response class (for output). When returning files, you can use the download features of the Response class