Class that represents an RDF Literal
Located in /EasyRdf/Literal.php (line 46)
Class | Description |
---|---|
EasyRdf_Literal_Boolean | Class that represents an RDF Literal of datatype xsd:boolean |
EasyRdf_Literal_Date | Class that represents an RDF Literal of datatype xsd:date |
EasyRdf_Literal_Decimal | Class that represents an RDF Literal of datatype xsd:decimal |
EasyRdf_Literal_HexBinary | Class that represents an RDF Literal of datatype xsd:hexBinary |
EasyRdf_Literal_Integer | Class that represents an RDF Literal of datatype xsd:integer |
Create a new literal object
PHP values of type bool, int or float, will automatically be converted to the corresponding datatype and PHP sub-class.
If a registered datatype is given, then the registered subclass of EasyRdf_Literal will instantiated.
Note that literals are not required to have a language or datatype. Literals cannot have both a language and a datatype.
Remove the mapping between an RDF datatype and a PHP class name
Get datatype URI for a PHP value.
This static function is intended for internal use. Given a PHP value, it will return an XSD datatype URI for that value, for example: http://www.w3.org/2001/XMLSchema#integer
Register an RDF datatype with a PHP class name
When parsing registered class will be used whenever the datatype is seen.
When serialising a registered class, the mapping will be used to set the datatype in the RDF.
Example: EasyRdf_Literal::registerDatatype('xsd:dateTime', 'My_DateTime_Class');
Constructor for creating a new literal
Return pretty-print view of the literal
Returns the shortened datatype URI of the literal.
Returns the full datatype URI of the literal.
Returns the language of the literal.
Returns the value of the literal.
Returns the properties of the literal as an associative array
For example: array('type' => 'literal', 'value' => 'string value')
Magic method to return the value of a literal as a string
Documentation generated on Wed, 16 Jan 2013 19:16:38 +0000 by phpDocumentor 1.4.4