You are here

public function SassContext::hasVariable in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/tree/SassContext.php \SassContext::hasVariable()

Returns a value indicating if the variable exists in this context

Parameters

string name of variable to test:

Return value

boolean true if the variable exists in this context, false if not

1 call to SassContext::hasVariable()
SassContext::getVariable in phpsass/tree/SassContext.php
Returns a variable defined in this context

File

phpsass/tree/SassContext.php, line 147

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]);
}