public function setupHttpDrivers(...$args)
{
if ($this->setupHttpDrivers) {
throw new \LogicException("Can setup http drivers only once");
}
$this->setupArgs = $args;
foreach ($this->httpDrivers as $drivers) {
foreach ($drivers as $driver) {
$hash = spl_object_hash($driver);
if ($this->setupHttpDrivers[$hash] ?? false) {
continue;
}
$this->setupHttpDrivers[$hash] = true;
$driver->setup(...$args);
}
}
}