예제 #1
0
 /**
  * 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/>";
 }
예제 #2
0
파일: JorumApi.php 프로젝트: pdiveris/mimas
 /**
  * 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>";
 }