Returns a value indicating if the variable exists in this context
public hasVariable ( string $name ) : boolean | ||
$name | string | name of variable to test |
Résultat | boolean | true if the variable exists in this context, false if not |
/** * 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(); }