getSlave() public method
Returns the currently active slave connection.
If this method is called the first time, it will try to open a slave connection when $enableSlaves is true.
public yii\db\Connection getSlave ( $fallbackToMaster = true ) | ||
---|---|---|
$fallbackToMaster | boolean |
Whether to return a master connection in case there is no slave connection available. |
return | yii\db\Connection |
The currently active slave connection. Null is returned if there is slave available and |
Please login to continue.