If you this function will be deleted in future php releases you can use this function:
<?
function _call_user_method_array($name, $obj, $params) {
// get params
$txt = "";
foreach($params as $nr => $el) {
$txt.='$params['.$nr."], ";
}
$txt = substr($txt, 0, strlen($txt)-2);
// run it
return eval('return call_user_method($name, $obj, '.$txt.');');
}
?>
Hope this helps somebody.
call_user_method_array
(PHP 4 >= 4.0.5, PHP 5)
call_user_method_array — Вызываем метод объекта с массивом параметров [устаревшее]
Описание
Внимание
Функция call_user_method_array() устарела с выходом 4.1.0: используйте функцию call_user_func_array() с array(&$obj, "method_name") в качестве параметра имени функции.
Вызывает метод method_name объекта obj , с параметрами содержащимися в массиве paramarr .
См. также: call_user_func_array() и call_user_func().
call_user_method_array
leonwinter at gmail dot com
02-Oct-2006 01:45
02-Oct-2006 01:45
