@@ -25,22 +25,38 @@ private function __construct(ConnectionInterface $connection)
25
25
*
26
26
* @return ConnectionInterface
27
27
*/
28
- public static function init ($ user , $ password , $ host , Protocol $ type )
28
+ public static function init ($ user , $ password , $ host , Protocol $ type, array $ options = [] )
29
29
{
30
30
switch ($ type ) {
31
31
case Protocol::FTP :
32
32
return new self (new FtpServiceConnection (
33
- $ user , $ password , $ host
33
+ $ user , $ password , $ host, $ options
34
34
));
35
35
break ;
36
36
case Protocol::SSH :
37
37
return new self (new SFtpServiceConnection (
38
- $ user , $ password , $ host
38
+ $ user , $ password , $ host, $ options
39
39
));
40
40
break ;
41
41
}
42
42
}
43
43
44
+ /**
45
+ * instance of new TransferConnector
46
+ * @param string $key
47
+ * @param string $secret
48
+ * @param string $region
49
+ * @param array $options
50
+ *
51
+ * @return ConnectionInterface
52
+ */
53
+ public static function initS3 ($ key , $ secret , $ region , $ options = [])
54
+ {
55
+ return new self (new AwsServiceConnection (
56
+ $ key , $ secret , $ region , $ options
57
+ ));
58
+ }
59
+
44
60
/**
45
61
* Get the value of command
46
62
*
0 commit comments