ConfirmationMiddleware
class ConfirmationMiddleware implements HTTPMiddleware
Checks whether user manual confirmation is required for HTTPRequest depending on the rules given.
How it works: - Gives the request to every single rule - If no confirmation items are found by the rules, then move on to the next middleware - initialize the Confirmation\Storage with all the confirmation items found - Check whether the storage has them confirmed already and if yes, move on to the next middleware - Otherwise redirect to the confirmation URL
Methods
Override the default decline url
Extract the confirmation items from the request and return
Override the confirmation storage ID
Override the confirmation form url
Details
at line 69
__construct(Rule[] $rules)
Init the middleware with the rules
at line 118
$this
setDeclineUrl(string $url)
Override the default decline url
at line 132
bool
canBypass(HTTPRequest $request)
Check whether the rules can be bypassed without user confirmation
at line 150
Item[]
getConfirmationItems(HTTPRequest $request)
Extract the confirmation items from the request and return
at line 248
HTTPResponse
process(HTTPRequest $request, callable $delegate)
Generate response for the given request
at line 272
$this
setConfirmationStorageId(string $id)
Override the confirmation storage ID
at line 285
$this
setConfirmationFormUrl(string $url)
Override the confirmation form url
at line 298
$this
setBypasses(Bypass[] $bypasses)
Set the list of bypasses for the confirmation