blob: 4a6906863758a04afde022fef8d86ac1e3ab9def (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
namespace DHTMLX\Connector\Data;
class JSONCommonDataItem extends DataItem{
/*! return self as XML string
*/
function to_xml(){
if ($this->skip) return false;
$data = array(
'id' => $this->get_id()
);
for ($i=0; $i<sizeof($this->config->text); $i++){
$extra = $this->config->text[$i]["name"];
$data[$extra]=$this->data[$extra];
if (is_null($data[$extra]))
$data[$extra] = "";
}
if ($this->userdata !== false)
foreach ($this->userdata as $key => $value){
if ($value === null)
$data[$key]="";
$data[$key]=$value;
}
return $data;
}
}
|