本文整理汇总了PHP中Resque::redisServer方法的典型用法代码示例。如果您正苦于以下问题:PHP Resque::redisServer方法的具体用法?PHP Resque::redisServer怎么用?PHP Resque::redisServer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resque
的用法示例。
在下文中一共展示了Resque::redisServer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setBackend
/**
* Given a host/port combination separated by a colon, set it as
* the redis server that Resque will talk to.
*
* @param mixed $server Host/port combination separated by a colon, or
* a nested array of servers with host/port pairs.
* @param int $database
*/
public static function setBackend($server, $database = 0, $password = '')
{
self::$redisServer = $server;
self::$redisDatabase = $database;
self::$redisPassword = $password;
self::$redis = null;
}
示例2: setBackend
/**
* Given a host/port combination separated by a colon, set it as
* the redis server that Resque will talk to.
*
* @param mixed $server Host/port combination separated by a colon, or
* a nested array of servers with host/port pairs.
* @param int $database
*/
public static function setBackend($server, $database = 0, $namespace = 'resque')
{
self::$redisServer = $server;
self::$redisDatabase = $database;
self::$redis = null;
self::$namespace = $namespace;
}
示例3: setBackend
/**
* Given a host/port combination separated by a colon, set it as
* the redis server that Resque will talk to.
*
* 设置Redis的相关配置,$server:'127.0.0.1:6379'
* @param mixed $server Host/port combination separated by a colon, or
* a nested array of servers with host/port pairs.
* @param int $database
*/
public static function setBackend($server, $database = 0)
{
self::$redisServer = $server;
self::$redisDatabase = $database;
self::$redis = null;
}