PHP Class Predis\Connection\Parameters

Author: Daniele Alessandri ([email protected])
Inheritance: implements Predis\Connection\ParametersInterface
Mostra file Open project: nrk/predis Class Usage Examples

Public Methods

Method Description
__construct ( array $parameters = [] )
__get ( $parameter )
__isset ( $parameter )
__sleep ( )
__toString ( )
create ( array | string $parameters ) : Parameters Creates a new instance by supplying the initial parameters either in the form of an URI string or a named array.
parse ( string $uri ) : array Parses an URI string returning an array of connection parameters.
toArray ( )

Protected Methods

Method Description
getDefaults ( ) : array Returns some default parameters with their values.

Method Details

__construct() public method

public __construct ( array $parameters = [] )
$parameters array Named array of connection parameters.

__get() public method

public __get ( $parameter )

__isset() public method

public __isset ( $parameter )

__sleep() public method

public __sleep ( )

__toString() public method

public __toString ( )

create() public static method

Creates a new instance by supplying the initial parameters either in the form of an URI string or a named array.
public static create ( array | string $parameters ) : Parameters
$parameters array | string Set of connection parameters.
return Parameters

getDefaults() protected method

Returns some default parameters with their values.
protected getDefaults ( ) : array
return array

parse() public static method

When using the "redis" and "rediss" schemes the URI is parsed according to the rules defined by the provisional registration documents approved by IANA. If the URI has a password in its "user-information" part or a database number in the "path" part these values override the values of "password" and "database" if they are present in the "query" part.
public static parse ( string $uri ) : array
$uri string URI string.
return array

toArray() public method

public toArray ( )