Exemple #1
0
	public function render()
	{
		$this->nodeName = strtolower($this->nodeName);

		parent::render();

		if (isset($this->id))
			$this->setAttr('id', $this->id);

		if (!$this->doctype && !empty($this->ownerDocument))
			$this->doctype = $this->ownerDocument->doctype;

		$emptyContent = self::isEmptyContent($this->content);
		$short = $this->shortTag && $emptyContent && $this->determineTagEnd();
		$result = $this->renderTagStart($short);

		if ($short)
			return $this->debugify($result);

		if ($emptyContent) {
			if ($this->endTagAllowed)
				return $this->debugify(rtrim($result) . ltrim($this->renderTagEnd()));
			else
				return $this->debugify($result);
		}

		$result .= $this->renderContent();
		if ($this->endTagAllowed)
			$result .= $this->renderTagEnd();

		return $this->debugify($result);
	}
Exemple #2
0
	function render()
	{
		if (!$this->allowIndent)
			$this->indentCount--;
		parent::render();
		return $this->renderItem($this->content);
	}