PHP Class SassString

Provides operations and type testing for Sass strings.
Inheritance: extends SassLiteral
Show file Open project: richthegeek/phpsass Class Usage Examples

Public Properties

Property Type Description
$quote string quote type; double or single quotes, or unquoted.

Public Methods

Method Description
__construct ( $value ) : SassString class constructor
getTypeOf ( )
getValue ( ) : string Returns the value of this string.
isa ( $subject ) : mixed Returns a value indicating if a token of this type can be matched at the start of the subject string.
op_eq ( $other ) Equals - works better
op_plus ( $other ) : sassString String addition.
op_times ( sassNumber $other ) : sassString String multiplication.
toBoolean ( ) Evaluates the value as a boolean.
toString ( ) : string Returns a string representation of the value.
toVar ( )

Method Details

__construct() public method

class constructor
public __construct ( $value ) : SassString
return SassString

getTypeOf() public method

public getTypeOf ( )

getValue() public method

Returns the value of this string.
public getValue ( ) : string
return string the string

isa() public static method

Returns a value indicating if a token of this type can be matched at the start of the subject string.
public static isa ( $subject ) : mixed
return mixed match at the start of the string or false if no match

op_eq() public method

Equals - works better
public op_eq ( $other )

op_plus() public method

Concatenates this and other. The resulting string will be quoted in the same way as this.
public op_plus ( $other ) : sassString
return sassString the string result

op_times() public method

this is repeated other times
public op_times ( sassNumber $other ) : sassString
$other sassNumber the number of times to repeat this
return sassString the string result

toBoolean() public method

Evaluates the value as a boolean.
public toBoolean ( )

toString() public method

Returns a string representation of the value.
public toString ( ) : string
return string string representation of the value.

toVar() public method

public toVar ( )

Property Details

$quote public property

string quote type; double or single quotes, or unquoted.
public $quote