Website Summary Files Commits Branches @commit @diff @stats
path: root / models / user.php
diff options
context:
space:
mode:
Commitfaabc462d3080cac67687f450135a078731fb3d1 (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-02-01 10:02:14 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-02-01 10:28:22 +0200
Filesb0d050b510386c3abcc48852bda16480b7c27e8e /models/user.php
nowayforward_human-faabc462d3080cac67687f450135a078731fb3d1.tar
nowayforward_human-faabc462d3080cac67687f450135a078731fb3d1.tar.gz
nowayforward_human-faabc462d3080cac67687f450135a078731fb3d1.zip
Parent5a0d4f4a00c9162fbf773ca6b73d34354c6650fe (diff)
feat: Rework models methods to be more object-oriented where applicable
1 files changed, 14 insertions, 2 deletions
-rw-r--r--models/user.php16
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\""
+ );
}
}