/** * Iterate and output properties and attriibutes * @todo return a string instead of outputting directly * @todo use XSLT from XML output to decorate */ public function toHtml() { $iterator = new \ArrayIterator((array) $this); echo "<br/>"; while ($iterator->valid()) { $value = $iterator->current(); $key = $iterator->key(); echo \MIMAS\Service\Jorum\Formatters\Html::get($key, $value); $iterator->next(); } echo "<br/>"; }
/** * Write out as HTML * @todo return a string instead and echo elsewhere */ public function toHtml() { $iterator = new \ArrayIterator((array) $this); echo "<div style=\"padding-left: 16px\">"; $itemLink = ''; while ($iterator->valid()) { $value = $iterator->current(); $key = $iterator->key(); if (strpos($key, 'link') !== false) { $itemLink = $value; } echo \MIMAS\Service\Jorum\Formatters\Html::get($key, $value, $itemLink); $iterator->next(); } echo "</div>"; }