class HamlSassFilter in Sassy 7
{@link Sass http://sass-lang.com/} Filter for {@link http://haml-lang.com/ Haml} class. Parses the text as Sass then calls the CSS filter. Useful for including inline Sass. @package PHamlP @subpackage Haml.filters
Hierarchy
- class \HamlBaseFilter
- class \HamlSassFilter
Expanded class hierarchy of HamlSassFilter
File
- phamlp/
haml/ filters/ HamlSassFilter.php, line 24
View source
class HamlSassFilter extends HamlBaseFilter {
/**
* Run the filter
* @param string text to filter
* @return string filtered text
*/
public function run($text) {
$sass = new SassParser();
$css = new HamlCssFilter();
$css
->init();
return $css
->run($sass
->toCss(preg_replace(HamlParser::MATCH_INTERPOLATION, '<?php echo \\1; ?>', $text), false));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HamlBaseFilter:: |
public | function | * Initialise the filter. | 2 |
HamlSassFilter:: |
public | function |
* Run the filter
* Overrides HamlBaseFilter:: |