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
- class \HamlBaseFilter
- class \HamlCssFilter
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HamlBaseFilter:: |
public | function | * Initialise the filter. | 2 |
HamlCssFilter:: |
public | function |
* Run the filter
* Overrides HamlBaseFilter:: |