private function HamlParser::htmlAttrs in Sassy 7
* Returns an array of attributes for the html element. *
Parameters
array arguments for HamlHelpers::html_attrs : * @return array attributes for the html element
1 call to HamlParser::htmlAttrs()
- HamlParser::parseAttributes in phamlp/
haml/ HamlParser.php - * Parse attributes. *
File
- phamlp/
haml/ HamlParser.php, line 982
Class
- HamlParser
- HamlParser class. Parses {@link http://haml-lang.com/ Haml} view files. @package PHamlP @subpackage Haml
Code
private function htmlAttrs($htmlAttrs) {
if (empty($htmlAttrs[1]) && empty($htmlAttrs[2])) {
return HamlHelpers::html_attrs();
}
else {
$htmlAttrs[1] = substr($htmlAttrs[1], 1, -1);
if (substr($htmlAttrs[1], -1) == ';') {
$htmlAttrs[1] = eval("return {$htmlAttrs[1]}");
}
if (isset($htmlAttrs[2])) {
return HamlHelpers::html_attrs($htmlAttrs[1], eval($htmlAttrs[2] . ';'));
}
else {
return HamlHelpers::html_attrs($htmlAttrs[1]);
}
}
}