Factory
in package
Factory class for creating profile instances from strings.
Tags
Table of Contents
- $profiles : mixed
- define() : mixed
- Registers a new server profile.
- get() : ProfileInterface
- Returns the specified server profile.
- getDefault() : ProfileInterface
- Returns the default server profile.
- getDevelopment() : ProfileInterface
- Returns the development server profile.
- __construct() : mixed
Properties
$profiles
private
static mixed
$profiles
= array('2.0' => 'Predis\Profile\RedisVersion200', '2.2' => 'Predis\Profile\RedisVersion220', '2.4' => 'Predis\Profile\RedisVersion240', '2.6' => 'Predis\Profile\RedisVersion260', '2.8' => 'Predis\Profile\RedisVersion280', '3.0' => 'Predis\Profile\RedisVersion300', '3.2' => 'Predis\Profile\RedisVersion320', 'dev' => 'Predis\Profile\RedisUnstable', 'default' => 'Predis\Profile\RedisVersion320')
Methods
define()
Registers a new server profile.
public
static define(string $alias, string $class) : mixed
Parameters
- $alias : string
-
Profile version or alias.
- $class : string
-
FQN of a class implementing Predis\Profile\ProfileInterface.
Tags
Return values
mixed —get()
Returns the specified server profile.
public
static get(string $version) : ProfileInterface
Parameters
- $version : string
-
Profile version or alias.
Tags
Return values
ProfileInterface —getDefault()
Returns the default server profile.
public
static getDefault() : ProfileInterface
Return values
ProfileInterface —getDevelopment()
Returns the development server profile.
public
static getDevelopment() : ProfileInterface
Return values
ProfileInterface —__construct()
private
__construct() : mixed