Bookmark
class Bookmark (View source)
Handles bookmarking SQL queries
Methods
__construct(DatabaseInterface $dbi, BookmarkFeature $bookmarkFeature, string $database, string $currentUser, string $label, string $query, int $id = 0)
No description
int
getId()
Returns the ID of the bookmark
string
getDatabase()
Returns the database of the bookmark
string
getUser()
Returns the user whom the bookmark belongs to
string
getLabel()
Returns the label of the bookmark
string
getQuery()
Returns the query
bool
save()
Adds a bookmark
bool
delete()
Deletes a bookmark
int
getVariableCount()
Returns the number of variables in a bookmark
string
applyVariables(array $variables)
Replace the placeholders in the bookmark query with variables
Details
__construct(DatabaseInterface $dbi, BookmarkFeature $bookmarkFeature, string $database, string $currentUser, string $label, string $query, int $id = 0)
No description
int
getId()
Returns the ID of the bookmark
string
getDatabase()
Returns the database of the bookmark
string
getUser()
Returns the user whom the bookmark belongs to
string
getLabel()
Returns the label of the bookmark
string
getQuery()
Returns the query
bool
save()
Adds a bookmark
bool
delete()
Deletes a bookmark
int
getVariableCount()
Returns the number of variables in a bookmark
string
applyVariables(array $variables)
Replace the placeholders in the bookmark query with variables