final protected function renderSimpleClass($instance, string
$method, array
$params, string
$class): string
{ // Try to match up the parameter list we were provided
// with the parameter name in the callback method.
$refMethod =
new ReflectionMethod($instance,
$method);
$paramCount =
$refMethod->
getNumberOfParameters();
$refParams =
$refMethod->
getParameters();
if ($paramCount === 0
) { if (!
empty($params)) { throw ViewException::
forMissingCellParameters($class,
$method);
} $output =
$instance->
{$method}();
} elseif (($paramCount === 1
) && ((!
array_key_exists($refParams[0
]->name,
$params)) || (array_key_exists($refParams[0
]->name,
$params) &&
count($params) !== 1
)) ) { $output =
$instance->
{$method}($params);
} else { $fireArgs =
[];