示例#1
0
 public static function ajaxInfos($request, $context)
 {
     try {
         // On cherche la quantité de tweets publiés après la date de dernier accès
         $count = tweetTable::getCountLastTweets(context::getSessionAttribute("dateAccesAccueil"));
         if (is_null($count)) {
             throw new Exception("Erreur inconnue.");
         } else {
             context::setSessionAttribute("info", $count);
         }
         return context::SUCCESS;
     } catch (Exception $e) {
         context::setSessionAttribute("info", $e);
         return context::SUCCESS;
     }
 }