You are here

public function EasyRdf_Literal_Boolean::isTrue in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Boolean.php \EasyRdf_Literal_Boolean::isTrue()

Return true if the value of the literal is 'true' or '1'

Return value

bool

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Boolean.php, line 80

Class

EasyRdf_Literal_Boolean
Class that represents an RDF Literal of datatype xsd:boolean

Code

public function isTrue() {
  return strtolower($this->value) === 'true' or $this->value === '1';
}