public static function executeComponentFunction(string $nameOrId, string $function, $arguments = array())
    {
        $module = self::getComponentClassInstance($nameOrId);
        
        if (method_exists($module, $function)) {
            $tag = new TemplateTag((array)$arguments);
            return $module->$function($tag);
        }
    }
public static function executeComponentFunction(string $nameOrId, string $function, $arguments = array())
    {
        $module = self::getComponentClassInstance($nameOrId);
        
        if (method_exists($module, $function)) {
            $tag = new TemplateTag((array)$arguments);
            return $module->$function($tag);
        }
    }
public static function executeComponentFunction ( string $ nameOrId , string $ function , $ arguments = array ( ) ) { $ module = self :: getComponentClassInstance ( $ nameOrId ) ; if ( method_exists ( $ module , $ function ) ) { $ tag = new TemplateTag ( ( array ) $ arguments ) ; return $ module -> $ function ( $ tag ) ; } }
Execute a function inside a component.

@param string $nameOrId
Name or id of the component containing the function to execute.

@param string $function
Name of the function to execute.

@param array $arguments
[optional]
Arguments to supply to the function to execute.

@return mixed Result of the executed function.
Execute a function inside a component .