public function cpanel($module, $function, $username, $params = array())
    {
        $action = 'cpanel';
        $params = array_merge($params, [
            'cpanel_jsonapi_version' => 2,
            'cpanel_jsonapi_module' => $module,
            'cpanel_jsonapi_func' => $function,
            'cpanel_jsonapi_user' => $username,
        ]);

        $response = $this->runQuery($action, $params);
        return $response;
    }
public function cpanel($module, $function, $username, $params = array())
    {
        $action = 'cpanel';
        $params = array_merge($params, [
            'cpanel_jsonapi_version' => 2,
            'cpanel_jsonapi_module' => $module,
            'cpanel_jsonapi_func' => $function,
            'cpanel_jsonapi_user' => $username,
        ]);

        $response = $this->runQuery($action, $params);
        return $response;
    }
public function cpanel ( $ module , $ function , $ username , $ params = array ( ) ) { $ action = 'cpanel' ; $ params = array_merge ( $ params , [ 'cpanel_jsonapi_version' => 2 , 'cpanel_jsonapi_module' => $ module , 'cpanel_jsonapi_func' => $ function , 'cpanel_jsonapi_user' => $ username , ] ) ; $ response = $ this -> runQuery ( $ action , $ params ) ; return $ response ; }
Use a cPanel API

@param $module
@param $function
@param $username
@param array $params
@return mixed
@throws \Exception
Use a cPanel API