PHP Class phprs\BindReturns

Author: caoym
Mostra file Open project: caoym/phprs-restful

Public Methods

Method Description
__construct ( string $class_name, string $method_name, boolean $auto_bind_return = true )
bind ( $req, &$res, array &$args ) 绑定到函数调用的参数上去
getBindParamPos ( ) : array 获取被绑定的参数列表 返回的是参数位置
getParams ( ) : array 返回绑定的参数信息
isEmpty ( ) : boolean
set ( $id, $params, $method_info ) 设置绑定
setReturn ( unknown $var ) 设置返回值

Method Details

__construct() public method

public __construct ( string $class_name, string $method_name, boolean $auto_bind_return = true )
$class_name string
$method_name string
$auto_bind_return boolean 是否默认绑定返回值

bind() public method

绑定到函数调用的参数上去
public bind ( $req, &$res, array &$args )
$req
$res
$args array

getBindParamPos() public method

获取被绑定的参数列表 返回的是参数位置
public getBindParamPos ( ) : array
return array

getParams() public method

返回绑定的参数信息
public getParams ( ) : array
return array [[输出方法=>[[是否常量, 值 , 输出参数位置, 参数信息],..]]

isEmpty() public method

public isEmpty ( ) : boolean
return boolean

set() public method

设置绑定
public set ( $id, $params, $method_info )
$params 绑定相关参数:[目标变量 , 源变量]
$method_info 方法变量信息 [变量名=>[是否引用, 是否有默认值, 默认值]]

setReturn() public method

设置返回值
public setReturn ( unknown $var )
$var unknown