PHP Class Tdt\Core\ContentNegotiator

Author: Michiel Vancoillie ([email protected])
Inheritance: extends Pager
ファイルを表示 Open project: tdt/core Class Usage Examples

Public Properties

Property Type Description
$mime_types_map Map MIME-types on formatters for Accept-header

Public Methods

Method Description
getResponse ( Tdt\Core\Datasets\Data $data, string $extension = null ) : Response Format using requested formatter (via extension, Accept-header or default)

Private Methods

Method Description
createXmlResponse ( $data )
fetchUrl ( string $extension = '' ) : string Fetch the url without the extension

Method Details

getResponse() public static method

Format using requested formatter (via extension, Accept-header or default)
public static getResponse ( Tdt\Core\Datasets\Data $data, string $extension = null ) : Response
$data Tdt\Core\Datasets\Data The data object on which the response will be based
$extension string The preferred format in which the data should be returned
return Response

Property Details

$mime_types_map public_oe static_oe property

Map MIME-types on formatters for Accept-header
public static $mime_types_map