You are here

class HamlExpandedRenderer in Sassy 7

HamlExpandedRenderer class. Blocks are on single lines and content indented. @package PHamlP @subpackage Haml.renderers

Hierarchy

Expanded class hierarchy of HamlExpandedRenderer

File

phamlp/haml/renderers/HamlExpandedRenderer.php, line 18

View source
class HamlExpandedRenderer extends HamlRenderer {

  /**
   * Renders the opening tag of an element
   */
  public function renderOpeningTag($node) {
    return parent::renderOpeningTag($node) . ($node->whitespaceControl['inner'] ? '' : ($node->isSelfClosing && $node->whitespaceControl['outer'] ? '' : "\n"));
  }

  /**
   * Renders the closing tag of an element
   */
  public function renderClosingTag($node) {
    return $node->isSelfClosing ? '' : parent::renderClosingTag($node) . ($node->whitespaceControl['outer'] ? '' : "\n");
  }

  /**
   * Renders content.
   * @param HamlNode the node being rendered
   * @return string the rendered content
   */
  public function renderContent($node) {
    return self::INDENT . parent::renderContent($node) . "\n";
  }

  /**
   * Renders the start of a code block
   */
  public function renderStartCodeBlock($node) {
    return parent::renderStartCodeBlock($node) . "\n";
  }

  /**
   * Renders the end of a code block
   */
  public function renderEndCodeBlock($node) {
    return parent::renderEndCodeBlock($node) . "\n";
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HamlExpandedRenderer::renderClosingTag public function * Renders the closing tag of an element Overrides HamlRenderer::renderClosingTag
HamlExpandedRenderer::renderContent public function * Renders content. * Overrides HamlRenderer::renderContent
HamlExpandedRenderer::renderEndCodeBlock public function * Renders the end of a code block Overrides HamlRenderer::renderEndCodeBlock
HamlExpandedRenderer::renderOpeningTag public function * Renders the opening tag of an element Overrides HamlRenderer::renderOpeningTag
HamlExpandedRenderer::renderStartCodeBlock public function * Renders the start of a code block Overrides HamlRenderer::renderStartCodeBlock
HamlRenderer::$attrWrapper private property
HamlRenderer::$format private property
HamlRenderer::$minimizedAttributes private property
HamlRenderer::getRenderer public static function * Returns the renderer for the required render style. *
HamlRenderer::INDENT constant
HamlRenderer::renderAttributes private function * Renders element attributes
HamlRenderer::renderCloseComment public function * Renders the closing of a comment 2
HamlRenderer::renderOpenComment public function * Renders the opening of a comment 2
HamlRenderer::STYLE_COMPACT constant
HamlRenderer::STYLE_COMPRESSED constant
HamlRenderer::STYLE_EXPANDED constant
HamlRenderer::STYLE_NESTED constant
HamlRenderer::__construct public function