PHP Класс Mnemo_Driver_Sql, horde

Copyright 2001-2015 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.
Автор: Chuck Hagenbuch ([email protected])
Автор: Michael J. Rubinsky ([email protected])
Наследование: extends Mnemo_Driver
Показать файл Открыть проект

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

Свойство Тип Описание
$_charset string Charset
$_column Horde_Db_Adapter_Base_Column Column definition of body column.
$_db Horde_Db_Adapter The database connection object.

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

Метод Описание
__construct ( string $notepad, array $params = [] ) Construct a new SQL storage 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.
retrieve ( ) Retrieves all of the notes of the current notepad from the backend.

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

Метод Описание
_add ( string $noteId, string $desc, string $body, string $tags ) : string Adds a note to the backend storage.
_buildNote ( array $row, string $passphrase = null ) : array
_delete ( $noteId ) : string Deletes a note permanently.
_deleteAll ( ) : array Deletes all notes from the current notepad.
_generateId ( ) : string Generates a local note ID.
_modify ( string $noteId, string $desc, string $body, string $tags ) Modifies an existing note.
_move ( string $noteId, string $newNotepad ) : string Moves a note to a new notepad.

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

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

Construct a new SQL storage object.
public __construct ( string $notepad, array $params = [] )
$notepad string The name of the notepad to load/save notes from.
$params array The connection parameters

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

Adds a note to the backend storage.
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.

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

protected _buildNote ( array $row, string $passphrase = null ) : array
$row array Hash of the note data, db keys.
$passphrase string The encryption passphrase.
Результат array a Note hash.

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

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

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

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

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

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

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

Modifies an existing note.
protected _modify ( string $noteId, string $desc, string $body, string $tags )
$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.

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

Moves a note to a new notepad.
protected _move ( string $noteId, string $newNotepad ) : string
$noteId string The note to move.
$newNotepad string The new notepad.
Результат string The note's UID.

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

Retrieves one note from the backend.
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.
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.

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

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

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

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

Charset
protected string $_charset
Результат string

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

Column definition of body column.
protected Horde_Db_Adapter_Base_Column $_column
Результат Horde_Db_Adapter_Base_Column

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

The database connection object.
protected Horde_Db_Adapter $_db
Результат Horde_Db_Adapter