cvs: pear /Benchmark Iterate.php /Cache Function.php /Cache_Lite/Lite Function.php /HTML_OOH_Form/layoutmanager form_layoutmanager.php
| From: | Sterling Hughes | Date: | Wed, 01 Jan 2003 17:49:27 +0000 |
| Subject: | cvs: pear /Benchmark Iterate.php /Cache Function.php /Cache_Lite/Lite Function.php /HTML_OOH_Form/layoutmanager form_layoutmanager.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8026@lists.php.net to get a copy of this message | ||
sterling Wed Jan 1 12:49:27 2003 EDT
Modified files:
/pear/Benchmark Iterate.php
/pear/Cache Function.php
/pear/Cache_Lite/Lite Function.php
/pear/HTML_OOH_Form/layoutmanager form_layoutmanager.php
Log:
Move to usage of call_user_func_array() and call_user_func() as
call_user_method() is depreciated.
Index: pear/Benchmark/Iterate.php
diff -u pear/Benchmark/Iterate.php:1.4 pear/Benchmark/Iterate.php:1.5
--- pear/Benchmark/Iterate.php:1.4 Wed Dec 11 12:14:17 2002
+++ pear/Benchmark/Iterate.php Wed Jan 1 12:49:26 2003
@@ -12,7 +12,7 @@
// | license@php.net so we can mail you a copy immediately. |
// +------------------------------------------------------------------------+
//
-// $Id: Iterate.php,v 1.4 2002/12/11 17:14:17 sebastian Exp $
+// $Id: Iterate.php,v 1.5 2003/01/01 17:49:26 sterling Exp $
//
require_once 'Benchmark/Timer.php';
@@ -67,7 +67,7 @@
* $result = $benchmark->get();
*
* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
-* @version $Revision: 1.4 $
+* @version $Revision: 1.5 $
* @access public
*/
@@ -99,7 +99,7 @@
for ($i = 1; $i <= $iterations; $i++) {
$this->setMarker('start_' . $i);
- call_user_method_array($function_name[1], ${$objectname}, $arguments);
+ call_user_func_array(array(${$objectname}, $function_name[1]), $arguments);
$this->setMarker('end_' . $i);
}
return(0);
Index: pear/Cache/Function.php
diff -u pear/Cache/Function.php:1.4 pear/Cache/Function.php:1.5
--- pear/Cache/Function.php:1.4 Fri Jul 12 13:30:57 2002
+++ pear/Cache/Function.php Wed Jan 1 12:49:26 2003
@@ -15,7 +15,7 @@
// | Authors: Sebastian Bergmann <sb@sebastian-bergmann.de> |
// +----------------------------------------------------------------------+
//
-// $Id: Function.php,v 1.4 2002/07/12 17:30:57 sebastian Exp $
+// $Id: Function.php,v 1.5 2003/01/01 17:49:26 sterling Exp $
require_once 'Cache.php';
@@ -65,7 +65,7 @@
* @module Function_Cache
* @modulegroup Function_Cache
* @package Cache
-* @version $Revision: 1.4 $
+* @version $Revision: 1.5 $
* @access public
*/
class Cache_Function extends Cache {
@@ -129,7 +129,7 @@
if (strstr($target, '::')) {
list($class, $method) = explode('::', $target);
- $result = call_user_method_array($method, $class, $arguments);
+ $result = call_user_func_array(array($class, $method), $arguments);
}
// object->method
@@ -137,7 +137,7 @@
list($object, $method) = explode('->', $target);
global $$object;
- $result = call_user_method_array($method, $$object, $arguments);
+ $result = call_user_func_array(array($$object, $method), $arguments);
}
// function
Index: pear/Cache_Lite/Lite/Function.php
diff -u pear/Cache_Lite/Lite/Function.php:1.1 pear/Cache_Lite/Lite/Function.php:1.2
--- pear/Cache_Lite/Lite/Function.php:1.1 Fri Sep 20 12:12:23 2002
+++ pear/Cache_Lite/Lite/Function.php Wed Jan 1 12:49:27 2003
@@ -11,7 +11,7 @@
* Technical choices are described in the 'docs/technical' file
*
* @package Cache_Lite
-* @version $Id: Function.php,v 1.1 2002/09/20 16:12:23 sebastian Exp $
+* @version $Id: Function.php,v 1.2 2003/01/01 17:49:27 sterling Exp $
* @author Sebastian BERGMANN <sb@sebastian-bergmann.de>
* @author Fabien MARTY <fab@php.net>
*/
@@ -80,13 +80,13 @@
$target = array_shift($arguments);
if (strstr($target, '::')) { // classname::staticMethod
list($class, $method) = explode('::', $target);
- $result = call_user_method_array($method, $class, $arguments);
+ $result = call_user_func_array(array($class, $method), $arguments);
} else if (strstr($target, '->')) { // object->method
// use a stupid name ($objet_123456789 because) of problems when the object
// name is the same as this var name
list($object_123456789, $method) = explode('->', $target);
global $$object_123456789;
- $result = call_user_method_array($method, $$object_123456789, $arguments);
+ $result = call_user_func_array(array($$object_123456789, $method), $arguments);
} else { // function
$result = call_user_func_array($target, $arguments);
}
@@ -102,4 +102,4 @@
}
-?>
\ No newline at end of file
+?>
Index: pear/HTML_OOH_Form/layoutmanager/form_layoutmanager.php
diff -u pear/HTML_OOH_Form/layoutmanager/form_layoutmanager.php:1.6
pear/HTML_OOH_Form/layoutmanager/form_layoutmanager.php:1.7
--- pear/HTML_OOH_Form/layoutmanager/form_layoutmanager.php:1.6 Mon Jun 3 11:16:19 2002
+++ pear/HTML_OOH_Form/layoutmanager/form_layoutmanager.php Wed Jan 1 12:49:27 2003
@@ -16,7 +16,7 @@
// | Authors: Ulf Wendel <ulf.wendel@phpdoc.de> |
// +----------------------------------------------------------------------+
//
-// $Id: form_layoutmanager.php,v 1.6 2002/06/03 15:16:19 uw Exp $
+// $Id: form_layoutmanager.php,v 1.7 2003/01/01 17:49:27 sterling Exp $
#require_once('HTML/IT.php');
@@ -26,7 +26,7 @@
* Needs PHP 4.0.5+
*
* @access public
-* @version $Id: form_layoutmanager.php,v 1.6 2002/06/03 15:16:19 uw Exp $
+* @version $Id: form_layoutmanager.php,v 1.7 2003/01/01 17:49:27 sterling Exp $
*/
class layoutmanager {
@@ -109,7 +109,7 @@
/**
- * Wrapper for call_user_method() and call_user_method_array
+ * Wrapper for call_user_func() and call_user_func_array()
*
* @param string method
* @param object mixed
@@ -121,9 +121,9 @@
$params = array($params);
if (is_array($params))
- return call_user_method_array($method, $obj, $params);
+ return call_user_func_array(array(&$obj, $method), $params);
else
- return call_user_method($method, $obj);
+ return call_user_func(array(&$obj, $method));
} // end func callMethod
@@ -147,4 +147,4 @@
} // end class form_layoutmanager
-?>
\ No newline at end of file
+?>