Request
+ Inheritance diagram for Request:

Description

The request.

Protected Properties

Upload[][] $fileGroups = []
 Grouped file uploads (multiple). More...
 
Upload[] $files = []
 File uploads (singular). More...
 
string[] $headers = []
 Request headers, keyed in lowercase. More...
 
string $path
 The request path, without arguments, cleaned up. More...
 
string[] $proxies = []
 Trust client IP forwarding from these proxies. More...
 

Public Methods

 __construct ()
 Constructs using CGI data. More...
 
string __toString ()
 
array getArgs ()
 Returns POST args merged over GET args. More...
 
string getClient ()
 Returns the client IP, which may have been forwarded. More...
 
null Upload getFile (string $name)
 
Upload[] getFileGroup (string $name)
 
Upload[][] getFileGroups ()
 
Upload[] getFiles ()
 
string[] getHeaders ()
 
string getMethod ()
 
string getPath ()
 
string[] getProxies ()
 
bool isDelete ()
 
bool isGet ()
 
bool isHead ()
 
bool isMuting ()
 Whether the request can produce side-effects. More...
 
bool isPost ()
 
bool offsetExists ($key)
 Checks for a request header. More...
 
null string offsetGet ($key)
 Returns a request header. More...
 
void offsetSet ($key, $value)
 Throws. More...
 
void offsetUnset ($key)
 Throws. More...
 
$this setProxies (array $proxies)
 

Properties

◆ $fileGroups

Upload [][] $fileGroups = []
protected

Grouped file uploads (multiple).

[ name => Upload[] ]

◆ $files

Upload [] $files = []
protected

File uploads (singular).

[ name => Upload ]

◆ $headers

string [] $headers = []
protected

Request headers, keyed in lowercase.

◆ $path

string $path
protected

The request path, without arguments, cleaned up.

◆ $proxies

string [] $proxies = []
protected

Trust client IP forwarding from these proxies.

Constructor

◆ __construct()

__construct ( )

Constructs using CGI data.

Methods

◆ __toString()

string __toString ( )
final
Returns
string

◆ getArgs()

array getArgs ( )

Returns POST args merged over GET args.

Returns
array

◆ getClient()

string getClient ( )

Returns the client IP, which may have been forwarded.

Returns
string

◆ getFile()

null Upload getFile ( string  $name)
final
Parameters
string$name
Returns
null|Upload

◆ getFileGroup()

Upload [] getFileGroup ( string  $name)
final
Parameters
string$name
Returns
Upload[]

◆ getFileGroups()

Upload [][] getFileGroups ( )
final
Returns
Upload[][]

◆ getFiles()

Upload [] getFiles ( )
final
Returns
Upload[]

◆ getHeaders()

string [] getHeaders ( )
Returns
string[]

◆ getMethod()

string getMethod ( )
final
Returns
string

◆ getPath()

string getPath ( )
final
Returns
string

◆ getProxies()

string [] getProxies ( )
Returns
string[]

◆ isDelete()

bool isDelete ( )
final
Returns
bool

◆ isGet()

bool isGet ( )
final
Returns
bool

◆ isHead()

bool isHead ( )
final
Returns
bool

◆ isMuting()

bool isMuting ( )
final

Whether the request can produce side-effects.

Returns
bool

◆ isPost()

bool isPost ( )
final
Returns
bool

◆ offsetExists()

bool offsetExists (   $key)

Checks for a request header.

Parameters
string$key
Returns
bool

◆ offsetGet()

null string offsetGet (   $key)

Returns a request header.

Parameters
string$key
Returns
null|string

◆ offsetSet()

void offsetSet (   $key,
  $value 
)
final

Throws.

Parameters
mixed$key
mixed$value
Exceptions
LogicException

◆ offsetUnset()

void offsetUnset (   $key)
final

Throws.

Parameters
mixed$key
Exceptions
LogicException

◆ setProxies()

$this setProxies ( array  $proxies)
Parameters
string[]$proxies
Returns
$this