hasVariable() public method

Returns a value indicating if the variable exists in this context
public hasVariable ( string $name ) : boolean
$name string name of variable to test
return boolean true if the variable exists in this context, false if not
Exemplo n.º 1
0
 /**
  * Parse this node.
  * Sets the variable in the current context.
  * @param SassContext $context the context in which this node is parsed
  * @return array the parsed node - an empty array
  */
 public function parse($context)
 {
     if (!$this->isDefault || !$context->hasVariable($this->name)) {
         $context->setVariable($this->name, $this->evaluate($this->value, $context));
     }
     $this->parseChildren($context);
     // Parse any warnings
     return array();
 }