From c4d5be53c2ae503c00da3cfe6b28d0ce9d2ca7f5 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 17 May 2020 14:16:32 +0200 Subject: Process Daily RSS feed through Slim controller The daily RSS template has been entirely rewritten to handle the whole feed through the template engine. --- application/bookmark/Bookmark.php | 15 ++++++++------- application/bookmark/BookmarkFileService.php | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'application/bookmark') diff --git a/application/bookmark/Bookmark.php b/application/bookmark/Bookmark.php index 83ddab82..90ff5b16 100644 --- a/application/bookmark/Bookmark.php +++ b/application/bookmark/Bookmark.php @@ -3,6 +3,7 @@ namespace Shaarli\Bookmark; use DateTime; +use DateTimeInterface; use Shaarli\Bookmark\Exception\InvalidBookmarkException; /** @@ -42,10 +43,10 @@ class Bookmark /** @var bool Set to true if the bookmark is set as sticky */ protected $sticky; - /** @var DateTime Creation datetime */ + /** @var DateTimeInterface Creation datetime */ protected $created; - /** @var DateTime Update datetime */ + /** @var DateTimeInterface datetime */ protected $updated; /** @var bool True if the bookmark can only be seen while logged in */ @@ -100,7 +101,7 @@ class Bookmark || ! is_int($this->id) || empty($this->shortUrl) || empty($this->created) - || ! $this->created instanceof DateTime + || ! $this->created instanceof DateTimeInterface ) { throw new InvalidBookmarkException($this); } @@ -188,7 +189,7 @@ class Bookmark /** * Get the Created. * - * @return DateTime + * @return DateTimeInterface */ public function getCreated() { @@ -198,7 +199,7 @@ class Bookmark /** * Get the Updated. * - * @return DateTime + * @return DateTimeInterface */ public function getUpdated() { @@ -270,7 +271,7 @@ class Bookmark * Set the Created. * Note: you shouldn't set this manually except for special cases (like bookmark import) * - * @param DateTime $created + * @param DateTimeInterface $created * * @return Bookmark */ @@ -284,7 +285,7 @@ class Bookmark /** * Set the Updated. * - * @param DateTime $updated + * @param DateTimeInterface $updated * * @return Bookmark */ diff --git a/application/bookmark/BookmarkFileService.php b/application/bookmark/BookmarkFileService.php index 3b3812af..7439d8d8 100644 --- a/application/bookmark/BookmarkFileService.php +++ b/application/bookmark/BookmarkFileService.php @@ -53,7 +53,7 @@ class BookmarkFileService implements BookmarkServiceInterface { $this->conf = $conf; $this->history = $history; - $this->pageCacheManager = new PageCacheManager($this->conf->get('resource.page_cache')); + $this->pageCacheManager = new PageCacheManager($this->conf->get('resource.page_cache'), $isLoggedIn); $this->bookmarksIO = new BookmarkIO($this->conf); $this->isLoggedIn = $isLoggedIn; -- cgit v1.2.3