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 |
| 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" |
Please login to continue.