1 | <?php |
||
23 | class FtpClient extends AbstractFtpClient { |
||
24 | |||
25 | /** |
||
26 | * Constructor. |
||
27 | * |
||
28 | * @param Authenticator $authenticator The authenticator. |
||
29 | */ |
||
30 | public function __construct(Authenticator $authenticator) { |
||
38 | |||
39 | /** |
||
40 | * Close. |
||
41 | * |
||
42 | * @return FtpClient Returns this FTP client. |
||
43 | * @throws FtpException Throws a FTP exception if an error occurs. |
||
44 | */ |
||
45 | public function close() { |
||
53 | |||
54 | /** |
||
55 | * Connect. |
||
56 | * |
||
57 | * @param int $timeout The timeout. |
||
58 | * @return FtpClient Returns this FTP client. |
||
59 | * @throws FtpException Throws a FTP exception if an error occurs. |
||
60 | */ |
||
61 | public function connect($timeout = 90) { |
||
73 | |||
74 | /** |
||
75 | * Delete. |
||
76 | * |
||
77 | * @param string $path The path. |
||
78 | * @return FtpClient Returns this FTP client. |
||
79 | * @throws FtpException Throws a FTP exception if an error occurs. |
||
80 | */ |
||
81 | public function delete($path) { |
||
89 | |||
90 | /** |
||
91 | * Get a file. |
||
92 | * |
||
93 | * @param string $localFile The local file. |
||
94 | * @param string $remoteFile The remote file. |
||
95 | * @return FtpClient Returns this FTP client. |
||
96 | * @throws FtpException Throws a FTP exception if an error occurs. |
||
97 | */ |
||
98 | public function get($localFile, $remoteFile) { |
||
106 | |||
107 | /** |
||
108 | * Login. |
||
109 | * |
||
110 | * @return FtpClient Returns this FTP client. |
||
111 | * @throws FtpException Throws a FTP exception if an error occurs. |
||
112 | */ |
||
113 | public function login() { |
||
124 | |||
125 | /** |
||
126 | * Make a directory. |
||
127 | * |
||
128 | * @param string $directory The directory. |
||
129 | * @return FtpClient Returns this FTP client. |
||
130 | * @throws FtpException Throws a FTP exception if an error occurs. |
||
131 | */ |
||
132 | public function mkdir($directory) { |
||
140 | |||
141 | /** |
||
142 | * Set the passive mode. |
||
143 | * |
||
144 | * @param bool $pasv The passive mode. |
||
145 | * @return FtpClient Returns this FTP client. |
||
146 | * @throws FtpException Throws a FTP exception if an error occurs. |
||
147 | */ |
||
148 | public function pasv($pasv) { |
||
156 | |||
157 | /** |
||
158 | * Put a file. |
||
159 | * |
||
160 | * @param string $localFile The local file. |
||
161 | * @param string $remoteFile The remote file. |
||
162 | * @param int $mode The mode. |
||
163 | * @param int $startPos The start position. |
||
164 | * @return FtpClient Returns this FTP client. |
||
165 | * @throws FtpException Throws a FTP exception if an error occurs. |
||
166 | */ |
||
167 | public function put($localFile, $remoteFile, $mode = FTP_IMAGE, $startPos = 0) { |
||
175 | |||
176 | /** |
||
177 | * Rename. |
||
178 | * |
||
179 | * @param string $oldName The old name. |
||
180 | * @param string $newName The new name. |
||
181 | * @return FtpClient Returns this FTP client. |
||
182 | * @throws FtpException Throws a FTP exception if an error occurs. |
||
183 | */ |
||
184 | public function rename($oldName, $newName) { |
||
192 | |||
193 | /** |
||
194 | * Remove a directory. |
||
195 | * |
||
196 | * @param string $directory The directory. |
||
197 | * @return FtpClient Returns this FTP client. |
||
198 | * @throws FtpException Throws a FTP exception if an error occurs. |
||
199 | */ |
||
200 | public function rmdir($directory) { |
||
208 | } |
||
209 |