Class Mnemo_Api
Mnemo external API interface.
This file defines Mnemo's external API interface. Other applications can
interact with Mnemo through this API.
Copyright 2001-2012 Horde LLC (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/apache.
-
Horde_Registry_Api
-
Mnemo_Api
Package: Mnemo
Category:
Horde
Located at Api.php
Methods summary
public
array
|
#
listNotepads( boolean $owneronly, integer $permission )
Parameters
- $owneronly
- <p>Only return notepads that this user owns?
Defaults to false.</p>
- $permission
- The permission to filter notepads by.
Returns
array The notepads.
|
public
array
|
#
listUids( string $notepad = null )
Returns an array of UIDs for all notes that the current user is authorized
to see.
Returns an array of UIDs for all notes that the current user is authorized
to see.
Parameters
- $notepad
- The notepad to list notes from.
Returns
array An array of UIDs for all notes the user can access.
Throws
|
public
array
|
#
getChanges( integer $start, integer $end )
Method for obtaining all server changes between two timestamps. Basically
a wrapper around listBy(), but returns an array containing all adds,
edits and deletions.
Method for obtaining all server changes between two timestamps. Basically
a wrapper around listBy(), but returns an array containing all adds,
edits and deletions.
Parameters
- $start
- The starting timestamp
- $end
- The ending timestamp.
Returns
array An hash with 'add', 'modify' and 'delete' arrays.
Since
3.0.5
|
public
array
|
#
listBy( string $action, integer $timestamp, string $notepad = null, integer $end = null )
Returns an array of UIDs for notes that have had $action happen since
$timestamp.
Returns an array of UIDs for notes that have had $action happen since
$timestamp.
Parameters
- $action
- The action to check for - add, modify, or delete.
- $timestamp
- The time to start the search.
- $notepad
- The notepad to search in.
- $end
- The optional ending timestamp.
Returns
array An array of UIDs matching the action and time criteria.
|
public
integer
|
#
getActionTimestamp( string $uid, string $action, string $notepad = null )
Returns the timestamp of an operation for a given uid an action.
Returns the timestamp of an operation for a given uid an action.
Parameters
- $uid
- The uid to look for.
- $action
- The action to check for - add, modify, or delete.
- $notepad
- The notepad to search in.
Returns
integer The timestamp for this action.
Throws
Horde_Exception_PermissionDenied
|
public
string
|
#
import( string $content, string $contentType, string $notepad = null )
Import a memo represented in the specified contentType.
Import a memo represented in the specified contentType.
Parameters
- $content
- The content of the memo.
- $contentType
- <p>What format is the data in? Currently supports:
text/plain
text/x-vnote</p>
- $notepad
- (optional) The notepad to save the memo on.
Returns
string The new UID, or false on failure.
Throws
|
public
string
|
#
export( string $uid, string $contentType )
Export a memo, identified by UID, in the requested contentType.
Export a memo, identified by UID, in the requested contentType.
Parameters
- $uid
- Identify the memo to export.
- $contentType
- <p>What format should the data be in?
A string with one of:</p>
<pre><span class="php-quote">'text/plain'</span>
<span class="php-quote">'text/x-vnote'</span></pre>
Returns
string The requested data
Throws
|
public
|
#
delete( string $uid )
Delete a memo identified by UID.
Delete a memo identified by UID.
Parameters
- $uid
- <p>array $uid Identify the note to delete, either a
single UID or an array.</p>
Throws
Horde_Exception_PermissionDenied
|
public
|
#
replace( string $uid, string $content, string $contentType )
Replace the memo identified by UID with the content represented in
the specified contentType.
Replace the memo identified by UID with the content represented in
the specified contentType.
Parameters
- $uid
- Idenfity the memo to replace.
- $content
- The content of the memo.
- $contentType
- <p>What format is the data in? Currently supports:
text/plain
text/x-vnote</p>
Throws
|