<? if (!isset($this->foo)): ?>
No object model passed
<? else: 
    $vars = get_object_vars($this->foo);
    foreach ($vars as $key => $value): ?>
<?= $key ?>: <?= $value ?>
<?  endforeach;
endif ?>



