\SassString
SassString class.
Provides operations and type testing for Sass strings.
Synopsis
class SassString
extends SassLiteral
{
- // constants
- const MATCH = '/^(((["\'])(.*?)(\3))|(-[a-zA-Z-]+[^\s]*?))/i';
- const _MATCH = '/^(["\'])(.*?)(\1)?$/';
- const VALUE = 2;
- const QUOTE = 3;
- // members
- public $quote;
- // methods
- public SassString __construct()
- public sassString op_plus()
- public sassString op_times()
- public void toBoolean()
- public string getValue()
- public string toString()
- public void toVar()
- public void getTypeOf()
- public static mixed isa()
- // Inherited methods from SassLiteral
- public SassLiteral __construct()
- public mixed __get()
- public void __toString()
- public boolean toBoolean()
- public string getTypeOf()
- public mixed getValue()
- public void getChildren()
- public void addChild()
- public sassString op_plus()
- public sassString op_minus()
- public sassString op_times()
- public sassString op_div()
- public SassLiteral op_modulo()
- public string op_bw_and()
- public string op_bw_or()
- public string op_bw_xor()
- public string op_bw_not()
- public string op_shiftl()
- public string op_shiftr()
- public SassLiteral op_and()
- public SassLiteral op_or()
- public void op_assign()
- public SassBoolean op_xor()
- public SassBoolean op_not()
- public SassBoolean op_gt()
- public SassBoolean op_gte()
- public SassBoolean op_lt()
- public SassBoolean op_lte()
- public SassBoolean op_eq()
- public SassBoolean op_neq()
- public sassString op_concat()
- public sassString op_comma()
- public static void assertType()
- public static void assertInRange()
- public abstract string toString()
- public void render()
- public static mixed isa()
Hierarchy
Extends
Constants
Name | Value |
---|---|
MATCH | '/^(((["\'])(.*?)(\3))|(-[a-zA-Z-]+[^\s]*?))/i' |
_MATCH | '/^(["\'])(.*?)(\1)?$/' |
VALUE | 2 |
QUOTE | 3 |
Members
public
- $quote — string
- $typeOf — array
- $value — mixed
Methods
public
- __construct() — class constructor
- getTypeOf()
- getValue() — Returns the value of this string.
- isa() — Returns a value indicating if a token of this type can be matched at the start of the subject string.
- op_plus() — String addition.
- op_times() — String multiplication.
- toBoolean() — Evaluates the value as a boolean.
- toString() — Returns a string representation of the value.
- toVar()
Inherited from SassLiteral
public
- __get() — Getter.
- __toString()
- addChild() — Adds a child object to this.
- assertInRange() — Asserts that the value of a literal is within the expected range
- assertType() — Asserts that the literal is the expected type
- getChildren()
- getTypeOf() — Returns the type of this
- getValue() — Returns the value of this
- isa() — Returns a value indicating if a token of this type can be matched at the start of the subject string.
- op_and() — The SassScript and operation.
- op_assign()
- op_bw_and() — Bitwise AND the value of other and this value
- op_bw_not() — Bitwise NOT the value of other and the value of this
- op_bw_or() — Bitwise OR the value of other and this value
- op_bw_xor() — Bitwise XOR the value of other and the value of this
- op_comma() — SassScript ',' operation.
- op_concat() — The SassScript default operation (e.g. $a $b, "foo" "bar").
- op_div() — SassScript '/' operation.
- op_eq() — The SassScript == operation.
- op_gt() — The SassScript > operation.
- op_gte() — The SassScript >= operation.
- op_lt() — The SassScript < operation.
- op_lte() — The SassScript <= operation.
- op_minus() — SassScript '-' operation.
- op_modulo() — SassScript '%' operation.
- op_neq() — The SassScript != operation.
- op_not() — The SassScript not operation.
- op_or() — The SassScript or operation.
- op_plus() — SassScript '+' operation.
- op_shiftl() — Shifts the value of this left by the number of bits given in value
- op_shiftr() — Shifts the value of this right by the number of bits given in value
- op_times() — SassScript '*' operation.
- op_xor() — The SassScript xor operation.
- render()
- toBoolean() — Returns the boolean representation of the value of this
- toString() — Returns a string representation of the value.