/** * * @param <type> $page * @return ArrayObject */ public static function getAllPapers($page) { try { self::$totalPapers = self::$controller->totalPapers(); return self::$controller->listAllPapers($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/Paper.php'; require_once '../core/Publication/File.php'; $controller = new PublicationController(new PublicationDao(Connection::connect())); $total = $controller->totalPapers(); $page = 1; if (isset($_GET['page'])) { $page = $_GET['page']; } $pubs = $controller->listAllPapers($page); $hasNews = $pubs->count() > 0; ?> <div id="list-results"> <?if($hasNews):?> <table class="list-publications"> <thead> <tr> <th>Título</th> <th>Link Arquivo</th> <th>Exclusão</th> </tr> </thead> <tfoot> <tr> <td></td><td></td><td></td> </tr> </tfoot>