* * @return string The value of the literal */ public function __toString() { return isset($this->value) ? $this->value : ''; } /** Return pretty-print view of the literal * * @param string $format Either 'html' or 'text' * @param string $color The colour of the text * * @return string */ public function dumpValue($format = 'html', $color = 'black') { return Utils::dumpLiteralValue($this, $format, $color); } } /* Register default set of datatype classes */ Literal::setDatatypeMapping('xsd:boolean', 'EasyRdf\\Literal\\Boolean'); Literal::setDatatypeMapping('xsd:date', 'EasyRdf\\Literal\\Date'); Literal::setDatatypeMapping('xsd:dateTime', 'EasyRdf\\Literal\\DateTime'); Literal::setDatatypeMapping('xsd:decimal', 'EasyRdf\\Literal\\Decimal'); Literal::setDatatypeMapping('xsd:hexBinary', 'EasyRdf\\Literal\\HexBinary'); Literal::setDatatypeMapping('rdf:HTML', 'EasyRdf\\Literal\\HTML'); Literal::setDatatypeMapping('xsd:integer', 'EasyRdf\\Literal\\Integer'); Literal::setDatatypeMapping('rdf:XMLLiteral', 'EasyRdf\\Literal\\XML');