You are here

public static function SassRenderer::getRenderer in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/renderers/SassRenderer.php \SassRenderer::getRenderer()

Returns the renderer for the required render style.

Parameters

string render style:

Return value

SassRenderer

1 call to SassRenderer::getRenderer()
SassRootNode::__construct in phpsass/tree/SassRootNode.php
Root SassNode constructor.

File

phpsass/renderers/SassRenderer.php, line 39

Class

SassRenderer
SassRenderer class. @package PHamlP @subpackage Sass.renderers

Code

public static function getRenderer($style) {
  switch ($style) {
    case self::STYLE_COMPACT:
      return new SassCompactRenderer();
    case self::STYLE_COMPRESSED:
      return new SassCompressedRenderer();
    case self::STYLE_EXPANDED:
      return new SassExpandedRenderer();
    case self::STYLE_NESTED:
      return new SassNestedRenderer();
  }

  // switch
}