API16:JHtml/call
From Joomla! Documentation
Description
Function caller method
<! removed transcluded page call, red link never existed >
Syntax
static call($function, $args)
| Parameter Name | Default Value | Description |
|---|---|---|
| $function | Function or method to call | |
| $args | Arguments to be passed to function |
Defined in
libraries/joomla/html/html.php
Importing
jimport( 'joomla.html.html' );
Source Body
private static function call($function, $args)
{
if (is_callable($function))
{
// PHP 5.3 workaround
$temp = array();
foreach ($args AS &$arg) {
$temp[] = &$arg;
}
return call_user_func_array($function, $temp);
}
else {
JError::raiseError(500, 'Function not supported.');
return false;
}
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples