/** * Magic method to handle all function requests and prefix key based * operations with the '{self::$defaultNamespace}' key prefix. * * @param string $name The name of the method called. * @param array $args Array of supplied arguments to the method. * @return mixed Return value from Resident::call() based on the command. */ public function __call($name, $args) { $args = func_get_args(); if (in_array($name, $this->keyCommands)) { $args[1][0] = self::$defaultNamespace . $args[1][0]; } try { return parent::__call($name, $args[1]); } catch (RedisException $e) { return false; } }
/** * Magic method to handle all function requests and prefix key based * operations with the 'resque:' key prefix. * * @param string $name The name of the method called. * @param array $args Array of supplied arguments to the method. * @return mixed Return value from Resident::call() based on the command. */ public function __call($name, $args) { $args = func_get_args(); if (in_array($name, $this->keyCommands)) { $args[1][0] = 'resque:' . $args[1][0]; } try { return parent::__call($name, $args[1]); } catch (RedisException_a $e) { return false; } }