Commit 9803404e authored by Alex Ne's avatar Alex Ne

Повторно используемый код (trait)

parent 7fe0ad1e
<?php
namespace X\Tool;
trait urlSafe
{
protected function urlSafeB64Encode($data){return str_replace(['+', '/', '\r', '\n', '='], ['-', '_'], base64_encode($data));}
protected function urlSafeB64Decode($b64){return base64_decode(str_replace( ['-', '_'], ['+', '/'], $b64));}
}
?>
\ 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