public function SassContext::getMixin in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/tree/SassContext.php \SassContext::getMixin()
* Returns a mixin *
Parameters
string name of mixin to return: * @return SassMixinDefinitionNode the mixin * @throws SassContextException if mixin not defined in this context
File
- phamlp/
sass/ tree/ SassContext.php, line 63
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 getMixin($name) {
if (isset($this->mixins[$name])) {
return $this->mixins[$name];
}
elseif (!empty($this->parent)) {
return $this->parent
->getMixin($name);
}
throw new SassContextException('Undefined {what}: {name}', array(
'{what}' => 'Mixin',
'{name}' => $name,
), $this->node);
}