summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_html.class')
-rw-r--r--it_html.class9
1 files changed, 4 insertions, 5 deletions
diff --git a/it_html.class b/it_html.class
index 1ce8b86..057c410 100644
--- a/it_html.class
+++ b/it_html.class
@@ -113,7 +113,7 @@ function __construct($p = array())
foreach (array_keys($this->alltags) as $func)
{
if (!function_exists($func) && $func)
- $code[$func] = "function $func() { \$args = func_get_args(); return \$GLOBALS['{$this->p['name']}']->_tag('$func', \$args); }";
+ $code[$func] = "function $func(...\$args) { return \$GLOBALS['{$this->p['name']}']->_tag('$func', \$args); }";
else if ($this->p['error_on_redefine'])
it::error("Trying to redefine existing function '$func' in it_html");
}
@@ -122,14 +122,14 @@ function __construct($p = array())
foreach (get_class_methods(get_class($this)) as $func)
{
if (!preg_match('/^_/', $func) && !is_a($this, $func) && $func && !function_exists($func) && !$notexported[$func])
- $code[$func] = "function $func() { \$args = func_get_args(); return \$GLOBALS['{$this->p['name']}']->$func(\$args); }";
+ $code[$func] = "function $func(...\$args) { return \$GLOBALS['{$this->p['name']}']->$func(\$args); }";
}
# Create global functions for methods that are statically callable (have same arguments as global stubs)
foreach (explode(',', $this->p['staticallycallable']) as $func)
{
if ($func && !function_exists($func))
- $code[$func] = "function $func() { \$args = func_get_args(); return call_user_func_array(array(&\$GLOBALS['{$this->p['name']}'], '$func'), \$args); }";
+ $code[$func] = "function $func(...\$args) { return call_user_func_array(array(&\$GLOBALS['{$this->p['name']}'], '$func'), \$args); }";
}
eval(implode('', (array)$code));
@@ -492,9 +492,8 @@ static function Q($string)
* Build a complete url from base-url and params
* @param ... scalar args and numeric indices build base-url, rest as params
*/
-static function U(/* ... */)
+static function U(...$args)
{
- $args = func_get_args();
list($base, $params) = it_parse_args($args);
if (!isset($base))