public function SassNumber::op_lte in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/script/literals/SassNumber.php \SassNumber::op_lte()
The SassScript <= operation.
Parameters
sassLiteral the value to compare to this:
Return value
SassBoolean SassBoolean object with the value true if the values of this is less than or equal to the value of other, false if it is not
Overrides SassLiteral::op_lte
File
- phpsass/
script/ literals/ SassNumber.php, line 263
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 = 22mm. @package PHamlP @subpackage …
Code
public function op_lte($other) {
if (!$other instanceof SassNumber) {
throw new SassNumberException('Number must be a number', SassScriptParser::$context->node);
}
return new SassBoolean($this->value <= $this
->convert($other)->value);
}