Interface IResponse
Responsibility - completing all information for response - headers (cookies) and content.
- HTTP response wrapper carrying response headers and response body.
- PHP setcookie
function wrapper to complete default values such domain or http only etc.
- Sending response at application terminate process by \MvcCore\IResponse::Send();
.
- Completing MvcCore performance header at response end.
- MvcCore\IResponse implements MvcCore\Response\IConstants
Direct known implementers
MvcCore\Response
public static
|
#
CreateInstance( integer|null $code = NULL, array $headers = [], string $body = '' )
No singleton, get every time new instance of configured HTTP response
class in |
public
string
|
#
GetHttpVersion( )
Get response protocol HTTP version by |
public
|
|
public
|
|
public
integer
|
|
public
|
#
SetHeaders( array $headers = [], boolean $cleanAllPrevious,… )
Set multiple HTTP response headers as |
public
|
#
SetHeader( string $name, string $value )
Set HTTP response header.
There is automatically set response encoding from value for
|
public
string|null
|
|
public
boolean
|
|
public
|
#
SetEncoding( string $encoding = 'utf-8' )
Set HTTP response content encoding.
Example: |
public
string|null
|
#
GetEncoding( )
Get HTTP response content encoding.
Example: |
public
|
|
public
|
|
public
|
|
public
string|null
&
|
|
public
|
#
UpdateHeaders( )
Consolidate all headers from PHP response
by calling |
public
boolean
|
|
public
boolean
|
#
IsHtmlOutput( )
Returns if response has any |
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
|
public
boolean
|
#
DeleteCookie( string $name, string $path = '/', string $domain = NULL, boolean $secure = NULL )
Delete cookie - set value to empty string and set expiration to past time. |
public
|
#
SetDisabledHeaders( string[] $disabledHeaders )
Set disabled headers, never sent except if there is rendered exception in development environment. |
public
string[]
|
#
GetDisabledHeaders( )
Get disabled headers, never sent except if there is rendered exception in development environment. |
HEADER_X_MVCCORE_CPU_RAM,
INTERNAL_SERVER_ERROR,
MOVED_PERMANENTLY,
NOT_FOUND,
OK,
SEE_OTHER
|