mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-14 12:26:51 +00:00
Allow calling call() with any number of arguments
This commit is contained in:
+5
-2
@@ -117,10 +117,13 @@ class Curl
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function call($function)
|
||||
public function call()
|
||||
{
|
||||
$args = func_get_args();
|
||||
$function = array_shift($args);
|
||||
if (is_callable($function)) {
|
||||
call_user_func_array($function, array($this));
|
||||
array_unshift($args, $this);
|
||||
call_user_func_array($function, $args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user