1 | <?php |
||
11 | final class PluginClientFactory |
||
12 | { |
||
13 | /** |
||
14 | * @var callable |
||
15 | */ |
||
16 | private static $factory; |
||
17 | |||
18 | /** |
||
19 | * Set the factory to use. |
||
20 | * The callable to provide must have the same arguments and return type as PluginClientFactory::createClient. |
||
21 | * This is used by the HTTPlugBundle to provide a better Symfony integration. |
||
22 | * |
||
23 | * @internal |
||
24 | * |
||
25 | * @param callable $factory |
||
26 | */ |
||
27 | public static function setFactory(callable $factory) |
||
31 | |||
32 | /** |
||
33 | * @param HttpClient|HttpAsyncClient $client |
||
34 | * @param Plugin[] $plugins |
||
35 | * @param array $options { |
||
36 | * |
||
37 | * @var string $client_name to give client a name which may be used when displaying client information like in |
||
38 | * the HTTPlugBundle profiler. |
||
39 | * } |
||
40 | * |
||
41 | * @see PluginClient constructor for PluginClient specific $options. |
||
42 | * |
||
43 | * @return PluginClient |
||
44 | */ |
||
45 | 1 | public function createClient($client, array $plugins = [], array $options = []) |
|
55 | } |
||
56 |
Late static binding only has effect in subclasses. A
final
class cannot be extended anymore so late static binding cannot occurr. Consider replacingstatic::
withself::
.To learn more about late static binding, please refer to the PHP core documentation.