public function SassContext::hasFunction in Sassy 7.3
Returns a boolean wether this function exists
Parameters
string name of function to check for:
Return value
boolean
1 call to SassContext::hasFunction()
- SassContext::getFunction in phpsass/
tree/ SassContext.php - Returns a function
File
- phpsass/
tree/ SassContext.php, line 112
Class
- SassContext
- SassContext class. Defines the context that the parser is operating in and so allows variables to be scoped. A new context is created for Mixins and imported files. @package PHamlP @subpackage Sass.tree
Code
public function hasFunction($name) {
if (isset($this->functions[$name])) {
return $this->functions[$name];
}
else {
if (!empty($this->parent)) {
return $this->parent
->hasFunction($name);
}
}
return FALSE;
}