Commit 04eb9d45 authored by Alex Ne's avatar Alex Ne

Добавлено пояснение.

parent 9803404e
...@@ -6,4 +6,19 @@ trait urlSafe ...@@ -6,4 +6,19 @@ trait urlSafe
protected function urlSafeB64Encode($data){return str_replace(['+', '/', '\r', '\n', '='], ['-', '_'], base64_encode($data));} protected function urlSafeB64Encode($data){return str_replace(['+', '/', '\r', '\n', '='], ['-', '_'], base64_encode($data));}
protected function urlSafeB64Decode($b64){return base64_decode(str_replace( ['-', '_'], ['+', '/'], $b64));} protected function urlSafeB64Decode($b64){return base64_decode(str_replace( ['-', '_'], ['+', '/'], $b64));}
} }
/*
Example:
class ClassName
{
use X\Tool\urlSafe;
public function Test($Data)
{
return $this->urlSafeB64Encode($Data);
}
}
*/
?> ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment