class UrlPathStartswith implements Rule, Bypass (View source)

A rule to match beginning of URL

Traits

Path aware trait for rules and bypasses

Methods

string
getPath()

Returns the path

$this
setPath(string $path)

Update the path

__construct(string $path)

Initialize the rule with the path

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

Details

string getPath()

Returns the path

Return Value

string

$this setPath(string $path)

Update the path

Parameters

string $path

Return Value

$this

__construct(string $path)

Initialize the rule with the path

Parameters

string $path

bool checkRequestForBypass(HTTPRequest $request)

Check the request for whether we can bypass the confirmation

Parameters

HTTPRequest $request

Return Value

bool

True if we can bypass, False if the confirmation is required

null|Item getRequestConfirmationItem(HTTPRequest $request)

Check the request by the rule and return a confirmation item

Parameters

HTTPRequest $request

Return Value

null|Item

Confirmation item if necessary to protect the request or null otherwise