diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2021-10-13 21:51:07 +0100 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2021-10-13 21:51:07 +0100 |
| commit | cbaedbc5251f3b127bd81242d1344c0cd3e56e0c (patch) | |
| tree | f76273742992d8f06983fd5d6fef37efc85a2c07 /src/DTS/BookmarkRepository.php | |
| parent | 2ab5661583d74b03c86bb4f437616bb634d9c4fc (diff) | |
Implemente redirects
Diffstat (limited to 'src/DTS/BookmarkRepository.php')
| -rw-r--r-- | src/DTS/BookmarkRepository.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/DTS/BookmarkRepository.php b/src/DTS/BookmarkRepository.php index 5d22100..a3fd5dd 100644 --- a/src/DTS/BookmarkRepository.php +++ b/src/DTS/BookmarkRepository.php @@ -128,14 +128,16 @@ class BookmarkRepository implements \Iterator } while (($data = fgetcsv($fp)) !== FALSE) { - $this->repository[] = new Bookmark( - $data[0], // Id. - $data[1], // Url. - $data[2], // Title. - $data[3], // Tag. - $data[4], // Added At. - (bool)$data[4], // Read. - ); + $bookmark = new Bookmark(); + + $bookmark->id = $data[0]; + $bookmark->url = $data[1]; + $bookmark->title = $data[2]; + $bookmark->tag = $data[3]; + $bookmark->addedAt = $data[4]; + $bookmark->unread = (bool)$data[5]; + + $this->repository[] = $bookmark; } fclose($fp); |
