send function sends the command to the oxD server.
103 $jsondata = json_encode($this->
getData(), JSON_UNESCAPED_SLASHES);
105 $lenght = strlen($jsondata);
107 return array(
'status'=>
false,
'message'=>
'Sorry .Problem with oxd.');
109 $lenght = $lenght <= 999 ?
"0" . $lenght : $lenght;
113 if($this->response_json !=
'Can not connect to oxd server'){
114 $this->response_json = str_replace(substr($this->response_json, 0, 4),
"", $this->response_json);
115 if ($this->response_json) {
116 $object = json_decode($this->response_json);
117 if ($object->status ==
'error') {
118 if($object->data->error ==
"invalid_op_host"){
119 return array(
'status'=>
false,
'message'=> $object->data->error);
120 }elseif($object->data->error ==
"internal_error"){
121 return array(
'status'=>
false,
'message'=> $object->data->error ,
'error_message'=>$object->data->error_description);
123 return array(
'status'=>
false,
'message'=> $object->data->error .
' : ' . $object->data->error_description);
125 } elseif ($object->status ==
'ok') {
126 $this->response_object = json_decode($this->response_json);
127 return array(
'status'=>
true);
131 return array(
'status'=>
false,
'message'=>
'Can not connect to the oxd server. Please check the oxd-config.json file to make sure you have entered the correct port and the oxd server is operational.');
getData()
Definition: ClientOXDRP.php:153
oxd_socket_request($data, $char_count=8192)
Definition: ClientOXDRP.php:80