carno-php /
pool
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * (S)elect (R)an(D)om |
||
| 4 | * User: moyo |
||
| 5 | * Date: 22/12/2017 |
||
| 6 | * Time: 4:58 PM |
||
| 7 | */ |
||
| 8 | |||
| 9 | namespace Carno\Pool\Wrapper; |
||
| 10 | |||
| 11 | use Carno\Pool\Contracts\Select; |
||
| 12 | use Carno\Pool\Pool; |
||
| 13 | |||
| 14 | trait SRD |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @deprecated |
||
| 18 | * @param Pool $pool |
||
| 19 | * @param string $method |
||
| 20 | * @param array $arguments |
||
| 21 | * @return mixed |
||
| 22 | */ |
||
| 23 | protected function rndRun(Pool $pool, string $method, array $arguments) |
||
| 24 | { |
||
| 25 | return yield $pool->select(Select::RANDOM)->$method(...$arguments); |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 26 | } |
||
| 27 | } |
||
| 28 |