PHP Class Locker\Request

显示文件 Open project: learninglocker/learninglocker

Protected Properties

Property Type Description
$params Stores/caches params.

Public Methods

Method Description
all ( ) : AssocArray Gets the stored/cached params.
getContent ( )
getParam ( String $key, mixed $default = null ) : mixed Gets a param from the stored/cached params.
getParams ( ) : AssocArray Gets all params (merges payload params with request params).
getPassword ( ) : String Gets the password from the basic auth.
getPayload ( ) : AssocArray Gets the stored/cached params.
getPayloadParams ( ) : AssocArray Gets the data stored in the request payload.
getUser ( ) : String Gets the user from the basic auth.
hasParam ( String $key ) : boolean Determines if the param is set.
header ( $key, $default = null ) : mixed Gets a header from the request headers.

Private Methods

Method Description
getAuth ( ) : AssocArray Gets the authentication details from the stored/cached params.
getDecodedAuth ( String $auth ) : AssocArray Gets decoded authentication details.
getNullAuth ( ) : AssocArray Gets the null authentication details.
getSplitAuth ( ) : boolean Determines if the auth param is split by a space.
splitAuthParam ( String $authParam, String $delimeter ) : String[] Gets the authentication details split by a delimeter.

Method Details

all() public method

Gets the stored/cached params.
public all ( ) : AssocArray
return AssocArray Stored/cached params.

getContent() public method

public getContent ( )

getParam() public method

Gets a param from the stored/cached params.
public getParam ( String $key, mixed $default = null ) : mixed
$key String Param to be retrieved.
$default mixed Value to be returned if the param is not set.
return mixed Value of the param.

getParams() public method

Gets all params (merges payload params with request params).
public getParams ( ) : AssocArray
return AssocArray params.

getPassword() public method

Gets the password from the basic auth.
public getPassword ( ) : String
return String password in the basic auth.

getPayload() public method

Gets the stored/cached params.
public getPayload ( ) : AssocArray
return AssocArray Stored/cached params.

getPayloadParams() public method

Gets the data stored in the request payload.
public getPayloadParams ( ) : AssocArray
return AssocArray params from the payload.

getUser() public method

Gets the user from the basic auth.
public getUser ( ) : String
return String user in the basic auth.

hasParam() public method

Determines if the param is set.
public hasParam ( String $key ) : boolean
$key String Param to be checked.
return boolean True if the param exists, false if it doesn't.

header() public method

Gets a header from the request headers.
public header ( $key, $default = null ) : mixed
$key Header to be returned.
$default Value to be returned if the header is not set.
return mixed Value of the header.

Property Details

$params protected_oe property

Stores/caches params.
protected $params