public function toHTML() { parent::fetch(); $uri = parent::getBaseURI(); $element = parent::getElement(); $this->attributes = $element->attributes; $this->totalLines = $this->attributes->totalLines; $this->lines = $this->attributes->lines; $paragraphs = "<div>"; $paragraphs .= "<span>"; foreach ($this->lines as $line) { $currentLine = $line; $paragraphs .= $currentLine; /* if ($currentLine == "BREAK") { $paragraphs .= "</span>"; $paragraphs .= "<br/>"; $paragraphs = "<span>"; } else { $paragraphs .= $currentLine; } */ } $paragraphs .= "</span>"; $paragraphs .= "</div>"; $returnHTML = "<div>"; $returnHTML .= $paragraphs; //$returnHTML .= print_r($this->lines,true); $returnHTML .= "</div>"; return $returnHTML; }
public function toHTML() { parent::fetch(); $element = parent::getElement(); $this->attributes = $element->attributes; $this->pixpath = $this->attributes->pixpath; $returnHTML = "<div>"; $returnHTML .= "<img src='"; $returnHTML .= $this->pixpath; $returnHTML .= "'/>"; //$returnHTML .= print_r($this->attributes,true); $returnHTML .= "</div>"; return $returnHTML; }
public function toHTML() { parent::fetch(); $element = parent::getElement(); $this->attributes = $element->attributes; $this->headline = $this->attributes->Headline; $this->isItalic = $this->attributes->italic; $this->fontSize = $this->attributes->Fontsize; $returnHTML = "<div style='>"; $returnHTML .= "font-size:"; $returnHTML .= $this->fontSize; $returnHTML .= ";color:black;font-weight:bold;"; if ($this->isItalic) { $returnHTML .= "font-style:italic;"; } else { $returnHTML .= "font-style:normal;"; } $returnHTML .= "'>"; $returnHTML .= $this->headline; //$returnHTML .= print_r($this->attributes,true); $returnHTML .= "</div>"; return $returnHTML; }