function(array $cfg)
{
$this->user = $cfg['user'];
$this->pass = $cfg['pass'];
// TODO ho rimpiazzato
//$this->mode = $cfg['mode'] === 'cloudmin' ? 'cloudmin' : 'virtualmin';
$this->mode = $mode;
$this->hostname = isset($cfg['host']) ? $cfg['host'] : 'localhost';
$this->checked = true;
// TODO tolto la cache e this->commands = $this->fetch_commands
}
}