ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
trait.ilCtrlNamespaceEncoding.php
Go to the documentation of this file.
1<?php
2
18declare(strict_types=1);
19
33{
34 private static string $psr4_namespace_delimiter = '\\';
35 private static string $ilctrl_namespace_delimiter = '.';
36
37 public function encodeNamespaceForUrl(string $psr4_namespace): string
38 {
39 return str_replace(self::$psr4_namespace_delimiter, self::$ilctrl_namespace_delimiter, $psr4_namespace);
40 }
41
42 public function decodeNamespaceFromUrl(string $ilctrl_namespace): string
43 {
44 return str_replace(self::$ilctrl_namespace_delimiter, self::$psr4_namespace_delimiter, $ilctrl_namespace);
45 }
46}
decodeNamespaceFromUrl(string $ilctrl_namespace)
static string $ilctrl_namespace_delimiter
encodeNamespaceForUrl(string $psr4_namespace)
trait ilCtrlNamespaceEncoding
This absolute monstrosity of an encoding/decoding trait exists because ILIAS strips \ from request UR...