[eluser]Avatar[/eluser]
yes, I understand. I combining this library with smarty and in my project I can't think of any other way but to call module functions. But for that to work there needs to be validation that that function exists in the module instead of spitting out an error call index function. when running this function, I get the error below.
FUNCTION:
Code:
function run($module, $data = '', $method = 'index')
{
$class =& modules::load($module);
if(function_exists($class->$method))
return $class->$method($data);
else
return $class->index($data);
}
ERROR:
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: User::$stuff
Filename: helpers/modules_helper.php
Line Number: 102
it checks for a variable in that module calss but it doesn't exist because it's a function.
and if with previous code function_exists($class->$method($data))
it just calls index, disregarding the function call altogether, kinda. Need professional assistance
TIA;