protected function setUpParams($name = '', $requestId = null, $data = null, $listData = '', $itemData = '')
{
$params = [];
if (!is_null($this->locale)) {
$params['locale'] = $this->locale;
}
if (!is_null($this->DDversion)) {
$params['version'] = $this->DDversion;
}
if (!$this->appendId($requestId) && $this->dataById($name)) {
$params['dataById'] = 'true';
}
if (!is_null($data)) {
if ($this->appendId($requestId)) {
if (is_array($data) && !empty($data)) {
$data = implode(",", $data);
}
$params[$itemData] = $data;
} else {
if (is_array($data) && !empty($data)) {
$data = implode(",", $data);
}
$params[$listData] = $data;
}
}
return $params;
}