public function renderReponse()
 {
     $db_touite = new TouiteHandler($this->getBd());
     $db_touitos = new touitosHandler($this->getBd());
     //$auteur = $db_touitos->get($this->id);
     $message = $db_touite->getReponse($this->id);
     if (!empty($message)) {
         foreach ($message as $key => $touite) {
             $auteur = $db_touitos->get($touite->getIdAuteur());
             if ($auteur->getPseudo() != '') {
                 $this->renderC($touite, $auteur);
             }
         }
     }
 }
Exemple #2
0
function displayNews($bd, $offset)
{
    $tth = new TouiteHandler($bd);
    $th = new touitosHandler($bd);
    $touiteList = $tth->gettouitesOfWhoIFollow($_SESSION['id'], $offset * 10);
    foreach ($touiteList as $key => $touite) {
        $tr = new TouiteRender($_SESSION['id'], $bd);
        $auteur = $th->getByAttr("id", $touite->getIdAuteur(), PDO::PARAM_STR);
        $tr->render($touite, $auteur);
    }
    if (empty($touiteList)) {
        return false;
    }
    return true;
}