mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
Use static class names instead of strings when getting objects from the DB
This commit is contained in:
parent
a442f92e28
commit
acb6b2949f
16 changed files with 36 additions and 34 deletions
|
@ -86,7 +86,7 @@ class Session{
|
|||
from Users u
|
||||
inner join Sessions s using (UserId)
|
||||
where s.SessionId = ?
|
||||
', [$sessionId], 'User');
|
||||
', [$sessionId], User::class);
|
||||
|
||||
if(sizeof($result) > 0){
|
||||
self::SetSessionCookie($sessionId);
|
||||
|
@ -113,7 +113,7 @@ class Session{
|
|||
SELECT *
|
||||
from Sessions
|
||||
where SessionId = ?
|
||||
', [$sessionId], 'Session');
|
||||
', [$sessionId], Session::class);
|
||||
|
||||
return $result[0] ?? throw new Exceptions\SessionNotFoundException();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue