\LiftKit\RequestHttp

HTTP Request

This class represents an HTTP Request

Summary

Methods
Properties
Constants
__construct()
getInput()
postInput()
cookieInput()
getMethod()
getQueryArguments()
getHost()
getRemoteAddress()
isHttps()
getUri()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(array  $data, \LiftKit\Input\Input  $get = null, \LiftKit\Input\Input  $post = null, \LiftKit\Input\Input  $cookie = null) 

Initialize object

Parameters

array $data

Data from the $_SERVER array

\LiftKit\Input\Input $get

Input object generated from the $_GET array

\LiftKit\Input\Input $post

Input object generated from the $_POST array

\LiftKit\Input\Input $cookie

Input object generated from the $_COOKIE array

getInput()

getInput() : \LiftKit\Input\Input

Retrieves the Input object representing the $_GET array

Returns

\LiftKit\Input\Input

postInput()

postInput() : \LiftKit\Input\Input

Retrieves the Input object representing the $_POST array

Returns

\LiftKit\Input\Input

cookieInput()

cookieInput() : \LiftKit\Input\Input

Retrieves the Input object representing the $_COOKIE array

Returns

\LiftKit\Input\Input

getMethod()

getMethod() : string

Returns the REQUEST_METHOD server variable

Returns

string

getQueryArguments()

getQueryArguments() : array

Returns an associative array of arguments from the query string

Returns

array

getHost()

getHost() : string

Returns the HTTP_HOST server variable

Returns

string

getRemoteAddress()

getRemoteAddress() : string

Returns the REMOTE_ADDR server variable

Returns

string

isHttps()

isHttps() : boolean

Returns whether a request was made via HTTPS protocol

Returns

boolean

getUri()

getUri(boolean  $includeQueryString = true) : string

Returns the request URI

Parameters

boolean $includeQueryString

If true, the query string will be included in the return value

Returns

string