HamlCommentNode.php in Sassy 7
File
phamlp/haml/tree/HamlCommentNode.php
View source
<?php
class HamlCommentNode extends HamlNode {
private $isConditional;
public function __construct($content, $parent) {
$this->content = $content;
$this->isConditional = (bool) preg_match('/^\\[.+\\]$/', $content, $matches);
$this->parent = $parent;
$this->root = $parent->root;
$parent->children[] = $this;
}
public function getIsConditional() {
return $this->isConditional;
}
public function render() {
$output = $this->renderer
->renderOpenComment($this);
foreach ($this->children as $child) {
$output .= $child
->render();
}
$output .= $this->renderer
->renderCloseComment($this);
return $this
->debug($output);
}
}
Classes
Name |
Description |
HamlCommentNode |
HamlCommentNode class.
Represents a comment, including MSIE conditional comments.
@package PHamlP
@subpackage Haml.tree |