diff options
Diffstat (limited to 'application/bookmark/BookmarkServiceInterface.php')
-rw-r--r-- | application/bookmark/BookmarkServiceInterface.php | 27 |
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. |