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_Driver_Sql

Mnemo storage implementation for Horde's Horde_Db database abstraction layer.

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.

Mnemo_Driver
Extended by Mnemo_Driver_Sql
Package: Mnemo
Author: Chuck Hagenbuch chuck@horde.org
Author: Michael J. Rubinsky mrubinsk@horde.org
Located at Driver/Sql.php
Methods summary
public
# __construct( string $notepad, array $params = array() )

Construct a new SQL storage object.

Construct a new SQL storage object.

Parameters

$notepad
The name of the notepad to load/save notes from.
$params
The connection parameters

Throws

InvalidArguementException
public array
# get( string $noteId, string $passphrase = null )

Retrieve one note from the database.

Retrieve one note from the database.

Parameters

$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 array of note attributes.

Throws

Mnemo_Exception
Horde_Exception_NotFound
public array
# getByUID( string $uid, string $passphrase = null )

Retrieve one note from the database by UID.

Retrieve one note from the database by UID.

Parameters

$uid
The UID of the note to retrieve.
$passphrase
<p>A passphrase with which this note was supposed to be encrypted.</p>

Returns

array
The array of note attributes.

Throws

Mnemo_Exception
Horde_Exception_NotFound
public string
# add( string $desc, string $body, string $category = '', string $uid = null, string $passphrase = null )

Add a note to the backend storage.

Add a note to the backend storage.

Parameters

$desc
The first line of the note.
$body
The whole note body.
$category
The category of the note.
$uid
A Unique Identifier for the note.
$passphrase
The passphrase to encrypt the note with.

Returns

string
The unique ID of the new note.

Throws

Mnemo_Exception
public
# modify( string $noteId, string $desc, string $body, string $category = null, string $passphrase = null )

Modify an existing note.

Modify an existing note.

Parameters

$noteId
The note to modify.
$desc
The description (long) of the note.
$body
The description (long) of the note.
$category
The category of the note.
$passphrase
The passphrase to encrypt the note with.

Throws

Mnemo_Exception
public
# move( string $noteId, string $newNotepad )

Move a note to a new notepad.

Move a note to a new notepad.

Parameters

$noteId
The note to move.
$newNotepad
The new notepad.

Throws

Mnemo_Exception
public
# delete( string $noteId )

Delete a note permanently

Delete a note permanently

Parameters

$noteId
The note to delete.

Throws

Mnemo_Exception
public
# deleteAll( )

Remove ALL notes belonging to the curernt user.

Remove ALL notes belonging to the curernt user.

Throws

Mnemo_Exception
public
# retrieve( )

Retrieves all of the notes from $this->_notepad from the database.

Retrieves all of the notes from $this->_notepad from the database.

Throws

Mnemo_Exception
Methods inherited from Mnemo_Driver
encryptionSupported(), fromiCalendar(), getMemoDescription(), listMemos(), toiCalendar()
API documentation generated by ApiGen