public function lastmod($id = null) { $app = \App::getInstance(); $conn = $app->DB_CONNECT; $sth = $conn->prepare("SELECT UNIX_TIMESTAMP(`updated`) as `lastmod` FROM `resources` ORDER BY `updated` DESC LIMIT 0,1;"); $sth->execute(array()); $row = $sth->fetch(); $em = new \Archive\Port\Adaptor\Persistence\PDO\LinkEntityManager(); return max($row["lastmod"], $em->lastmod($id)); }