} /**
* Renders a cell that extends the BaseCell class.
*/
final protected function renderCell(BaseCell
$instance, string
$method, array
$params): string
{ // Only allow public properties to be set, or protected/private
// properties that have a method to get them (get<Foo>Property())
$publicProperties =
$instance->
getPublicProperties();
$privateProperties =
array_column($instance->
getNonPublicProperties(), 'name'
);
$publicParams =
array_intersect_key($params,
$publicProperties);
foreach ($params as $key =>
$value) { $getter = 'get' .
ucfirst($key) . 'Property';
if (in_array($key,
$privateProperties, true
) &&
method_exists($instance,
$getter)) { $publicParams[$key] =
$value;
} } // Fill in any public properties that were passed in
// but only ones that are in the $pulibcProperties array.