示例#1
0
 /**
  * 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);
 }
示例#2
0
 /**
  * Renders the end of a code block
  */
 public function renderEndCodeBlock($node)
 {
     return parent::renderEndCodeBlock($node) . "\n";
 }
示例#3
0
 /**
  * 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 ? '' : ' ');
 }
示例#5
0
 /**
  * Renders the closing of a comment.
  * Only conditional comments are rendered
  */
 public function renderCloseComment($node)
 {
     if ($node->isConditional) {
         return parent::renderCloseComment($node);
     }
 }