PathValidatorInterface
interface PathValidatorInterface (View source)
Provides an interface for url path validators.
Methods
Url|false
getUrlIfValid(string $path)
Returns a URL object, if the path is valid and accessible.
Url|false
getUrlIfValidWithoutAccessCheck(string $path)
Returns a URL object, if the path is valid.
bool
isValid(string $path)
Checks if the URL path is valid and accessible by the current user.
Details
Url|false
getUrlIfValid(string $path)
Returns a URL object, if the path is valid and accessible.
Url|false
getUrlIfValidWithoutAccessCheck(string $path)
Returns a URL object, if the path is valid.
Unlike getUrlIfValid(), access check is not performed. Do not use this method if the $path is about to be presented to a user.
bool
isValid(string $path)
Checks if the URL path is valid and accessible by the current user.