cvs: pear /HTTP_Download Download.php
| From: | Michael Wallner | Date: | Tue, 19 Jul 2005 10:04:52 +0000 |
| Subject: | cvs: pear /HTTP_Download Download.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-33145@lists.php.net to get a copy of this message | ||
mike Tue Jul 19 06:04:52 2005 EDT
Modified files:
/pear/HTTP_Download Download.php
Log:
- don't even bother about different method signatures in setParams()
http://cvs.php.net/diff.php/pear/HTTP_Download/Download.php?r1=1.72&r2=1.73&ty=u
Index: pear/HTTP_Download/Download.php
diff -u pear/HTTP_Download/Download.php:1.72 pear/HTTP_Download/Download.php:1.73
--- pear/HTTP_Download/Download.php:1.72 Tue Jul 19 05:57:16 2005
+++ pear/HTTP_Download/Download.php Tue Jul 19 06:04:47 2005
@@ -17,7 +17,7 @@
* @author Michael Wallner <mike@php.net>
* @copyright 2003-2005 Michael Wallner
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Download.php,v 1.72 2005/07/19 09:57:16 mike Exp $
+ * @version CVS: $Id: Download.php,v 1.73 2005/07/19 10:04:47 mike Exp $
* @link http://pear.php.net/package/HTTP_Download
*/
@@ -92,7 +92,7 @@
* if you want to send already gzipped data!
*
* @access public
- * @version $Revision: 1.72 $
+ * @version $Revision: 1.73 $
*/
class HTTP_Download
{
@@ -267,6 +267,7 @@
{
foreach((array) $params as $param => $value){
$method = 'set'. $param;
+
if (!method_exists($this, $method)) {
return PEAR::raiseError(
"Method '$method' doesn't exist.",
@@ -274,18 +275,7 @@
);
}
- switch (strToLower($param))
- {
- case 'contentdisposition':
- case 'cachecontrol':
- $e = call_user_func_array(
- array(&$this, $method), (array) $value);
- break;
-
- default:
- $e = $this->$method($value);
- break;
- }
+ $e = call_user_func_array(array(&$this, $method), (array) $value);
if (PEAR::isError($e)) {
return $e;