You are here

public function HamlNode::getContent in Sassy 7

* Returns the node's content and that of its child nodes *

Parameters

integer the indent level. This is to allow properly indented output: * that filters (e.g. Sass) may need. * @return string the node's content and that of its child nodes

File

phamlp/haml/tree/HamlNode.php, line 121

Class

HamlNode
HamlNode class. Base class for all Haml nodes. @package PHamlP @subpackage Haml.tree

Code

public function getContent($indentLevel = 0) {
  $output = str_repeat(' ', 2 * $indentLevel++) . $this->content . "\n";
  foreach ($this->children as $child) {
    $output .= $child
      ->getContent($indentLevel);
  }

  // foreach
  return $output;
}