PHP Class phprs\Request

Author: caoym http请求包装 允许使用jsonpath表达式获取http请求信息 如 req['$._GET.param1'] TODO: 使用更友好的变量名替代直接用php的全局变量, 如$.uri.query 替代$._GET, $.body 替代$._POST
Inheritance: implements ArrayAccess
Exibir arquivo Open project: caoym/phprs-restful Class Usage Examples

Public Methods

Method Description
__construct ( array $data = null, $url_begin )
find ( string $expr, $create = false ) : [found,
getAllHeaders ( ) : array 获取http请求的所有header信息
offsetExists ( $offset ) (non-PHPdoc)
offsetGet ( $offset ) (non-PHPdoc)
offsetSet ( $offset, $value ) (non-PHPdoc)
offsetUnset ( $offset ) (non-PHPdoc)
toArray ( ) : multitype: 取数包含所有请求信息的数组

Method Details

__construct() public method

public __construct ( array $data = null, $url_begin )
$data array

find() public method

public find ( string $expr, $create = false ) : [found,
$expr string jsonpath 表达式
$create 是否找不到就创建
return [found,

getAllHeaders() public method

获取http请求的所有header信息
public getAllHeaders ( ) : array
return array

offsetExists() public method

(non-PHPdoc)
See also: ArrayAccess::offsetExists()
public offsetExists ( $offset )

offsetGet() public method

(non-PHPdoc)
See also: ArrayAccess::offsetGet()
public offsetGet ( $offset )

offsetSet() public method

(non-PHPdoc)
See also: ArrayAccess::offsetSet()
public offsetSet ( $offset, $value )

offsetUnset() public method

(non-PHPdoc)
See also: ArrayAccess::offsetUnset()
public offsetUnset ( $offset )

toArray() public method

取数包含所有请求信息的数组
public toArray ( ) : multitype:
return multitype: