class HamlFilterNode in Sassy 7
HamlFilterNode class. Represent a filter in the Haml source. The filter is run on the output from child nodes when the node is rendered. @package PHamlP @subpackage Haml.tree
Hierarchy
- class \HamlNode
- class \HamlFilterNode
Expanded class hierarchy of HamlFilterNode
File
- phamlp/
haml/ tree/ HamlFilterNode.php, line 19
View source
class HamlFilterNode extends HamlNode {
/**
* @var HamlBaseFilter the filter to run
*/
private $filter;
/**
* HamlFilterNode constructor.
* Sets the filter.
* @param HamlBaseFilter the filter to run
* @return HamlFilterNode
*/
public function __construct($filter, $parent) {
$this->filter = $filter;
$this->parent = $parent;
$this->root = $parent->root;
$parent->children[] = $this;
}
/**
* Render this node.
* The filter is run on the content of child nodes before being returned.
* @return string the rendered node
*/
public function render() {
$output = '';
foreach ($this->children as $child) {
$output .= $child
->getContent();
}
// foreach
return $this
->debug($this->filter
->run($output));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HamlFilterNode:: |
private | property | * | |
HamlFilterNode:: |
public | function |
* Render this node.
* The filter is run on the content of child nodes before being returned.
* Overrides HamlNode:: |
|
HamlFilterNode:: |
public | function |
* HamlFilterNode constructor.
* Sets the filter.
* 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. * |