PHP Class Voodoo\Core\Http\Request

显示文件 Open project: voodoophp/voodoo Class Usage Examples

Public Methods

Method Description
getGetParams ( ) : array Return the $_GET
getIp ( ) : string Return the request ip
getMethod ( ) : string Return the request method
getParams ( ) : Array Return all the params
getPostParams ( ) : array Return the $_POST
getSegment ( $key = null, $offset, array $segmentsArr = null ) : mixed Segements are part of the URL separated by / ie: /gummy/bear/?q=hello 'gummy' and 'bear' are segments.
getUrlSegments ( ) : array Return segments of the URL Segments are part of the URL separated by a slash /
is ( string $method = "POST" ) To check the request Method
isAjax ( ) : boolean Verify is the access is from ajax.

Method Details

getGetParams() public static method

Return the $_GET
public static getGetParams ( ) : array
return array

getIp() public static method

Return the request ip
public static getIp ( ) : string
return string

getMethod() public static method

Return the request method
public static getMethod ( ) : string
return string

getParams() public static method

Return all the params
public static getParams ( ) : Array
return Array

getPostParams() public static method

Return the $_POST
public static getPostParams ( ) : array
return array

getSegment() public static method

Segements are part of the URL separated by / ie: /gummy/bear/?q=hello 'gummy' and 'bear' are segments.
public static getSegment ( $key = null, $offset, array $segmentsArr = null ) : mixed
$segmentsArr array the array segments to use
return mixed

getUrlSegments() public static method

Return segments of the URL Segments are part of the URL separated by a slash /
public static getUrlSegments ( ) : array
return array

is() public static method

To check the request Method
public static is ( string $method = "POST" )
$method string

isAjax() public static method

Verify is the access is from ajax.
public static isAjax ( ) : boolean
return boolean