1 | <?php |
||
5 | class SFTP implements ConnectionInterface, ResourceTransferInterface |
||
6 | { |
||
7 | /** |
||
8 | * Connection instance |
||
9 | * |
||
10 | * @var $connection |
||
11 | */ |
||
12 | private $connection; |
||
13 | |||
14 | /** |
||
15 | * Established sftp resource |
||
16 | * |
||
17 | * @var $sftp |
||
18 | */ |
||
19 | private $sftp; |
||
20 | |||
21 | /** |
||
22 | * @inheritdoc |
||
23 | */ |
||
24 | public function connect($host, $port) |
||
28 | |||
29 | /** |
||
30 | * @inheritdoc |
||
31 | */ |
||
32 | public function login($username, $password = null) |
||
40 | |||
41 | /** |
||
42 | * @inheritdoc |
||
43 | */ |
||
44 | public function loginWithKey($username, $pubkeyfile, $privkeyfile, $passphrase = null) |
||
52 | |||
53 | /** |
||
54 | * @inheritdoc |
||
55 | */ |
||
56 | public function fetchFrom($remoteFile, $localFile) |
||
64 | |||
65 | /** |
||
66 | * @inheritdoc |
||
67 | */ |
||
68 | public function sendTo($localFile, $remoteFile) |
||
81 | |||
82 | /** |
||
83 | * @inheritdoc |
||
84 | */ |
||
85 | public function getRemoteFilesList($dir) |
||
100 | |||
101 | /** |
||
102 | * @inheritdoc |
||
103 | */ |
||
104 | public function disconnect() |
||
109 | } |
||
110 |