class HamlRootNode in Sassy 7
HamlRootNode class. Also the root node of a document. @package PHamlP @subpackage Haml.tree
Hierarchy
- class \HamlNode
- class \HamlRootNode
Expanded class hierarchy of HamlRootNode
File
- phamlp/
haml/ tree/ HamlRootNode.php, line 20
View source
class HamlRootNode extends HamlNode {
/**
* @var HamlRenderer the renderer for this node
*/
protected $renderer;
/**
* @var array options
*/
protected $options;
/**
* 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->token = array(
'level' => -1,
);
}
/**
* Render this node.
* @return string the rendered node
*/
public function render() {
foreach ($this->children as $child) {
$this->output .= $child
->render();
}
// foreach
return $this->output;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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. * | |
HamlRootNode:: |
protected | property | * | |
HamlRootNode:: |
protected | property | * | |
HamlRootNode:: |
public | function |
* Render this node.
* Overrides HamlNode:: |
|
HamlRootNode:: |
public | function |
* Root HamlNode constructor.
* Overrides HamlNode:: |