Modular Framework  1.0
A light and thin PHP Framework
Loading...
Searching...
No Matches
ResponseEntity Class Reference

This class represents a response of a route. More...

Public Member Functions

 createResponse ()
 

Public Attributes

 $entity
 
HttpStatus $httpStatus
 
string $contentType
 

Detailed Description

This class represents a response of a route.

The ResponseEntity object returns a response from an entity corresponding to the content type. When a request is triggered and the ResponseEntity was returned it sets the http status value as the http status of the request.

Member Function Documentation

◆ createResponse()

createResponse ( )

Creates a response from the given entity. The entity is represented according to the content type.

Returns
false|string the response.
See also
ContentType

Member Data Documentation

◆ $contentType

string $contentType

◆ $entity

$entity

◆ $httpStatus

HttpStatus $httpStatus