providers = array_values(array_filter($providers, 'is_string')); $this->parallel = $parallel; } /** @return string[] */ public function getProviders(): array { return $this->providers; } public function getPrimary(): ?string { return $this->providers[0] ?? null; } /** @return string[] All except primary */ public function getFallbacks(): array { return array_slice($this->providers, 1); } public function isParallel(): bool { return $this->parallel; } public function isEmpty(): bool { return $this->providers === []; } }