Exemplo n.º 1
0
Arquivo: Feeds.php Projeto: etu/0bRSS
 public function delete($feedId)
 {
     $feed = $this->feedsDao->getFeeds($_SESSION['user']['id'], $feedId)->fetch();
     if (false !== $feed) {
         try {
             $this->feedsDao->delete($feed->id);
         } catch (\Exception $e) {
         }
         return;
     }
     $this->slim->response->setStatus(403);
 }
Exemplo n.º 2
0
 /**
  * Get all articles from feed by feedId, use ?previousId to get articles older
  * than the choosen article ID.
  */
 public function get($feedId)
 {
     $previousId = $this->slim->request->get('previousId', null);
     $read = $this->slim->request->get('read', null);
     $feed = $this->feedsDao->getFeeds($_SESSION['user']['id'], $feedId)->fetch();
     if (false !== $feed) {
         $articles = $this->articlesDao->getPagedArticles($feedId, $previousId, $read)->fetchAll();
         echo json_encode($articles);
         exit;
     }
     $this->slim->response->setStatus(403);
 }
Exemplo n.º 3
0
Arquivo: Index.php Projeto: etu/0bRSS
 public function get()
 {
     $this->slim->render('layout.twig', ['feeds' => $this->feedsDao->getFeeds($_SESSION['user']['id'])->fetchAll()]);
 }