Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Fixed PHP code doc blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
drpayyne committed Dec 14, 2020
1 parent d51dd6c commit f6c86a3
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/guides/v2.3/extension-dev-guide/framework/url-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The [`Magento\Framework\Url\EncoderInterface`]({{ site.mage2bloburl }}/{{ page.g

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.

|Special Character|Encoded Value|
|Special Character|Decoded Value|
|--- |--- |
| `-` | `+` |
| `_` | `/` |
Expand All @@ -49,7 +49,12 @@ private $encoder;
*/
private $decoder;


/**
* QuickCartTaxInput constructor.
*
* @param EncoderInterface $encoder
* @param DecoderInterface $decoder
*/
public function __construct(
EncoderInterface $encoder,
DecoderInterface $decoder
Expand All @@ -59,15 +64,23 @@ public function __construct(
}

/**
* Encodes URL to base64 format and escapes special characters
* Encodes URL to base64 format and escapes special characters.
*
* @param string $url
*
* @return string
*/
public function encodeURL($url)
{
return $this->encoder->encode($url);
}

/**
* Decodes URL from base64 format and special characters
* Decodes URL from base64 format and special characters.
*
* @param string $encodedUrl
*
* @return string
*/
public function decodeURL($encodedUrl)
{
Expand Down

0 comments on commit f6c86a3

Please sign in to comment.