Свойство | Тип | Описание | |
---|---|---|---|
$_masters | |||
$_slaves |
Метод | Описание | |
---|---|---|
__construct ( array $connectionOptions = null ) | ||
addConnections ( array $connectionOptions ) | Add multiple connections at once using arrays of options | |
addMaster ( Shanty_Mongo_Connection $connection, integer $weight = 1 ) | Add a connection to a master server | |
addSlave ( Shanty_Mongo_Connection $connection, $weight = 1 ) | Add a connection to a slaver server | |
formatConnectionString ( array $connectionOptions = [] ) | Format a connection string | |
formatHostString ( array $hostOptions = [] ) : string | Format a host string | |
getMasters ( ) : Shanty_Mongo_Connection_Stack | Get all master connections | |
getReadConnection ( ) : Shanty_Mongo_Connection | Get a read connection | |
getSlaves ( ) : Shanty_Mongo_Connection_Stack | Get all slave connections | |
getWriteConnection ( ) : Shanty_Mongo_Connection | Get a write connection |
public __construct ( array $connectionOptions = null ) | ||
$connectionOptions | array |
public addConnections ( array $connectionOptions ) | ||
$connectionOptions | array |
public addSlave ( Shanty_Mongo_Connection $connection, $weight = 1 ) | ||
$connection | Shanty_Mongo_Connection | |
$weight |
public formatConnectionString ( array $connectionOptions = [] ) | ||
$connectionOptions | array |
public formatHostString ( array $hostOptions = [] ) : string | ||
$hostOptions | array | |
Результат | string |
public getMasters ( ) : Shanty_Mongo_Connection_Stack | ||
Результат | Shanty_Mongo_Connection_Stack |
public getReadConnection ( ) : Shanty_Mongo_Connection | ||
Результат | Shanty_Mongo_Connection |
public getSlaves ( ) : Shanty_Mongo_Connection_Stack | ||
Результат | Shanty_Mongo_Connection_Stack |
public getWriteConnection ( ) : Shanty_Mongo_Connection | ||
Результат | Shanty_Mongo_Connection |