cvs: pear /Net_FTP2/Net/FTP2 Driver.php
| From: | Tobias Schlitt | Date: | Mon, 17 Jan 2005 19:49:37 +0000 |
| Subject: | cvs: pear /Net_FTP2/Net/FTP2 Driver.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-28635@lists.php.net to get a copy of this message | ||
toby Mon Jan 17 14:49:37 2005 EDT
Modified files:
/pear/Net_FTP2/Net/FTP2 Driver.php
Log:
* Added docs on throwen errors.
http://cvs.php.net/diff.php/pear/Net_FTP2/Net/FTP2/Driver.php?r1=1.2&r2=1.3&ty=u Index: pear/Net_FTP2/Net/FTP2/Driver.php diff -u pear/Net_FTP2/Net/FTP2/Driver.php:1.2 pear/Net_FTP2/Net/FTP2/Driver.php:1.3 --- pear/Net_FTP2/Net/FTP2/Driver.php:1.2 Mon Jan 17 14:27:14 2005 +++ pear/Net_FTP2/Net/FTP2/Driver.php Mon Jan 17 14:49:36 2005 @@ -14,7 +14,7 @@ // | Authors: Tobias Schlitt <toby@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Driver.php,v 1.2 2005/01/17 19:27:14 toby Exp $ +// $Id: Driver.php,v 1.3 2005/01/17 19:49:36 toby Exp $ define('NET_FTP2_ERROR_METHODENOTIMPLEMENTED_CODE', -1); define('NET_FTP2_ERROR_METHODENOTIMPLEMENTED_TEXT', 'This method is not implemented, yet.'); @@ -115,6 +115,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param int $filesize @@ -151,6 +152,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $directory @@ -169,6 +171,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param int $mode @@ -188,6 +191,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @return boolean True on success, otherwise false. @@ -205,6 +209,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $host The host to connect to. * @param int $port The port to connect to. @@ -225,6 +230,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $path The path for the file to delete. * @access public @@ -243,6 +249,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $command The command to execute. * @access public @@ -261,6 +268,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param resource $handle Local file handler to write to. * @param string $remote_file Path to the remote file to download. @@ -282,6 +290,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $remote_file Path to the remote file to upload to. * @param resource $handle Local file handler to upload. @@ -303,6 +312,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $local Local file path to write to. * @param string $remote_file Path to the remote file to download. @@ -324,6 +334,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $remote_file Path to the remote file to upload to. * @param string $local_file Local file to upload. @@ -345,6 +356,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $username The username. * @param string $password The password. @@ -364,6 +376,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $remote_file Path to the remote file. * @access public @@ -382,6 +395,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $directory Path for the directory to create. * @access public @@ -400,6 +414,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @return int Returns FTP_FAILED or FTP_FINISHED or FTP_MOREDATA. @@ -417,6 +432,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param resource $handle Local file handler to write to. @@ -439,6 +455,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $remote_file Path to the remote file to upload to. * @param string $local_file Local file to upload. @@ -460,6 +477,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $local_file Local file path to write to. * @param string $remote_file Path to the remote file to download. @@ -481,6 +499,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $remote_file Path to the remote file to upload to. * @param resource $local_file Local file to upload. @@ -502,6 +521,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $directory The directory to list files from. * @access public @@ -520,6 +540,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param bool $pasv True to turn on pasv mode, false to turn off. * @access public @@ -538,6 +559,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @return mixed String the current directory or false on error. @@ -555,6 +577,7 @@ * This is one of the functions provided by extFTP, which must not be implemented by a driver since it's an alias to ftp_close('..'). * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @return bool True on success, otherwise false. @@ -572,6 +595,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $directory The directory to list files from. @@ -590,6 +614,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $from The file to rename. @@ -609,6 +634,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $directory The directory to remove. @@ -627,6 +653,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $cmd The command to send. @@ -645,6 +672,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $remote_file File to determine the size of. @@ -663,6 +691,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $host The host to connect to. @@ -683,6 +712,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @return mixed String, the remote system type, or false on error.
http://cvs.php.net/diff.php/pear/Net_FTP2/Net/FTP2/Driver.php?r1=1.2&r2=1.3&ty=u Index: pear/Net_FTP2/Net/FTP2/Driver.php diff -u pear/Net_FTP2/Net/FTP2/Driver.php:1.2 pear/Net_FTP2/Net/FTP2/Driver.php:1.3 --- pear/Net_FTP2/Net/FTP2/Driver.php:1.2 Mon Jan 17 14:27:14 2005 +++ pear/Net_FTP2/Net/FTP2/Driver.php Mon Jan 17 14:49:36 2005 @@ -14,7 +14,7 @@ // | Authors: Tobias Schlitt <toby@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Driver.php,v 1.2 2005/01/17 19:27:14 toby Exp $ +// $Id: Driver.php,v 1.3 2005/01/17 19:49:36 toby Exp $ define('NET_FTP2_ERROR_METHODENOTIMPLEMENTED_CODE', -1); define('NET_FTP2_ERROR_METHODENOTIMPLEMENTED_TEXT', 'This method is not implemented, yet.'); @@ -115,6 +115,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param int $filesize @@ -151,6 +152,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $directory @@ -169,6 +171,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param int $mode @@ -188,6 +191,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @return boolean True on success, otherwise false. @@ -205,6 +209,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $host The host to connect to. * @param int $port The port to connect to. @@ -225,6 +230,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $path The path for the file to delete. * @access public @@ -243,6 +249,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $command The command to execute. * @access public @@ -261,6 +268,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param resource $handle Local file handler to write to. * @param string $remote_file Path to the remote file to download. @@ -282,6 +290,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $remote_file Path to the remote file to upload to. * @param resource $handle Local file handler to upload. @@ -303,6 +312,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $local Local file path to write to. * @param string $remote_file Path to the remote file to download. @@ -324,6 +334,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $remote_file Path to the remote file to upload to. * @param string $local_file Local file to upload. @@ -345,6 +356,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $username The username. * @param string $password The password. @@ -364,6 +376,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $remote_file Path to the remote file. * @access public @@ -382,6 +395,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $directory Path for the directory to create. * @access public @@ -400,6 +414,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @return int Returns FTP_FAILED or FTP_FINISHED or FTP_MOREDATA. @@ -417,6 +432,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param resource $handle Local file handler to write to. @@ -439,6 +455,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $remote_file Path to the remote file to upload to. * @param string $local_file Local file to upload. @@ -460,6 +477,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $local_file Local file path to write to. * @param string $remote_file Path to the remote file to download. @@ -481,6 +499,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $remote_file Path to the remote file to upload to. * @param resource $local_file Local file to upload. @@ -502,6 +521,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param string $directory The directory to list files from. * @access public @@ -520,6 +540,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @param bool $pasv True to turn on pasv mode, false to turn off. * @access public @@ -538,6 +559,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @return mixed String the current directory or false on error. @@ -555,6 +577,7 @@ * This is one of the functions provided by extFTP, which must not be implemented by a driver since it's an alias to ftp_close('..'). * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @return bool True on success, otherwise false. @@ -572,6 +595,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $directory The directory to list files from. @@ -590,6 +614,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $from The file to rename. @@ -609,6 +634,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $directory The directory to remove. @@ -627,6 +653,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $cmd The command to send. @@ -645,6 +672,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $remote_file File to determine the size of. @@ -663,6 +691,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @param string $host The host to connect to. @@ -683,6 +712,7 @@ * This is one of the functions provided by extFTP, which should be implemented by a driver. * * @abstract + * @throws PEAR_Error(NET_FTP2_ERROR_METHODNOTIMPLEMENTED_CODE) * @since 0.1 * @access public * @return mixed String, the remote system type, or false on error.