PHP Class Cml\Http\Input

Show file Open project: linhecheng/cmlphp Class Usage Examples

Public Methods

Method Description
getBool ( string $name, null $default = null ) : boolean | null 获取get bool数据
getInt ( string $name, null $default = null ) : integer | null 获取get int数据
getString ( string $name, null $default = null ) : string | null 获取get string数据
postBool ( string $name, null $default = null ) : boolean | null 获取post bool数据
postInt ( string $name, null $default = null ) : integer | null 获取post int数据
postString ( string $name, null $default = null ) : string | null 获取post string数据
requestBool ( string $name, null $default = null ) : null | boolean 获取$_REQUEST bool数据
requestInt ( string $name, null $default = null ) : null | integer 获取$_REQUEST int数据
requestString ( string $name, null $default = null ) : null | string 获取$_REQUEST string数据

Method Details

getBool() public static method

获取get bool数据
public static getBool ( string $name, null $default = null ) : boolean | null
$name string 要获取的变量
$default null 未获取到$_GET值时返回的默认值
return boolean | null

getInt() public static method

获取get int数据
public static getInt ( string $name, null $default = null ) : integer | null
$name string 要获取的变量
$default null 未获取到$_GET值时返回的默认值
return integer | null

getString() public static method

获取get string数据
public static getString ( string $name, null $default = null ) : string | null
$name string 要获取的变量
$default null 未获取到$_GET值时返回的默认值
return string | null

postBool() public static method

获取post bool数据
public static postBool ( string $name, null $default = null ) : boolean | null
$name string 要获取的变量
$default null 未获取到$_POST值时返回的默认值
return boolean | null

postInt() public static method

获取post int数据
public static postInt ( string $name, null $default = null ) : integer | null
$name string 要获取的变量
$default null 未获取到$_POST值时返回的默认值
return integer | null

postString() public static method

获取post string数据
public static postString ( string $name, null $default = null ) : string | null
$name string 要获取的变量
$default null 未获取到$_POST值时返回的默认值
return string | null

requestBool() public static method

获取$_REQUEST bool数据
public static requestBool ( string $name, null $default = null ) : null | boolean
$name string 要获取的变量
$default null 未获取到$_REQUEST值时返回的默认值
return null | boolean

requestInt() public static method

获取$_REQUEST int数据
public static requestInt ( string $name, null $default = null ) : null | integer
$name string 要获取的变量
$default null 未获取到$_REQUEST值时返回的默认值
return null | integer

requestString() public static method

获取$_REQUEST string数据
public static requestString ( string $name, null $default = null ) : null | string
$name string 要获取的变量
$default null 未获取到$_REQUEST值时返回的默认值
return null | string