PHP Class ServerRequest

Inheritance: extends Request
显示文件 Open project: sourcefabric/newscoop Class Usage Examples

Public Methods

Method Description
__construct ( callback $callback, array $args = [] )
allow ( string $callable_name, $permission_required = '' ) : ServerRequest Allow certain callback.
checkPermission ( ) : boolean Check permission.
checkToken ( ) : boolean Check token.
execute ( ) : mixed Execute callback.

Method Details

__construct() public method

public __construct ( callback $callback, array $args = [] )
$callback callback
$args array

allow() public method

Allow certain callback.
public allow ( string $callable_name, $permission_required = '' ) : ServerRequest
$callable_name string
return ServerRequest

checkPermission() public method

Check permission.
public checkPermission ( ) : boolean
return boolean

checkToken() public method

Check token.
public checkToken ( ) : boolean
return boolean

execute() public method

Execute callback.
public execute ( ) : mixed
return mixed