public static function getAllAnalysis($page) { try { self::$totalAnalysis = self::$controller->totalAnalysis(); return self::$controller->listAllAnalysis($page); } catch (PDOException $exception) { echo $exception->getMessage(); } }
<?php require_once '../core/Publication/PublicationController.php'; require_once '../core/Publication/PublicationDao.php'; require_once '../core/Publication/Publication.php'; require_once '../core/Publication/Analyse.php'; require_once '../core/Publication/CommentDao.php'; require_once '../core/Publication/Comment.php'; $controller = new PublicationController(new PublicationDao(Connection::connect())); $total = $controller->totalAnalysis(); $page = 1; if (isset($_GET['page'])) { $page = $_GET['page']; } $pubs = $controller->listAllAnalysis($page); $hasNews = $pubs->count() > 0; ?> <?if($hasNews):?> <table class="list-publications"> <thead> <tr> <th>Título</th> <th>Link</th> <th>Exclusão</th> </tr> </thead> <tfoot> <tr> <td></td><td></td><td></td> </tr> </tfoot>