You are here

class SassRenderer in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/renderers/SassRenderer.php \SassRenderer

SassRenderer class. @package PHamlP @subpackage Sass.renderers

Hierarchy

Expanded class hierarchy of SassRenderer

File

phamlp/sass/renderers/SassRenderer.php, line 22

View source
class SassRenderer {

  /**#@+
   * Output Styles
   */
  const STYLE_COMPRESSED = 'compressed';
  const STYLE_COMPACT = 'compact';
  const STYLE_EXPANDED = 'expanded';
  const STYLE_NESTED = 'nested';

  /**#@-*/
  const INDENT = '  ';

  /**
   * Returns the renderer for the required render style.
   * @param string render style
   * @return SassRenderer
   */
  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
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SassRenderer::getRenderer public static function * Returns the renderer for the required render style. *
SassRenderer::INDENT constant
SassRenderer::STYLE_COMPACT constant
SassRenderer::STYLE_COMPRESSED constant
SassRenderer::STYLE_EXPANDED constant
SassRenderer::STYLE_NESTED constant