class HamlCommentNode in Sassy 7
HamlCommentNode class. Represents a comment, including MSIE conditional comments. @package PHamlP @subpackage Haml.tree
Hierarchy
- class \HamlNode
- class \HamlCommentNode
Expanded class hierarchy of HamlCommentNode
File
- phamlp/
haml/ tree/ HamlCommentNode.php, line 18
View source
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();
}
// foreach
$output .= $this->renderer
->renderCloseComment($this);
return $this
->debug($output);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HamlCommentNode:: |
private | property | ||
HamlCommentNode:: |
public | function | ||
HamlCommentNode:: |
public | function |
Overrides HamlNode:: |
|
HamlCommentNode:: |
public | function |
Overrides HamlNode:: |
|
HamlNode:: |
protected | property | * | |
HamlNode:: |
public | property | * | |
HamlNode:: |
protected | property | * | |
HamlNode:: |
protected | property | * | |
HamlNode:: |
protected | property | * | |
HamlNode:: |
public | property | * | |
HamlNode:: |
public | property | * | |
HamlNode:: |
public | property | * | |
HamlNode:: |
private | property | * | |
HamlNode:: |
private | property | * | |
HamlNode:: |
protected | function | ||
HamlNode:: |
public | function | * Returns the node's children * | |
HamlNode:: |
public | function | * Returns the node's content and that of its child nodes * | |
HamlNode:: |
private | function | * Returns the filename for this node * | |
HamlNode:: |
public | function | * Returns the last child node of this node. * | |
HamlNode:: |
private | function | * Returns the indent level of this node. * | |
HamlNode:: |
private | function | * Returns the source for this node * | |
HamlNode:: |
public | function | * Returns the options. * | |
HamlNode:: |
public | function | * Returns the node's parent * | |
HamlNode:: |
public | function | * Returns the renderer. * | |
HamlNode:: |
private | function | * Returns the source for this node * | |
HamlNode:: |
public | function | * Returns a value indicating if this node has children * | |
HamlNode:: |
public | function | * Return a value indicating if this node has a parent * | |
HamlNode:: |
private | function | * Sets the indent level of this node. * Used during rendering to give correct indentation. * | |
HamlNode:: |
protected | function | * Adds a comment with source debug information for the current line to the output. * The debug information is: * + source file (relative to the application path) * + line number * + indent level * + source code * | |
HamlNode:: |
public | function | * Getter. * | |
HamlNode:: |
public | function | * Setter. * |