You are here

class HamlCssFilter in Sassy 7

CSS Filter for {@link http://haml-lang.com/ Haml} class. Surrounds the filtered text with <style> and CDATA tags. Useful for including inline CSS. @package PHamlP @subpackage Haml.filters

Hierarchy

Expanded class hierarchy of HamlCssFilter

File

phamlp/haml/filters/HamlCssFilter.php, line 19

View source
class HamlCssFilter extends HamlBaseFilter {

  /**
   * Run the filter
   * @param string text to filter
   * @return string filtered text
   */
  public function run($text) {
    return "<style type=\"text/css\">\n/*<![CDATA[*/\n" . preg_replace(HamlParser::MATCH_INTERPOLATION, '<?php echo \\1; ?>', $text) . "/*]]>*/\n</style>\n";
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HamlBaseFilter::init public function * Initialise the filter. 2
HamlCssFilter::run public function * Run the filter * Overrides HamlBaseFilter::run