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) { |
||
37 | |||
38 | /** |
||
39 | * Closes this FTP connection. |
||
40 | * |
||
41 | * @return FTPClient Returns this FTP client. |
||
42 | * @throws FTPException Throws a FTP exception if an I/O error occurs. |
||
43 | */ |
||
44 | public function close() { |
||
50 | |||
51 | /** |
||
52 | * Opens this FTP connection. |
||
53 | * |
||
54 | * @param integer $timeout The timeout. |
||
55 | * @return FTPClient Returns this FTP client. |
||
56 | * @throws FTPException Throws a FTP exception if an I/O error occurs. |
||
57 | */ |
||
58 | public function connect($timeout = 90) { |
||
67 | |||
68 | /** |
||
69 | * Deletes a file on the FTP server. |
||
70 | * |
||
71 | * @param string $path The file to delete. |
||
72 | * @return FTPClient Returns this FTP client. |
||
73 | * @throws FTPException Throws a FTP exception if an I/O error occurs. |
||
74 | */ |
||
75 | public function delete($path) { |
||
81 | |||
82 | /** |
||
83 | * Logs in to this FTP connection. |
||
84 | * |
||
85 | * @return FTPClient Returns this FTP client. |
||
86 | * @throws FTPException Throws a FTP exception if an I/O error occurs. |
||
87 | */ |
||
88 | public function login() { |
||
96 | |||
97 | /** |
||
98 | * Tuns passive mode on or off. |
||
99 | * |
||
100 | * @param boolean $pasv The passive mode. |
||
101 | * @return FTPClient Returns this FTP client. |
||
102 | * @throws FTPException Throws a FTP exception if an I/O error occurs. |
||
103 | */ |
||
104 | public function pasv($pasv) { |
||
110 | |||
111 | /** |
||
112 | * Uploads a file to The FTP server. |
||
113 | * |
||
114 | * @param string $localFile The local file. |
||
115 | * @param string $remoteFile The remote file. |
||
116 | * @param integer $mode The mode. |
||
117 | * @param integer $startPos The start position. |
||
118 | * @return FTPClient Returns this FTP client. |
||
119 | * @throws FTPException Throws a FTP exception if an I/O error occurs. |
||
120 | */ |
||
121 | public function put($localFile, $remoteFile, $mode = FTP_IMAGE, $startPos = 0) { |
||
127 | |||
128 | /** |
||
129 | * Creates a directory. |
||
130 | * |
||
131 | * @param string $directory The directory. |
||
132 | * @return FTPClient Returns this FTP client. |
||
133 | * @throws FTPException Throws a FTP exception if an I/O error occurs. |
||
134 | */ |
||
135 | public function mkdir($directory) { |
||
141 | |||
142 | /** |
||
143 | * Renames a file or a directory on the FTP server. |
||
144 | * |
||
145 | * @param string $oldName The old file/directory name. |
||
146 | * @param string $newName The new name. |
||
147 | * @return FTPClient Returns this FTP client. |
||
148 | * @throws FTPException Throws a FTP exception if an I/O error occurs. |
||
149 | */ |
||
150 | public function rename($oldName, $newName) { |
||
156 | |||
157 | /** |
||
158 | * Removes a directory. |
||
159 | * |
||
160 | * @param string $directory The directory. |
||
161 | * @return FTPClient Returns this FTP client. |
||
162 | * @throws FTPException Throws a FTP exception if an I/O error occurs. |
||
163 | */ |
||
164 | public function rmdir($directory) { |
||
170 | |||
171 | } |
||
172 |