db\Connection getSlave()

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 $fallbackToMaster is false.

doc_Yii
2016-10-30 16:57:48
Comments
Leave a Comment

Please login to continue.