Overview

Packages

  • Mnemo
  • None

Classes

  • Mnemo
  • Mnemo_Ajax_Application
  • Mnemo_Ajax_Imple_EditNote
  • Mnemo_Api
  • Mnemo_Driver
  • Mnemo_Driver_Kolab
  • Mnemo_Driver_Sql
  • Mnemo_Exception
  • Mnemo_Factory_Driver
  • Mnemo_Factory_Notepads
  • Mnemo_Form_CreateNotepad
  • Mnemo_Form_DeleteNotepad
  • Mnemo_Form_EditNotepad
  • Mnemo_Notepads_Base
  • Mnemo_Notepads_Default
  • Mnemo_Notepads_Kolab
  • Overview
  • Package
  • Class
  • Tree

Class Mnemo

Mnemo Base Class.

Package: Mnemo
Author: Jon Parise jon@horde.org
Located at Mnemo.php
Methods summary
public static array
# listMemos( constant $sortby = Mnemo::SORT_DESC, constant $sortdir = Mnemo::SORT_ASCEND )

Retrieves the current user's note list from storage. This function will also sort the resulting list, if requested.

Retrieves the current user's note list from storage. This function will also sort the resulting list, if requested.

Parameters

$sortby
<p>The field by which to sort. (self::SORT_DESC, self::SORT_CATEGORY, self::SORT_NOTEPAD, self::SORT_MOD_DATE)</p>
$sortdir
<p>The direction by which to sort. (self::SORT_ASC, self::SORT_DESC)</p>

Returns

array
A list of the requested notes.

See

Mnemo_Driver::listMemos()
public static integer
# countMemos( )

Returns the number of notes in notepads that the current user owns.

Returns the number of notes in notepads that the current user owns.

Returns

integer
The number of notes that the user owns.
public static array
# getMemo( string $notepad, string $noteId, string $passphrase = null )

Retrieves a specific note from storage.

Retrieves a specific note from storage.

Parameters

$notepad
The notepad to retrieve the note from.
$noteId
The Id of the note to retrieve.
$passphrase
<p>A passphrase with which this note was supposed to be encrypted.</p>

Returns

array
The note.
public static string
# getNotePreview( array $note )

Get preview text for a note (the first 20 lines or so).

Get preview text for a note (the first 20 lines or so).

Parameters

$note
The note array

Returns

string
A few lines of the note for previews or tooltips.
public static array
# listNotepads( boolean $owneronly = false, integer $permission = Horde_Perms::SHOW )

Lists all notepads a user has access to.

Lists all notepads a user has access to.

This method takes the $conf['share']['hidden'] setting into account. If this setting is enabled, even if requesting permissions different than SHOW, it will only return calendars that the user owns or has SHOW permissions for. For checking individual calendar's permissions, use hasPermission() instead.

Parameters

$owneronly
<p>Only return memo lists that this user owns? Defaults to false.</p>
$permission
The permission to filter notepads by.

Returns

array
The memo lists.
public static mixed
# getDefaultNotepad( mixed $permission = Horde_Perms::SHOW )

Returns the default notepad for the current user at the specified permissions level.

Returns the default notepad for the current user at the specified permissions level.

Returns

mixed
The notepad identifier, or false if none found
public static string
# getUserName( mixed $uid )

Returns the real name, if available, of a user.

Returns the real name, if available, of a user.

Returns

string
The real name
public static mixed
# hasPermission( string $permission )

Returns the specified permission for the current user.

Returns the specified permission for the current user.

Parameters

$permission
A permission, currently only 'max_notes'.

Returns

mixed
The value of the specified permission.
public static string
# getPassphrase( string $id )

Returns a note's passphrase for symmetric encryption from the session cache.

Returns a note's passphrase for symmetric encryption from the session cache.

Parameters

$id
A note id.

Returns

string
The passphrase, if set.
public static boolean
# storePassphrase( string $id, string $passphrase )

Stores a note's passphrase for symmetric encryption in the session cache.

Stores a note's passphrase for symmetric encryption in the session cache.

Parameters

$id
A note id.
$passphrase
The note's passphrase.

Returns

boolean
True
public static
# initialize( )

Initial app setup code.

Initial app setup code.

Defines the following $GLOBALS (@TODO these should use the injector) mnemo_shares display_notepads

public static
# getCssStyle( mixed $category, mixed $stickies = false )
Constants summary
integer SORT_DESC

Sort by memo description.

Sort by memo description.

# 0
integer SORT_CATEGORY

Sort by memo category.

Sort by memo category.

# 1
integer SORT_NOTEPAD

Sort by notepad.

Sort by notepad.

# 2
integer SORT_MOD_DATE

Sort by moddate

Sort by moddate

# 3
integer SORT_ASCEND

Sort in ascending order.

Sort in ascending order.

# 0
integer SORT_DESCEND

Sort in descending order.

Sort in descending order.

# 1
integer ERR_NO_PASSPHRASE

No passphrase provided.

No passphrase provided.

# 100
integer ERR_DECRYPT

Decrypting failed

Decrypting failed

# 101
API documentation generated by ApiGen