Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
X Lib
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
XLibs
X Lib
Commits
9803404e
Commit
9803404e
authored
Jun 09, 2016
by
Alex Ne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Повторно используемый код (trait)
parent
7fe0ad1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
urlSafe.php
Tool/urlSafe.php
+9
-0
No files found.
Tool/urlSafe.php
0 → 100644
View file @
9803404e
<?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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment