PHP Class Dingo\Api\Http\Parser\Accept

Inheritance: implements Dingo\Api\Http\Parser\Parser
Show file Open project: dingo/api Class Usage Examples

Protected Properties

Property Type Description
$format string Default format.
$standardsTree string Standards tree.
$subtype string API subtype.
$version string Default version.

Public Methods

Method Description
__construct ( string $standardsTree, string $subtype, string $version, string $format ) : void Create a new accept parser instance.
parse ( Illuminate\Http\Request $request, boolean $strict = false ) : array Parse the accept header on the incoming request. If strict is enabled then the accept header must be available and must be a valid match.

Method Details

__construct() public method

Create a new accept parser instance.
public __construct ( string $standardsTree, string $subtype, string $version, string $format ) : void
$standardsTree string
$subtype string
$version string
$format string
return void

parse() public method

Parse the accept header on the incoming request. If strict is enabled then the accept header must be available and must be a valid match.
public parse ( Illuminate\Http\Request $request, boolean $strict = false ) : array
$request Illuminate\Http\Request
$strict boolean
return array

Property Details

$format protected property

Default format.
protected string $format
return string

$standardsTree protected property

Standards tree.
protected string $standardsTree
return string

$subtype protected property

API subtype.
protected string $subtype
return string

$version protected property

Default version.
protected string $version
return string