You are here

public function SassLiteral::toBoolean in Sassy 7

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

* Returns the boolean representation of the value of this *

Return value

boolean the boolean representation of the value of this

4 calls to SassLiteral::toBoolean()
SassLiteral::op_and in phamlp/sass/script/literals/SassLiteral.php
* The SassScript and operation. *
SassLiteral::op_not in phamlp/sass/script/literals/SassLiteral.php
* The SassScript not operation. *
SassLiteral::op_or in phamlp/sass/script/literals/SassLiteral.php
* The SassScript or operation. *
SassLiteral::op_xor in phamlp/sass/script/literals/SassLiteral.php
* The SassScript xor operation. *

File

phamlp/sass/script/literals/SassLiteral.php, line 71

Class

SassLiteral
SassLiteral class. Base class for all Sass literals. Sass data types are extended from this class and these override the operation methods to provide the appropriate semantics. @package PHamlP @subpackage Sass.script.literals

Code

public function toBoolean() {
  return (bool) $this->value || $this->value === null;
}