PHP Class Mnemo_Driver, horde

Copyright 2001-2016 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.
Author: Jon Parise ([email protected])
Author: Michael J. Rubinsky ([email protected])
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_memos array Array holding the current memo list. Each array entry is a hash describing a memo. The array is indexed numerically by memo ID.
$_notepad string String containing the current notepad name.
$_pgp Horde_Crypt_pgp Crypting processor.

Méthodes publiques

Méthode Description
add ( string $desc, string $body, string $tags = '', string $passphrase = null ) : string Adds a note to the backend storage.
delete ( string $noteId ) Deletes a note permanently.
deleteAll ( ) Deletes all notes from the current notepad.
encryptionSupported ( ) : boolean Returns whether note encryption is supported.
fromiCalendar ( Horde_Icalendar_Vnote $vNote ) : array Create a memo (hash array) from a Horde_Icalendar_Vnote object.
get ( string $noteId, string $passphrase = null ) : array Retrieves one note from the backend.
getByUID ( string $uid, string $passphrase = null ) : array Retrieves one note from the backend by UID.
getMemoDescription ( $body ) Update the description (short summary) of a memo.
listMemos ( ) : array Lists memos based on the given criteria. All memos will be returned by default.
modify ( string $noteId, string $desc, string $body, string $tags = '', string $passphrase = null ) Modifies an existing note.
move ( string $noteId, string $newNotepad ) Moves a note to a new notepad.
retrieve ( ) Retrieves all of the notes of the current notepad from the backend.
synchronize ( mixed $token = false ) Perform any synchronization with backend data handlers that may be necessary for the driver.
toASNote ( array $memo, array $options = [] ) : Horde_ActiveSync_Message_Note Create an AS memo from this task
toiCalendar ( $memo, $calendar ) : Horde_Icalendar_Vnote Export this memo in iCalendar format.

Méthodes protégées

Méthode Description
_add ( string $noteId, string $desc, string $body, string $tags ) : string Adds a note to the backend storage.
_decrypt ( string $note, string $passphrase ) : string Decrypts a note.
_delete ( $noteId ) : string Deletes a note permanently.
_deleteAll ( ) : array Deletes all notes from the current notepad.
_encrypt ( string $note, string $passphrase ) : string Encrypts a note.
_generateId ( ) : string Generates a local note ID.
_loadPGP ( ) Loads the PGP encryption driver.
_modify ( string $noteId, string $desc, string $body, string $tags ) : string Modifies an existing note.
_move ( string $noteId, string $newNotepad ) : string Moves a note to a new notepad.

Method Details

_add() abstract protected méthode

Adds a note to the backend storage.
abstract protected _add ( string $noteId, string $desc, string $body, string $tags ) : string
$noteId string The ID of the new note.
$desc string The first line of the note.
$body string The whole note body.
$tags string The tags of the note.
Résultat string The unique ID of the new note.

_decrypt() protected méthode

Decrypts a note.
protected _decrypt ( string $note, string $passphrase ) : string
$note string The encrypted note text.
$passphrase string The passphrase to decrypt the note with.
Résultat string The decrypted text.

_delete() abstract protected méthode

Deletes a note permanently.
abstract protected _delete ( $noteId ) : string
Résultat string The note's UID.

_deleteAll() abstract protected méthode

Deletes all notes from the current notepad.
abstract protected _deleteAll ( ) : array
Résultat array An array of uids that have been removed.

_encrypt() protected méthode

Encrypts a note.
protected _encrypt ( string $note, string $passphrase ) : string
$note string The note text.
$passphrase string The passphrase to encrypt the note with.
Résultat string The encrypted text.

_generateId() abstract protected méthode

Generates a local note ID.
abstract protected _generateId ( ) : string
Résultat string A new note ID.

_loadPGP() protected méthode

Loads the PGP encryption driver.
protected _loadPGP ( )

_modify() abstract protected méthode

Modifies an existing note.
abstract protected _modify ( string $noteId, string $desc, string $body, string $tags ) : string
$noteId string The note to modify.
$desc string The first line of the note.
$body string The whole note body.
$tags string The tags of the note.
Résultat string The note's UID.

_move() abstract protected méthode

Moves a note to a new notepad.
abstract protected _move ( string $noteId, string $newNotepad ) : string
$noteId string The note to move.
$newNotepad string The new notepad.
Résultat string The note's UID.

add() public méthode

Adds a note to the backend storage.
public add ( string $desc, string $body, string $tags = '', string $passphrase = null ) : string
$desc string The first line of the note.
$body string The whole note body.
$tags string The tags of the note.
$passphrase string The passphrase to encrypt the note with.
Résultat string The ID of the new note.

delete() public méthode

Deletes a note permanently.
public delete ( string $noteId )
$noteId string The note to delete.

deleteAll() public méthode

Deletes all notes from the current notepad.
public deleteAll ( )

encryptionSupported() public méthode

Checks if PGP support could be loaded, if it supports symmetric encryption, and if we have a secure connection.
public encryptionSupported ( ) : boolean
Résultat boolean Whether encryption is suppoted.

fromiCalendar() public méthode

Create a memo (hash array) from a Horde_Icalendar_Vnote object.
public fromiCalendar ( Horde_Icalendar_Vnote $vNote ) : array
$vNote Horde_Icalendar_Vnote
Résultat array Memo (hash array) created from the vNote.

get() abstract public méthode

Retrieves one note from the backend.
abstract public get ( string $noteId, string $passphrase = null ) : array
$noteId string The ID of the note to retrieve.
$passphrase string A passphrase with which this note was supposed to be encrypted.
Résultat array The array of note attributes.

getByUID() abstract public méthode

Retrieves one note from the backend by UID.
abstract public getByUID ( string $uid, string $passphrase = null ) : array
$uid string The UID of the note to retrieve.
$passphrase string A passphrase with which this note was supposed to be encrypted.
Résultat array The array of note attributes.

getMemoDescription() public méthode

Update the description (short summary) of a memo.
public getMemoDescription ( $body )

listMemos() public méthode

Lists memos based on the given criteria. All memos will be returned by default.
public listMemos ( ) : array
Résultat array Returns a list of the requested memos.

modify() public méthode

Modifies an existing note.
public modify ( string $noteId, string $desc, string $body, string $tags = '', string $passphrase = null )
$noteId string The note to modify.
$desc string The first line of the note.
$body string The whole note body.
$tags string The tags of the note.
$passphrase string The passphrase to encrypt the note with.

move() public méthode

Moves a note to a new notepad.
public move ( string $noteId, string $newNotepad )
$noteId string The note to move.
$newNotepad string The new notepad.

retrieve() abstract public méthode

Retrieves all of the notes of the current notepad from the backend.
abstract public retrieve ( )

synchronize() public méthode

Perform any synchronization with backend data handlers that may be necessary for the driver.
public synchronize ( mixed $token = false )
$token mixed A value indicating the last synchronization point, if available.

toASNote() public méthode

Create an AS memo from this task
public toASNote ( array $memo, array $options = [] ) : Horde_ActiveSync_Message_Note
$memo array A memo array.
$options array
Résultat Horde_ActiveSync_Message_Note

toiCalendar() public méthode

Export this memo in iCalendar format.
public toiCalendar ( $memo, $calendar ) : Horde_Icalendar_Vnote
Résultat Horde_Icalendar_Vnote object for this event.

Property Details

$_memos protected_oe property

Array holding the current memo list. Each array entry is a hash describing a memo. The array is indexed numerically by memo ID.
protected array $_memos
Résultat array

$_notepad protected_oe property

String containing the current notepad name.
protected string $_notepad
Résultat string

$_pgp protected_oe property

Crypting processor.
protected Horde_Crypt_pgp $_pgp
Résultat Horde_Crypt_pgp