getSlavePdo() public method
Returns the PDO instance for the currently active slave connection.
When $enableSlaves is true, one of the slaves will be used for read queries, and its PDO instance will be returned by this method.
public PDO getSlavePdo ( $fallbackToMaster = true ) | ||
---|---|---|
$fallbackToMaster | boolean |
Whether to return a master PDO in case none of the slave connections is available. |
return | PDO |
The PDO instance for the currently active slave connection. Null is returned if no slave connection is available and |
Please login to continue.