You are here

public function SassContext::addFunction in Sassy 7.3

Adds a function

Parameters

string name of function:

Return value

SassFunctionDefinitionNode the function

File

phpsass/tree/SassContext.php, line 86

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 addFunction($name, $function) {
  $this->functions[$name] = $function;
  if (!empty($this->parent)) {
    $this->parent
      ->addFunction($name);
  }
  return $this;
}