Class CakeRouterUrlChecker
Checks if a request object contains a valid URL
Namespace: Authentication\UrlChecker
Property Summary
-
$_defaultOptions protected
array
Default Options
Method Summary
-
_getChecker() protected
Gets the checker function name or a callback
-
_getUrlFromRequest() protected
Returns current url.
-
_mergeDefaultOptions() protected
Merges given options with the defaults.
-
check() public
Checks the requests if it is the configured login action
Method Detail
_getChecker() ¶ protected
_getChecker(array $options = []): string|callable
Gets the checker function name or a callback
Parameters
-
array
$options optional Array of options
Returns
string|callable
_getUrlFromRequest() ¶ protected
_getUrlFromRequest(Psr\Http\Message\UriInterface $uri, bool $getFullUrl = false): string
Returns current url.
Parameters
-
Psr\Http\Message\UriInterface
$uri Server Request
-
bool
$getFullUrl optional Get the full URL or just the path
Returns
string
_mergeDefaultOptions() ¶ protected
_mergeDefaultOptions(array $options): array
Merges given options with the defaults.
The reason this method exists is that it makes it easy to override the method and inject additional options without the need to use the MergeVarsTrait.
Parameters
-
array
$options Options to merge in
Returns
array
check() ¶ public
check(Psr\Http\Message\ServerRequestInterface $request, string|array $loginUrls, array $options = []): bool
Checks the requests if it is the configured login action
Parameters
-
Psr\Http\Message\ServerRequestInterface
$request -
string|array
$loginUrls -
array
$options optional
Returns
bool
Property Detail
$_defaultOptions ¶ protected
Default Options
checkFullUrl
Whether or not to check the full request URI.
Type
array