コード例 #1
0
ファイル: HamlRootNode.php プロジェクト: rgigger/zinc
 /**
  * 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
ファイル: HamlExpandedRenderer.php プロジェクト: quanict/giaF
 /**
  * Renders the end of a code block
  */
 public function renderEndCodeBlock($node)
 {
     return parent::renderEndCodeBlock($node) . "\n";
 }
コード例 #3
0
ファイル: HamlNestedRenderer.php プロジェクト: rgigger/zinc
 /**
  * Renders the end of a code block
  */
 public function renderEndCodeBlock($node)
 {
     return $this->getIndent($node) . parent::renderEndCodeBlock($node) . "\n";
 }
コード例 #4
0
 /**
  * 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);
     }
 }