File tree Expand file tree Collapse file tree 4 files changed +21
-3
lines changed
Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 1717/**
1818 * Abstract an FTP connection class implementations.
1919 *
20- * @since 1.2.4
20+ * @since 1.2.5
2121 * @author El Amrani Chakir <[email protected] > 2222 */
2323abstract class Connection implements ConnectionInterface
@@ -46,6 +46,9 @@ abstract class Connection implements ConnectionInterface
4646 /** @var bool */
4747 protected $ isSecure ;
4848
49+ /** @var bool */
50+ protected $ isConnected ;
51+
4952 /**
5053 * Prepares an FTP connection.
5154 *
@@ -143,6 +146,14 @@ public function isSecure()
143146 return $ this ->isSecure ;
144147 }
145148
149+ /**
150+ * @inheritDoc
151+ */
152+ public function isConnected ()
153+ {
154+ return $ this ->isConnected ;
155+ }
156+
146157 /**
147158 * @inheritDoc
148159 */
Original file line number Diff line number Diff line change @@ -67,4 +67,9 @@ public function getPassword();
6767 * @return bool
6868 */
6969 public function isSecure ();
70+
71+ /**
72+ * @return bool
73+ */
74+ public function isConnected ();
7075}
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ protected function connect()
3333 ?: "FTP connection failed to remote server. " );
3434 }
3535
36- $ this ->isSecure = false ;
36+ $ this ->isConnected = true ;
37+ $ this ->isSecure = false ;
3738
3839 $ this ->wrapper ->setConnection ($ this );
3940
Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ protected function connect()
5050 ?: "SSL connection failed to the FTP server. " );
5151 }
5252
53- $ this ->isSecure = true ;
53+ $ this ->isConnected = true ;
54+ $ this ->isSecure = true ;
5455
5556 $ this ->wrapper ->setConnection ($ this );
5657
You can’t perform that action at this time.
0 commit comments