You are here

public function Redis_AbstractBackend::getKey in Redis 7.2

Same name and namespace in other branches
  1. 7.3 lib/Redis/AbstractBackend.php \Redis_AbstractBackend::getKey()

Get full key name using the set prefix

Parameters

string ...: Any numer of strings to append to path using the separator

Return value

string

13 calls to Redis_AbstractBackend::getKey()
Redis_Cache_Base::getKey in lib/Redis/Cache/Base.php
Get full key name using the set prefix
Redis_Lock_Backend_Default::getKey in lib/Redis/Lock/Backend/Default.php
Generate a redis key name for the current lock name
Redis_Path_PhpRedis::deleteAlias in lib/Redis/Path/PhpRedis.php
Alias is being deleted for the given source
Redis_Path_PhpRedis::deleteLanguage in lib/Redis/Path/PhpRedis.php
A language is being deleted
Redis_Path_PhpRedis::lookupInHash in lib/Redis/Path/PhpRedis.php

... See full list

2 methods override Redis_AbstractBackend::getKey()
Redis_Cache_Base::getKey in lib/Redis/Cache/Base.php
Get full key name using the set prefix
Redis_Lock_Backend_Default::getKey in lib/Redis/Lock/Backend/Default.php
Generate a redis key name for the current lock name

File

lib/Redis/AbstractBackend.php, line 150

Class

Redis_AbstractBackend

Code

public function getKey() {
  $args = array_filter(func_get_args());
  if (empty($args)) {
    return $this->prefix;
  }
  else {
    if (is_array($args)) {
      array_unshift($args, $this->prefix);
      return implode(self::KEY_SEPARATOR, $args);
    }
    else {
      return $this->prefix . self::KEY_SEPARATOR . $args;
    }
  }
}