gateways[$id] = $gateway; } public function get(string $id): ?GatewayInterface { return $this->gateways[$id] ?? null; } public function all(): array { return $this->gateways; } public function register_defaults(): void { $this->register('hosted_checkout', new HostedCheckoutGateway()); } }