GetParameter
class GetParameter implements Rule, Bypass (View source)
A rule to match a GET parameter within HTTPRequest
Methods
protected
string
generateToken(string $path, string $value)
Generates the unique token depending on the path and the parameter
protected
bool
public
bool
checkRequestForBypass(HTTPRequest $request)
Check the request for whether we can bypass the confirmation
public
null|Item
getRequestConfirmationItem(HTTPRequest $request)
Check the request by the rule and return a confirmation item
Details
__construct(string $name)
Initialize the rule with a parameter name
string
getName()
Return the parameter name
$this
setName(string $name)
Set the parameter name
protected Item
buildConfirmationItem(string $token, string $value)
Generates the confirmation item
protected string
generateToken(string $path, string $value)
Generates the unique token depending on the path and the parameter
protected bool
checkRequestHasParameter(HTTPRequest $request)
Check request contains the GET parameter
bool
checkRequestForBypass(HTTPRequest $request)
Check the request for whether we can bypass the confirmation
null|Item
getRequestConfirmationItem(HTTPRequest $request)
Check the request by the rule and return a confirmation item