Property | Type | Description | |
---|---|---|---|
$content | tree representing any contextual content. | ||
$functions | mixins defined in this context | ||
$mixins | mixins defined in this context | ||
$node | the node being processed | ||
$parent | enclosing context | ||
$variables | variables defined in this context |
Method | Description | |
---|---|---|
__construct ( $parent = null ) : SassContext | SassContext constructor. | |
addFunction ( string $name, mixed $function ) : SassFunctionDefinitionNode | Adds a function | |
addMixin ( string $name, mixed $mixin ) : SassMixinDefinitionNode | Adds a mixin | |
getContent ( ) | ||
getFunction ( string $name ) : SassFunctionDefinitionNode | Returns a function | |
getMixin ( string $name ) : SassMixinDefinitionNode | Returns a mixin | |
getVariable ( string $name ) : string | Returns a variable defined in this context | |
hasFunction ( string $name ) : boolean | Returns a boolean wether this function exists | |
hasVariable ( string $name ) : boolean | Returns a value indicating if the variable exists in this context | |
merge ( ) | Makes variables and mixins from this context available in the parent context. | |
setVariable ( string $name, sassLiteral $value ) : SassContext | Sets a variable to the given value | |
setVariables ( $vars ) |
public __construct ( $parent = null ) : SassContext | ||
return | SassContext |
public addFunction ( string $name, mixed $function ) : SassFunctionDefinitionNode | ||
$name | string | name of function |
$function | mixed | |
return | SassFunctionDefinitionNode | the function |
public getFunction ( string $name ) : SassFunctionDefinitionNode | ||
$name | string | name of function to return |
return | SassFunctionDefinitionNode | the mixin |
public getVariable ( string $name ) : string | ||
$name | string | name of variable to return |
return | string | the variable |
public hasFunction ( string $name ) : boolean | ||
$name | string | name of function to check for |
return | boolean |
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 |
public merge ( ) |
public setVariable ( string $name, sassLiteral $value ) : SassContext | ||
$name | string | name of variable |
$value | sassLiteral | value of variable |
return | SassContext |