PHP Класс 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.
Автор: Jon Parise ([email protected])
Автор: Michael J. Rubinsky ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
_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.

Описание методов

_add() абстрактный защищенный Метод

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.
Результат string The unique ID of the new note.

_decrypt() защищенный Метод

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.
Результат string The decrypted text.

_delete() абстрактный защищенный Метод

Deletes a note permanently.
abstract protected _delete ( $noteId ) : string
Результат string The note's UID.

_deleteAll() абстрактный защищенный Метод

Deletes all notes from the current notepad.
abstract protected _deleteAll ( ) : array
Результат array An array of uids that have been removed.

_encrypt() защищенный Метод

Encrypts a note.
protected _encrypt ( string $note, string $passphrase ) : string
$note string The note text.
$passphrase string The passphrase to encrypt the note with.
Результат string The encrypted text.

_generateId() абстрактный защищенный Метод

Generates a local note ID.
abstract protected _generateId ( ) : string
Результат string A new note ID.

_loadPGP() защищенный Метод

Loads the PGP encryption driver.
protected _loadPGP ( )

_modify() абстрактный защищенный Метод

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.
Результат string The note's UID.

_move() абстрактный защищенный Метод

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.
Результат string The note's UID.

add() публичный Метод

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.
Результат string The ID of the new note.

delete() публичный Метод

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

deleteAll() публичный Метод

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

encryptionSupported() публичный Метод

Checks if PGP support could be loaded, if it supports symmetric encryption, and if we have a secure connection.
public encryptionSupported ( ) : boolean
Результат boolean Whether encryption is suppoted.

fromiCalendar() публичный Метод

Create a memo (hash array) from a Horde_Icalendar_Vnote object.
public fromiCalendar ( Horde_Icalendar_Vnote $vNote ) : array
$vNote Horde_Icalendar_Vnote
Результат array Memo (hash array) created from the vNote.

get() абстрактный публичный Метод

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.
Результат array The array of note attributes.

getByUID() абстрактный публичный Метод

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.
Результат array The array of note attributes.

getMemoDescription() публичный Метод

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

listMemos() публичный Метод

Lists memos based on the given criteria. All memos will be returned by default.
public listMemos ( ) : array
Результат array Returns a list of the requested memos.

modify() публичный Метод

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() публичный Метод

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() абстрактный публичный Метод

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

synchronize() публичный Метод

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() публичный Метод

Create an AS memo from this task
public toASNote ( array $memo, array $options = [] ) : Horde_ActiveSync_Message_Note
$memo array A memo array.
$options array
Результат Horde_ActiveSync_Message_Note

toiCalendar() публичный Метод

Export this memo in iCalendar format.
public toiCalendar ( $memo, $calendar ) : Horde_Icalendar_Vnote
Результат Horde_Icalendar_Vnote object for this event.

Описание свойств

$_memos защищенное свойство

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
Результат array

$_notepad защищенное свойство

String containing the current notepad name.
protected string $_notepad
Результат string

$_pgp защищенное свойство

Crypting processor.
protected Horde_Crypt_pgp $_pgp
Результат Horde_Crypt_pgp