API16

JHtml/call

< API16:JHtml

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

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


Advertisement