From faabc462d3080cac67687f450135a078731fb3d1 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 1 Feb 2025 10:02:14 +0200 Subject: feat: Rework models methods to be more object-oriented where applicable --- models/user.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'models/user.php') diff --git a/models/user.php b/models/user.php index eff2c3e..04f5a83 100644 --- a/models/user.php +++ b/models/user.php @@ -31,7 +31,19 @@ class User extends Table { ); } - static function get_all() : array { - return Table::_get_all("Users", "Database\User"); + function archives() : array { + return Table::_get_all( + 'Webpages', + 'Database\Webpage', + "WHERE RequesterUID = \"$this->UID\" ORDER BY Date DESC" + ); + } + + function archiveLists() : array { + return Table::_get_all( + 'ArchiveLists', + 'Database\ArchiveList', + "WHERE AuthorUID = \"$this->UID\"" + ); } } -- cgit v1.2.3