attributes(); $this->name = $name; $this->view = isset($attributes['view']) ? trim($attributes['view']) : ''; $this->quirks = trim($attributes['quirks']); $this->preferedHeight = isset($attributes['prefered_height']) ? trim($attributes['prefered_height']) : ''; $this->preferedWidth = isset($attributes['prefered_width']) ? trim($attributes['prefered_width']) : ''; if (empty($this->quirks)) { $this->quirks = true; } else { $this->quirks = false; } if (strtolower(trim($attributes['type'])) == 'url') { if (empty($attributes['href'])) { throw new SpecParserException("Malformed href value"); } $this->type = 'URL'; $this->href = trim($attributes['href']); } else { $this->type = 'HTML'; } } public function getName() { return $this->name; } public function getType() { return $this->type; } public function getHref() { return $this->href; } public function getQuirks() { return $this->quirks; } public function getContent() { return $this->content; } public function getView() { return $this->view; } public function addContent($data) { $this->content .= $data; } public function getRewrittenContent() { return $this->rewrittenContent; } public function setRewrittenContent($rewrittenContent) { $this->rewrittenContent = $rewrittenContent; } }