AudioDidact\DB\DAL
Class DAL
Synopsis
class DAL
{
- // members
- protected static PDO $PDO;
- // methods
- public abstract User getUserByID()
- public abstract mixed getFullFeedHistory()
- public abstract void addUser()
- public abstract mixed addVideo()
- public abstract mixed updateVideo()
- public abstract mixed setFeedText()
- public abstract void updateUser()
- public abstract void updateUserPassword()
- public abstract void updateUserEmailPasswordCodes()
- public bool inFeed()
- public abstract mixed getFeed()
- public bool usernameExists()
- public abstract User getUserByUsername()
- public bool webIDExists()
- public abstract User getUserByWebID()
- public bool emailExists()
- public abstract User getUserByEmail()
- public abstract mixed makeDB()
- public abstract mixed verifyDB()
- public abstract mixed getPrunableVideos()
Coverage
Methods | 80% | 16 / 20 |
Lines | 0% | 0 / 18 |
Members
protected
- $PDO — \PDO
Methods
public
- addUser() — Puts user into the database
- addVideo() — Adds video into the video database for a specific user
- emailExists() — Checks if an email is already in the database
- getFeed() — Gets all the videos from the database in the user's current feed limited by the max number of items the user has set
- getFullFeedHistory() — Gets all the videos from the database
- getPrunableVideos() — Returns an array of video IDs that can be safely deleted
- getUserByEmail() — Returns User class built from the database
- getUserByID() — Returns User class built from the database
- getUserByUsername() — Returns User class built from the database
- getUserByWebID() — Returns User class built from the database
- inFeed() — Default slow way to check if a video is in the feed. Override for faster lookup
- makeDB() — Sets up any database necessary
- setFeedText() — Sets feed xml text for a user
- updateUser() — Updates user entry in the database
- updateUserEmailPasswordCodes() — Updates only a user's email verification and password recovery codes in the database
- updateUserPassword() — Updates only a user's password in the database
- updateVideo() — Updates an existing video in the video database for a specific user
- usernameExists() — Checks if a username is taken in the database
- verifyDB() — Verifies the database
- webIDExists() — Checks if a webID is taken in the database