aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/bookmark/BookmarkServiceInterface.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-10-16 11:50:53 +0200
committerArthurHoaro <arthur@hoa.ro>2020-10-27 19:45:02 +0100
commit36e6d88dbfd753665224664d5214f39ccfbbf6a5 (patch)
tree7a4a8a7ec50d571d0de554cd80bb74750ae24569 /application/bookmark/BookmarkServiceInterface.php
parentc2cd15dac2bfaebe6d32f7649fbdedc07400fa08 (diff)
downloadShaarli-36e6d88dbfd753665224664d5214f39ccfbbf6a5.tar.gz
Shaarli-36e6d88dbfd753665224664d5214f39ccfbbf6a5.tar.zst
Shaarli-36e6d88dbfd753665224664d5214f39ccfbbf6a5.zip
Feature: add weekly and monthly view/RSS feed for daily page
- Heavy refactoring of DailyController - Add a banner like in tag cloud to display monthly and weekly links - Translations: t() now supports variables with optional first letter uppercase Fixes #160
Diffstat (limited to 'application/bookmark/BookmarkServiceInterface.php')
-rw-r--r--application/bookmark/BookmarkServiceInterface.php27
1 files changed, 17 insertions, 10 deletions
diff --git a/application/bookmark/BookmarkServiceInterface.php b/application/bookmark/BookmarkServiceInterface.php
index 9fa61533..08cdbb4e 100644
--- a/application/bookmark/BookmarkServiceInterface.php
+++ b/application/bookmark/BookmarkServiceInterface.php
@@ -156,22 +156,29 @@ interface BookmarkServiceInterface
156 public function bookmarksCountPerTag(array $filteringTags = [], ?string $visibility = null): array; 156 public function bookmarksCountPerTag(array $filteringTags = [], ?string $visibility = null): array;
157 157
158 /** 158 /**
159 * Returns the list of days containing articles (oldest first) 159 * Return a list of bookmark matching provided period of time.
160 * It also update directly previous and next date outside of given period found in the datastore.
160 * 161 *
161 * @return array containing days (in format YYYYMMDD). 162 * @param \DateTimeInterface $from Starting date.
163 * @param \DateTimeInterface $to Ending date.
164 * @param \DateTimeInterface|null $previous (by reference) updated with first created date found before $from.
165 * @param \DateTimeInterface|null $next (by reference) updated with first created date found after $to.
166 *
167 * @return array List of bookmarks matching provided period of time.
162 */ 168 */
163 public function days(): array; 169 public function findByDate(
170 \DateTimeInterface $from,
171 \DateTimeInterface $to,
172 ?\DateTimeInterface &$previous,
173 ?\DateTimeInterface &$next
174 ): array;
164 175
165 /** 176 /**
166 * Returns the list of articles for a given day. 177 * Returns the latest bookmark by creation date.
167 *
168 * @param string $request day to filter. Format: YYYYMMDD.
169 * 178 *
170 * @return Bookmark[] list of shaare found. 179 * @return Bookmark|null Found Bookmark or null if the datastore is empty.
171 *
172 * @throws BookmarkNotFoundException
173 */ 180 */
174 public function filterDay(string $request); 181 public function getLatest(): ?Bookmark;
175 182
176 /** 183 /**
177 * Creates the default database after a fresh install. 184 * Creates the default database after a fresh install.