File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ public function __construct(
4141 }
4242
4343 #[\Override]
44- public function newClient (): IClient {
45- $ handler = new CurlHandler ();
46- $ stack = HandlerStack::create ($ handler );
44+ public function newClient (? callable $ handler = null ): IClient {
45+ $ clientHandler = $ handler ?? new CurlHandler ();
46+ $ stack = HandlerStack::create ($ clientHandler );
4747 if ($ this ->config ->getSystemValueBool ('dns_pinning ' , true )) {
4848 $ stack ->push ($ this ->dnsPinMiddleware ->addDnsPinning ());
4949 }
Original file line number Diff line number Diff line change 1616 */
1717interface IClientService {
1818 /**
19+ * @param ?callable $handler Handler that overrides the default CurlHandler
1920 * @return IClient
2021 * @since 8.1.0
22+ * @since 35.0.0 Added $handler optional param
2123 */
22- public function newClient (): IClient ;
24+ public function newClient (? callable $ handler = null ): IClient ;
2325}
You can’t perform that action at this time.
0 commit comments