/** * Root HamlNode constructor. * @param array options for the tree * @return HamlNode */ public function __construct($options) { $this->root = $this; $this->options = $options; $this->renderer = HamlRenderer::getRenderer($this->options['style'], array('format' => $this->options['format'], 'attrWrapper' => $this->options['attrWrapper'], 'minimizedAttributes' => $this->options['minimizedAttributes'])); $this->line = array('indentLevel' => -1); }
/** * Renders the end of a code block */ public function renderEndCodeBlock($node) { return parent::renderEndCodeBlock($node) . "\n"; }
/** * Renders the end of a code block */ public function renderEndCodeBlock($node) { return $this->getIndent($node) . parent::renderEndCodeBlock($node) . "\n"; }
/** * Renders the closing tag of an element */ public function renderClosingTag($node) { return parent::renderClosingTag($node) . ($node->isBlock ? '' : ' '); }
/** * Renders the closing of a comment. * Only conditional comments are rendered */ public function renderCloseComment($node) { if ($node->isConditional) { return parent::renderCloseComment($node); } }