Response Class

In the same way that we did with the request, let's also encapsulate the response data by creating a response class. There are 3 main pieces of data associated with a response and they are:

  • Content
  • Status (code)
  • Headers

The content will always be a string (or null) so we can send it by echoing it from a $response->send() method.

Complete and Continue  
Discussion

6 comments