Returns the number of notes in notepads that the current user owns.
integer
countMemos
()
Returns the default notepad for the current user at the specified permissions level.
void
getDefaultNotepad
([ $permission = PERMS_SHOW])
Retrieves a specific note from storage.
array
getMemo
(string $notepad, string $noteId, [string $passphrase = null])
-
string
$notepad: The notepad to retrieve the note from.
-
string
$noteId: The Id of the note to retrieve.
-
string
$passphrase: A passphrase with which this note was supposed to be encrypted.
Builds Mnemo's list of menu items.
void
getMenu
([ $returnType = 'object'])
Get preview text for a note (the first 20 lines or so).
string
getNotePreview
(array $note)
-
array
$note: The note array
Returns a note's passphrase for symmetric encryption from the session cache.
string
getPassphrase
(string $id)
Returns the real name, if available, of a user.
void
getUserName
( $uid)
Returns the specified permission for the current user.
mixed
hasPermission
(string $permission)
-
string
$permission: A permission, currently only 'max_notes'.
Initial app setup code.
void
initialize
()
Retrieves the current user's note list from storage. This function will also sort the resulting list, if requested.
array
listMemos
([constant $sortby = MNEMO_SORT_DESC], [constant $sortdir = MNEMO_SORT_ASCEND])
-
constant
$sortby: The field by which to sort. (MNEMO_SORT_DESC, MNEMO_SORT_CATEGORY, MNEMO_SORT_NOTEPAD)
-
constant
$sortdir: The direction by which to sort. (MNEMO_SORT_ASC, MNEMO_SORT_DESC)
Lists all notepads a user has access to.
array
listNotepads
([boolean $owneronly = false], [integer $permission = PERMS_SHOW])
-
boolean
$owneronly: Only return memo lists that this user owns? Defaults to false.
-
integer
$permission: The permission to filter notepads by.
Stores a note's passphrase for symmetric encryption in the session cache.
boolean
storePassphrase
(string $id, string $passphrase)
-
string
$id: A note id.
-
string
$passphrase: The note's passphrase.
Comparison function for reverse sorting notes by category.
integer
_rsortByCategory
(array $a, array $b)
-
array
$a: Note one.
-
array
$b: Note two.
Comparison function for reverse sorting notes by description.
integer
_rsortByDesc
(array $a, array $b)
-
array
$a: Note one.
-
array
$b: Note two.
Comparison function for reverse sorting notes by notepad name.
integer
_rsortByNotepad
(array $a, array $b)
-
array
$a: Note one.
-
array
$b: Note two.
Comparison function for sorting notes by category.
integer
_sortByCategory
(array $a, array $b)
-
array
$a: Note one.
-
array
$b: Note two.
Comparison function for sorting notes by description.
integer
_sortByDesc
(array $a, array $b)
-
array
$a: Note one.
-
array
$b: Note two.
Comparison function for sorting notes by notepad name.
integer
_sortByNotepad
(array $a, array $b)
-
array
$a: Note one.
-
array
$b: Note two.