프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |
메소드 | 설명 | |
---|---|---|
__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 | ||
리턴 | SassContext |
public addFunction ( string $name, mixed $function ) : SassFunctionDefinitionNode | ||
$name | string | name of function |
$function | mixed | |
리턴 | SassFunctionDefinitionNode | the function |
public getFunction ( string $name ) : SassFunctionDefinitionNode | ||
$name | string | name of function to return |
리턴 | SassFunctionDefinitionNode | the mixin |
public getVariable ( string $name ) : string | ||
$name | string | name of variable to return |
리턴 | string | the variable |
public hasFunction ( string $name ) : boolean | ||
$name | string | name of function to check for |
리턴 | boolean |
public hasVariable ( string $name ) : boolean | ||
$name | string | name of variable to test |
리턴 | 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 |
리턴 | SassContext |