Tonic


Tonic\Request
src/Tonic/Request.php at line 8

Class Request

Request

public class Request

Model a HTTP request


Field Summary
mixed

$accept

mixed

$acceptLanguage

mixed

$contentType

mixed

$data

mixed

$ifMatch

mixed

$ifNoneMatch

mixed

$method

str[]

$mimetypes

Map of file/URI extensions to mimetypes

mixed

$uri

Constructor Summary
void

__construct(mixed options)

Method Summary
str

getOption(str options, str configVar, str|str headers, str default)

Get an item from the given options array if it exists, otherwise fetch from HTTP header or return the given default

Field Detail

src/Tonic/Request.php at line 14

accept

public mixed $accept = array()

src/Tonic/Request.php at line 15

acceptLanguage

public mixed $acceptLanguage = array()

src/Tonic/Request.php at line 12

contentType

public mixed $contentType

src/Tonic/Request.php at line 13

data

public mixed $data

src/Tonic/Request.php at line 16

ifMatch

public mixed $ifMatch = array()

src/Tonic/Request.php at line 17

ifNoneMatch

public mixed $ifNoneMatch = array()

src/Tonic/Request.php at line 11

method

public mixed $method

src/Tonic/Request.php at line 23

mimetypes

public str[] $mimetypes = array(...)

Map of file/URI extensions to mimetypes


src/Tonic/Request.php at line 10

uri

public mixed $uri

Constructor Detail

src/Tonic/Request.php at line 25

__construct

public void __construct(mixed options)

Method Detail

src/Tonic/Request.php at line 50

getOption

public str getOption(str options, str configVar, str|str headers, str default)

Get an item from the given options array if it exists, otherwise fetch from HTTP header or return the given default

Parameters:
configVar - Name of item to get
headers - Name of HTTP header(s)
default - Fallback value

Tonic