Methods summary
public
|
|
public
PHPixie\HTTP\Responses\Response
|
#
string( $string )
Response with a string body
Response with a string body
Parameters
Returns
|
public
PHPixie\HTTP\Responses\Response
|
#
redirect( $url, integer $statusCode = 302 )
Redirect to a different url
Redirect to a different url
Parameters
Returns
|
public
PHPixie\HTTP\Responses\Response
|
#
json( mixed $data )
JSON response
Data will be automatically encoded to JSON
Parameters
Returns
|
public
PHPixie\HTTP\Responses\Response
|
#
streamFile( resource $file )
Stream a file to the client
Stream a file to the client
Parameters
Returns
|
public
PHPixie\HTTP\Responses\Response
|
#
download( string $fileName, string $contentType, string $contents )
Download of contents as file
Download of contents as file
Parameters
- $fileName
- $contentType
- $contents
Returns
|
public
PHPixie\HTTP\Responses\Response
|
#
downloadFile( string $fileName, string $contentType, resource $file )
Download of a local file
Parameters
- $fileName
- $contentType
- $file
Returns
|
public
PHPixie\HTTP\Responses\Response
|
#
response( Psr\Http\Message\StreamInterface $body, array $headerArray = array(), integer $statusCode = 200, string $reasonPhrase = null )
Build a response
Parameters
- $body
- $headerArray
- $statusCode
- $reasonPhrase
- Status phrase
Returns
|
protected
PHPixie\HTTP\Responses\Response
|
#
stringResponse( $string, array $headers = array(), integer $statusCode = 200, string $reasonPhrase = null )
Build a string response
Parameters
- $string
- $headers
- $statusCode
- $reasonPhrase
- Status phrase
Returns
|
protected
PHPixie\HTTP\Responses\Response
|
|
protected
PHPixie\HTTP\Responses\Response
|
|