Method | Description | |
---|---|---|
applyVariables ( array $variables ) : string | Replace the placeholders in the bookmark query with variables | |
createBookmark ( array $bkm_fields, boolean $all_users = false ) : |
Creates a Bookmark object from the parameters | |
delete ( ) : boolean | Deletes a bookmark | |
get ( string $db, mixed $id, string $id_field = 'id', boolean $action_bookmark_all = false, boolean $exact_user_match = false ) : |
Retrieve a specific bookmark | |
getDatabase ( ) : string | Returns the database of the bookmark | |
getId ( ) : integer | Returns the ID of the bookmark | |
getLabel ( ) : string | Returns the label of the bookmark | |
getList ( string | boolean $db = false ) : |
Gets the list of bookmarks defined for the current database | |
getParams ( ) : array | Defines the bookmark parameters for the current user | |
getQuery ( ) : string | Returns the query | |
getUser ( ) : string | Returns the user whom the bookmark belongs to | |
getVariableCount ( ) : number | Returns the number of variables in a bookmark | |
save ( ) : boolean | Adds a bookmark |
public applyVariables ( array $variables ) : string | ||
$variables | array | array of variables |
return | string | query with variables applied |
public static createBookmark ( array $bkm_fields, boolean $all_users = false ) : |
||
$bkm_fields | array | the properties of the bookmark to add; here, $bkm_fields['bkm_sql_query'] is urlencoded |
$all_users | boolean | whether to make the bookmark available for all users |
return |
public static get ( string $db, mixed $id, string $id_field = 'id', boolean $action_bookmark_all = false, boolean $exact_user_match = false ) : |
||
$db | string | the current database name |
$id | mixed | an identifier of the bookmark to get |
$id_field | string | which field to look up the identifier |
$action_bookmark_all | boolean | true: get all bookmarks regardless of the owning user |
$exact_user_match | boolean | whether to ignore bookmarks with no user |
return | the bookmark |
public getDatabase ( ) : string | ||
return | string |
public getVariableCount ( ) : number | ||
return | number | number of variables |