You are here

private function DeveloperStorage::sanitizeCacheTag in Apigee Edge 8

Sanitizes accented characters from a generated cache tag.

If $id is an email address (which the default entity id of a developer entity in Drupal) and it contains accented characters it must be sanitized before they could be saved to the database backend.

Parameters

string $id: Developer UUID or email address.

string $tag: Generated cache tag that may or may not contains the id.

Return value

string The sanitized cache tags.

2 calls to DeveloperStorage::sanitizeCacheTag()
DeveloperStorage::resetCache in src/Entity/Storage/DeveloperStorage.php
Resets the internal, static entity cache.
DeveloperStorage::sanitizeCacheTags in src/Entity/Storage/DeveloperStorage.php
Sanitizes accented characters from generated cache tags.

File

src/Entity/Storage/DeveloperStorage.php, line 206

Class

DeveloperStorage
Entity storage implementation for developers.

Namespace

Drupal\apigee_edge\Entity\Storage

Code

private function sanitizeCacheTag(string $id, string $tag) : string {
  return str_replace($id, filter_var($id, FILTER_SANITIZE_ENCODED), $tag);
}