| 1 | <?php |
||
| 16 | class LoadBalancer implements LoadBalancerInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var array|HostInterface[] |
||
| 20 | */ |
||
| 21 | protected $hosts; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var ChooserInterface |
||
| 25 | */ |
||
| 26 | protected $chooser; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param array|HostInterface[] $hosts |
||
| 30 | * @param ChooserInterface $chooser |
||
| 31 | */ |
||
| 32 | public function __construct(array $hosts, ChooserInterface $chooser) |
||
| 37 | |||
| 38 | public function addHost(HostInterface $host) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * {@inheritdoc} |
||
| 45 | */ |
||
| 46 | public function handleRequest(Request $request) |
||
| 53 | } |
||
| 54 |