Skip to content

Commit 5920a66

Browse files
committed
chore: Add a method to resolve client
Signed-off-by: tmakinde <makindet74@gmail.com>
1 parent 17e0510 commit 5920a66

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/OpenFeatureAPI.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ public function getProvider(): Provider
6666
return $this->provider;
6767
}
6868

69+
protected function resolveClient(string $name, string $version): OpenFeatureClient
70+
{
71+
return new OpenFeatureClient($this, $name, $version);
72+
}
73+
6974
/**
7075
* -----------------
7176
* Requirement 1.1.2
@@ -103,7 +108,7 @@ public function getClient(?string $name = null, ?string $version = null): Client
103108
$version = $version ?? 'OpenFeature';
104109

105110
try {
106-
$client = new OpenFeatureClient($this, $name, $version);
111+
$client = $this->resolveClient($name, $version);
107112
$client->setLogger($this->getLogger());
108113

109114
return $client;

0 commit comments

Comments
 (0)