File/lib/api.php

Description

Mnemo external API interface.

This file defines Mnemo's external API interface. Other applications can interact with Mnemo through this API.

$Horde: mnemo/lib/api.php,v 1.53.2.36 2010/05/09 19:00:32 mrubinsk Exp $

Copyright 2001-2009 The Horde Project (http://www.horde.org/)

See the enclosed file LICENSE for license information (ASL). If you did not receive this file, see http://www.horde.org/licenses/asl.php.

  • since: Mnemo 1.0
Functions
_mnemo_delete (line 427)

Delete a memo identified by UID.

  • return: Success or failure.
boolean _mnemo_delete (string $uid)
  • string $uid: | array $uid Identify the note to delete, either a single UID or an array.
_mnemo_export (line 374)

Export a memo, identified by UID, in the requested contentType.

  • return: The requested data or PEAR_Error.
string _mnemo_export (string $uid, string $contentType)
  • string $uid: Identify the memo to export.
  • string $contentType: What format should the data be in? A string with one of:
                                   'text/plain'
                                   'text/x-vnote'
_mnemo_getActionTimestamp (line 257)

Returns the timestamp of an operation for a given uid an action.

  • return: The timestamp for this action.
integer _mnemo_getActionTimestamp (string $uid, string $action, [string $notepad = null])
  • string $uid: The uid to look for.
  • string $action: The action to check for - add, modify, or delete.
  • string $notepad: The notepad to search in.
_mnemo_import (line 286)

Import a memo represented in the specified contentType.

  • return: The new UID, or false on failure.
string _mnemo_import (string $content, string $contentType, [string $notepad = null])
  • string $content: The content of the memo.
  • string $contentType: What format is the data in? Currently supports: text/plain text/x-vnote
  • string $notepad: (optional) The notepad to save the memo on.
_mnemo_list (line 179)

Returns an array of UIDs for all notes that the current user is authorized to see.

  • return: An array of UIDs for all notes the user can access.
array _mnemo_list ([string $notepad = null])
  • string $notepad: The notepad to list notes from.
_mnemo_listBy (line 224)

Returns an array of UIDs for notes that have had $action happen since $timestamp.

  • return: An array of UIDs matching the action and time criteria.
array _mnemo_listBy (string $action, integer $timestamp, [string $notepad = null])
  • string $action: The action to check for - add, modify, or delete.
  • integer $timestamp: The time to start the search.
  • string $notepad: The notepad to search in.
_mnemo_listNotepads (line 164)
  • return: The notepads.
array _mnemo_listNotepads (boolean $owneronly, integer $permission)
  • boolean $owneronly: Only return notepads that this user owns? Defaults to false.
  • integer $permission: The permission to filter notepads by.
_mnemo_perms (line 78)

Returns a list of available permissions.

  • return: An array describing all available permissions.
array _mnemo_perms ()
_mnemo_removeUserData (line 95)

Removes user data.

  • return: true on success | PEAR_Error on failure
mixed _mnemo_removeUserData (string $user)
  • string $user: Name of user to remove data for.
_mnemo_replace (line 471)

Replace the memo identified by UID with the content represented in the specified contentType.

  • return: Success or failure.
boolean _mnemo_replace (string $uid, string $content, string $contentType)
  • string $uid: Idenfity the memo to replace.
  • string $content: The content of the memo.
  • string $contentType: What format is the data in? Currently supports: text/plain text/x-vnote

Documentation generated on Sun, 30 Jan 2011 05:33:54 +0000 by phpDocumentor 1.4.3