class HamlScssFilter 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 \HamlScssFilter
Expanded class hierarchy of HamlScssFilter
File
- phamlp/
haml/ filters/ HamlScssFilter.php, line 24
View source
class HamlScssFilter extends HamlBaseFilter {
/**
* Run the filter
* @param string text to filter
* @return string filtered text
*/
public function run($text) {
$sass = new SassParser(array(
'syntax' => 'scss',
));
$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 |
HamlScssFilter:: |
public | function |
* Run the filter
* Overrides HamlBaseFilter:: |