public function toHTML() { $s = '<div class="rexp vector xt_' . $this->getType() . '">'; $dim = $this->dim(); $n = $this->length(); $s .= '<span class="typename">' . Rserve_Parser::xtName($this->getType()) . '</span>'; $s .= '['; $s .= join(',', $dim); $s .= ']'; $s .= '<div class="values">'; if ($n) { $m = $n > 20 ? 20 : $n; for ($i = 0; $i < $m; ++$i) { $v = $this->values[$i]; if (is_object($v) and $v instanceof Rserve_REXP) { $v = $v->toHTML(); } else { $v = $this->valueToHTML($v); } $s .= '<div class="value">' . $v . '</div>'; } } $s .= '</div>'; $s .= $this->attrToHTML(); $s .= '</div>'; return $s; }
public function toHTML() { $s = '<div class="rexp vector xt_' . $this->getType() . '">'; $n = $this->length(); $s .= '<span class="typename">' . Rserve_Parser::xtName($this->getType()) . '</span> <span class="length">' . $n . '</span>'; $s .= '<div class="values">'; if ($n) { $m = $n > 20 ? 20 : $n; for ($i = 0; $i < $m; ++$i) { $v = $this->values[$i]; if (is_object($v) and $v instanceof Rserve_REXP) { $v = $v->toHTML(); } else { if ($this->isString()) { $v = '"' . (string) $v . '"'; } else { $v = (string) $v; } } $s .= '<div class="value">' . $v . '</div>'; } } $s .= '</div>'; $s .= $this->attrToHTML(); $s .= '</div>'; return $s; }
public function toHTML() { return '<div class="rexp xt_' . $this->getType() . '"><span class="typename">' . Rserve_Parser::xtName($this->getType()) . '</span>' . $this->name . $this->attrToHTML() . '</div>'; }