You are here

public static function HamlRenderer::getRenderer in Sassy 7

* Returns the renderer for the required render style. *

Parameters

string render style: * @return HamlRenderer

1 call to HamlRenderer::getRenderer()
HamlRootNode::__construct in phamlp/haml/tree/HamlRootNode.php
* Root HamlNode constructor. *

File

phamlp/haml/renderers/HamlRenderer.php, line 45

Class

HamlRenderer
HamlRenderer class. Provides the most common version of each method. Child classs override methods to provide style specific rendering. @package PHamlP @subpackage Haml.renderers

Code

public static function getRenderer($style, $options) {
  switch ($style) {
    case self::STYLE_COMPACT:
      return new HamlCompactRenderer($options);
    case self::STYLE_COMPRESSED:
      return new HamlCompressedRenderer($options);
    case self::STYLE_EXPANDED:
      return new HamlExpandedRenderer($options);
    case self::STYLE_NESTED:
      return new HamlNestedRenderer($options);
  }

  // switch
}