1 | <?php |
||
21 | class Ftp extends Xtp |
||
22 | { |
||
23 | use Clearable; |
||
24 | |||
25 | /** |
||
26 | * FTP connection stream |
||
27 | * |
||
28 | * @var resource |
||
29 | */ |
||
30 | protected $ftpConnection; |
||
31 | |||
32 | /** |
||
33 | * Determine should ftp connects via passive mode. |
||
34 | * |
||
35 | * @var bool |
||
36 | */ |
||
37 | protected $passive; |
||
38 | |||
39 | /** |
||
40 | * Setup the Ftp sync. |
||
41 | * |
||
42 | * @param array $config |
||
43 | * @throws \phpbu\App\Backup\Sync\Exception |
||
44 | * @throws \phpbu\App\Exception |
||
45 | */ |
||
46 | 6 | public function setup(array $config) |
|
60 | |||
61 | /** |
||
62 | * Check for required loaded libraries or extensions. |
||
63 | * |
||
64 | * @throws \phpbu\App\Backup\Sync\Exception |
||
65 | */ |
||
66 | 4 | protected function checkRequirements() |
|
72 | |||
73 | /** |
||
74 | * Return implemented (*)TP protocol name. |
||
75 | * |
||
76 | * @return string |
||
77 | */ |
||
78 | 1 | protected function getProtocolName() |
|
82 | |||
83 | /** |
||
84 | * (non-PHPDoc) |
||
85 | * |
||
86 | * @see \phpbu\App\Backup\Sync::sync() |
||
87 | * @param \phpbu\App\Backup\Target $target |
||
88 | * @param \phpbu\App\Result $result |
||
89 | * @throws \phpbu\App\Backup\Sync\Exception |
||
90 | */ |
||
91 | public function sync(Target $target, Result $result) |
||
146 | |||
147 | /** |
||
148 | * Creates collector for FTP |
||
149 | * |
||
150 | * @param \phpbu\App\Backup\Target $target |
||
151 | * @return \phpbu\App\Backup\Collector |
||
152 | */ |
||
153 | protected function createCollector(Target $target): Collector |
||
157 | } |
||
158 |