BookmarkOperations
in package
Class for doing bookmark related functions. Maybe of the Bookmark object functions are just wrappers around these.
Tags
Table of Contents
Methods
- DeleteBookmarkByID() : bool
- Deletes an existing bookmark from the database.
- InsertBookmark() : int
- Saves a new bookmark to the database.
- LoadBookmarkByID() : Bookmark
- Loads a bookmark by bookmark_id.
- LoadBookmarks() : array<string|int, mixed>
- Gets a list of all bookmarks for a given user
- UpdateBookmark() : bool
- Updates an existing bookmark in the database.
Methods
DeleteBookmarkByID()
Deletes an existing bookmark from the database.
public
DeleteBookmarkByID(int $id) : bool
Parameters
- $id : int
-
Id of the bookmark to delete
Return values
boolInsertBookmark()
Saves a new bookmark to the database.
public
InsertBookmark(Bookmark $bookmark) : int
Parameters
- $bookmark : Bookmark
-
Bookmark object to save
Return values
int —The new bookmark_id. If it fails, it returns -1.
LoadBookmarkByID()
Loads a bookmark by bookmark_id.
public
& LoadBookmarkByID(int $id) : Bookmark
Parameters
- $id : int
-
bookmark_id to load
Tags
Return values
BookmarkLoadBookmarks()
Gets a list of all bookmarks for a given user
public
LoadBookmarks(int $user_id) : array<string|int, mixed>
Parameters
- $user_id : int
-
The desired user id.
Return values
array<string|int, mixed> —An array of Bookmark objects
UpdateBookmark()
Updates an existing bookmark in the database.
public
UpdateBookmark(Bookmark $bookmark) : bool
Parameters
- $bookmark : Bookmark
-
object to save