PHP Class SassIfNode

Represents Sass If, Else If and Else statements. Else If and Else statement nodes are chained below the If statement node.
Inheritance: extends SassNode
Show file Open project: richthegeek/phpsass Class Usage Examples

Public Methods

Method Description
__construct ( object $token, boolean $if = true ) : SassIfNode SassIfNode constructor.
addElse ( $node ) : SassIfNode Adds an "else" statement to this node.
parse ( SassContext $context ) : array Parse this node.

Private Methods

Method Description
isElse ( ) : true Returns a value indicating if this node is an "else" node.

Method Details

__construct() public method

SassIfNode constructor.
public __construct ( object $token, boolean $if = true ) : SassIfNode
$token object source token
$if boolean true for an "if" node, false for an "else if | else" node
return SassIfNode

addElse() public method

Adds an "else" statement to this node.
public addElse ( $node ) : SassIfNode
return SassIfNode this node

parse() public method

Parse this node.
public parse ( SassContext $context ) : array
$context SassContext the context in which this node is parsed
return array parsed child nodes