private function lessc::getVal in Less CSS Preprocessor 6
Same name and namespace in other branches
- 6.3 lessphp/lessc.inc.php \lessc::getVal()
3 calls to lessc::getVal()
File
- ./
lessc.inc.php, line 1001
Class
Code
private function getVal($name, $skip = 0, $default = array(
'keyword',
'',
)) {
$val = $this
->get($name);
if ($val == null) {
return $default;
}
$tmp = $this->env;
while (!isset($tmp[count($tmp) - 1][$name])) {
array_pop($tmp);
}
while ($skip > 0) {
$skip--;
if (!empty($val)) {
array_pop($val);
}
if (empty($val)) {
array_pop($tmp);
$val = $this
->get($name, $tmp);
}
if (empty($val)) {
return $default;
}
}
return end($val);
}