Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

CacheIdentifierSanitizer.php
Go to the documentation of this file.
1 <?php
2
7 declare(strict_types=1);
8
9 namespace Ibexa\Core\Persistence\Cache\Identifier;
10
14 final class CacheIdentifierSanitizer
15 {
25 public function escapeForCacheKey(string $identifier): string
26 {
27 return \str_replace(
28 ['_', '/', ':', '(', ')', '@', '\\', '{', '}'],
29 ['__', '_S', '_C', '_BO', '_BC', '_A', '_BS', '_CBO', '_CBC'],
30 $identifier
31 );
32 }
33 }
Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer
Definition: CacheIdentifierSanitizer.php:15
Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer\escapeForCacheKey
escapeForCacheKey(string $identifier)
Escape an argument for use in cache keys when needed.
Definition: CacheIdentifierSanitizer.php:25
Ibexa\Core\Persistence\Cache\Identifier
Definition: CacheIdentifierGenerator.php:9
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.