Se il tuo problema è che ad un
non ti stampa nulla, il motivo è che hai sbagliato a valorizzare le proprietà della classe User appunto. Nei vari setter sostituisciCodice PHP:
echo $user->getNome();
conCodice PHP:
$nome = $nameUser;
Inoltre, tu haiCodice PHP:
$this->$nome = $nameUser;
ma getDataFromDb($name) ti restituisce a sua volta un oggetto UserCodice PHP:
$user = new User();
$user = $interaction->getDataFromDb($name);
![]()