| 12345678910111213141516171819202122232425 |
- <?php
- namespace Elastica\Connection\Strategy;
- /**
- * Description of RoundRobin.
- *
- * @author chabior
- */
- class RoundRobin extends Simple
- {
- /**
- * @param array|\Elastica\Connection[] $connections
- *
- * @throws \Elastica\Exception\ClientException
- *
- * @return \Elastica\Connection
- */
- public function getConnection($connections)
- {
- shuffle($connections);
- return parent::getConnection($connections);
- }
- }
|