Returns the properties of the literal as an associative array
For example: array('type' => 'literal', 'value' => 'string value')
array The properties of the literal
public function toArray() {
$array = array(
'type' => 'literal',
'value' => $this->value,
);
if ($this->datatype) {
$array['datatype'] = $this->datatype;
}
if ($this->lang) {
$array['lang'] = $this->lang;
}
return $array;
}