PHP Class Habari\RestResponse

Mostrar archivo Open project: habari/system

Protected Properties

Property Type Description
$response

Public Methods

Method Description
__construct ( array | string $response ) Constructor for a REST response, sets the intended response for the request
get ( )
get_accept ( )
get_best_mime ( array $mime_types = null ) : null | string Determine the best mimetype to respond to the client with based on the accept header and the mimetypes available
get_mime_list ( )
out ( ) Output the response

Method Details

__construct() public method

Constructor for a REST response, sets the intended response for the request
public __construct ( array | string $response )
$response array | string The intended response to the REST request

get() public method

public get ( )

get_accept() public method

public get_accept ( )

get_best_mime() public method

Determine the best mimetype to respond to the client with based on the accept header and the mimetypes available
public get_best_mime ( array $mime_types = null ) : null | string
$mime_types array An array of available mimetypes
return null | string The best mimetype available to return based on the client accept header

get_mime_list() public method

public get_mime_list ( )

out() public method

Output the response
public out ( )

Property Details

$response protected_oe property

protected $response