You are here

public function SassContext::getFunction in Sassy 7.3

Returns a function

Parameters

string name of function to return:

Return value

SassFunctionDefinitionNode the mixin

Throws

SassContextException if function not defined in this context

File

phpsass/tree/SassContext.php, line 100

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 getFunction($name) {
  if ($fn = $this
    ->hasFunction($name)) {
    return $fn;
  }
  throw new SassContextException('Undefined Function: ' . $name, $this->node);
}