You are here

public static function SassNumber::isa in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/script/literals/SassNumber.php \SassNumber::isa()

* Returns a value indicating if a token of this type can be matched at * the start of the subject string. *

Parameters

string the subject string: * @return mixed match at the start of the string or false if no match

Overrides SassLiteral::isa

1 call to SassNumber::isa()
SassScriptLexer::lex in phamlp/sass/script/SassScriptLexer.php
* Lex an expression into SassScript tokens. *

File

phamlp/sass/script/literals/SassNumber.php, line 512

Class

SassNumber
SassNumber class. Provides operations and type testing for Sass numbers. Units are of the passed value are converted the those of the class value if it has units. e.g. 2cm + 20mm = 4cm while 2 + 20mm =…

Code

public static function isa($subject) {
  return preg_match(self::MATCH, $subject, $matches) ? $matches[0] : false;
}