Definition at line 8 of file UrlRewrite.php.
◆ _validateRequestPath()
_validateRequestPath |
( |
|
$requestPath | ) |
|
|
protected |
Core func to validate request path If something is wrong with a path it throws localized error message and error code, that can be checked to by wrapper func to alternate error message
- Parameters
-
- Returns
- bool
- Exceptions
-
Definition at line 29 of file UrlRewrite.php.
31 if (strpos($requestPath,
'//') !==
false) {
33 __(
'Do not use two or more consecutive slashes in the request path.'),
34 self::VERR_MANYSLASHES
37 if (strpos($requestPath,
'#') !==
false) {
38 throw new \Exception(
__(
'Anchor symbol (#) is not supported in request path.'), self::VERR_ANCHOR);
◆ validateRequestPath()
validateRequestPath |
( |
|
$requestPath | ) |
|
Validates request path Either returns TRUE (success) or throws error (validation failed)
- Parameters
-
- Exceptions
-
Definition at line 51 of file UrlRewrite.php.
55 }
catch (\Exception $e) {
56 throw new \Magento\Framework\Exception\LocalizedException(
__($e->getMessage()));
_validateRequestPath($requestPath)
◆ validateSuffix()
validateSuffix |
( |
|
$suffix | ) |
|
Validates suffix for url rewrites to inform user about errors in it Either returns TRUE (success) or throws error (validation failed)
- Parameters
-
- Exceptions
-
Definition at line 69 of file UrlRewrite.php.
74 }
catch (\Exception $e) {
76 switch ($e->getCode()) {
78 throw new \Magento\Framework\Exception\LocalizedException(
79 __(
'Do not use two or more consecutive slashes in the url rewrite suffix.')
82 throw new \Magento\Framework\Exception\LocalizedException(
83 __(
'Anchor symbol (#) is not supported in url rewrite suffix.')
_validateRequestPath($requestPath)
◆ VERR_ANCHOR
◆ VERR_MANYSLASHES
const VERR_MANYSLASHES = 1 |
The documentation for this class was generated from the following file: