From 332aa1421560e8a6e22d404c6c8f4d127a1feaa1 Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Tue, 10 Dec 2024 14:49:44 +0100 Subject: [PATCH] Improve constructor --- src/Connections/EPPTCPConnection.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Connections/EPPTCPConnection.php b/src/Connections/EPPTCPConnection.php index 1dd9b9d..d5abd64 100644 --- a/src/Connections/EPPTCPConnection.php +++ b/src/Connections/EPPTCPConnection.php @@ -10,9 +10,11 @@ class EPPTCPConnection extends EPPBaseConnection implements EPPConnection { private $registry; private $socket; - public function __construct(EPPRegistry $registry){ + public function __construct(EPPRegistry $registry,bool $openDirectly=true){ $this->registry = $registry; - $this->open(); + if($openDirectly){ + $this->open(); + } } /**