You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: src/guides/v2.3/extension-dev-guide/framework/url-library.md
+19-7Lines changed: 19 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The [`Magento\Framework\Url\EncoderInterface`]({{ site.mage2bloburl }}/{{ page.g
25
25
26
26
The [`Magento\Framework\Url\DecoderInterface`]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Url/DecoderInterface.php){:target="_blank"} provides a method to `decode` the base64 encoded URL provided to it and also decodes the special characters described in the table below.
27
27
28
-
|Special Character|Encoded Value|
28
+
|Special Character|Decoded Value|
29
29
|--- |--- |
30
30
|`-`|`+`|
31
31
|`_`|`/`|
@@ -49,7 +49,12 @@ private $encoder;
49
49
*/
50
50
private $decoder;
51
51
52
-
52
+
/**
53
+
* QuickCartTaxInput constructor.
54
+
*
55
+
* @param EncoderInterface $encoder
56
+
* @param DecoderInterface $decoder
57
+
*/
53
58
public function __construct(
54
59
EncoderInterface $encoder,
55
60
DecoderInterface $decoder
@@ -59,19 +64,26 @@ public function __construct(
59
64
}
60
65
61
66
/**
62
-
* Encodes URL to base64 format and escapes special characters
67
+
* Encodes URL to base64 format and escapes special characters.
68
+
*
69
+
* @param string $url
70
+
*
71
+
* @return string
63
72
*/
64
-
public function encodeURL($url)
73
+
public function encodeURL($url): string
65
74
{
66
75
return $this->encoder->encode($url);
67
76
}
68
77
69
78
/**
70
-
* Decodes URL from base64 format and special characters
79
+
* Decodes URL from base64 format and special characters.
0 commit comments