ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
URLSafeTransport.php
Go to the documentation of this file.
1 <?php
2 
20 
24 class URLSafeTransport implements Transport
25 {
26  public function prepareForTransport(string $compressed_token): string
27  {
28  return rtrim(str_replace(['+', '/'], ['-', '_'], base64_encode($compressed_token)), '=');
29  }
30 
31  public function readFromTransport(string $compressed_token): string
32  {
33  return base64_decode(str_replace(['-', '_'], ['+', '/'], $compressed_token . '=='));
34  }
35 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...