db\Connection openFromPool()

openFromPool() protected method

Opens the connection to a server in the pool.

This method implements the load balancing among the given list of the servers.

protected yii\db\Connection openFromPool ( array $pool, array $sharedConfig )
$pool array

The list of connection configurations in the server pool

$sharedConfig array

The configuration common to those given in $pool.

return yii\db\Connection

The opened DB connection, or null if no server is available

throws yii\base\InvalidConfigException

if a configuration does not specify "dsn"

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

Please login to continue.