You are here

public function Redis_Path_PhpRedis::saveAlias in Redis 7.2

Alias is being inserted with the given source

Parameters

string $source:

string $alias:

string $language:

Overrides Redis_Path_HashLookupInterface::saveAlias

File

lib/Redis/Path/PhpRedis.php, line 44

Class

Redis_Path_PhpRedis
PhpRedis implementation.

Code

public function saveAlias($source, $alias, $language = null) {
  if (null === $language) {
    $language = LANGUAGE_NONE;
  }
  if (!empty($source)) {
    $this
      ->saveInHash($this
      ->getKey(self::KEY_ALIAS, $language), $source, $alias);
  }
  if (!empty($alias)) {
    $this
      ->saveInHash($this
      ->getKey(self::KEY_SOURCE, $language), $alias, $source);
  }
}