You are here

public function SassContext::hasVariable in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/tree/SassContext.php \SassContext::hasVariable()

* Returns a value indicating if the variable exists in this context *

Parameters

string name of variable to test: * @return boolean true if the variable exists in this context, false if not

File

phamlp/sass/tree/SassContext.php, line 99

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 hasVariable($name) {
  $name = str_replace('-', '_', $name);
  return isset($this->variables[$name]);
}