PHP Класс Nag_Driver_Kolab, horde

Copyright 2004-2015 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Автор: Gunnar Wrobel ([email protected])
Автор: Thomas Jarosch ([email protected])
Автор: Stuart Binge ([email protected])
Наследование: extends Nag_Driver
Показать файл Открыть проект

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

Свойство Тип Описание
$_data Horde_Kolab_Storage_Data The current tasklist.
$_kolab Horde_Kolab_Storage The Kolab_Storage backend.

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

Метод Описание
__construct ( string $tasklist, array $params = [] ) Constructs a new Kolab storage object.
_isBase64EncodedUid ( string $s ) : boolean Detect if a string is already Horde_Url::uriB64Encode()'ed or not.
get ( string $taskId ) : Nag_Task Retrieves one task from the backend.
getByUID ( string $uid, array $tasklists = null, boolean $getall = true ) : Nag_Task Retrieves one task from the database by UID.
getChildren ( string $parentId, boolean $include_history = true ) : array Retrieves sub-tasks from the database.
listAlarms ( integer $date ) : array Lists all alarms near $date.
open ( string $tasklist ) Sets the currently open tasklist.
retrieve ( integer $completed = Nag::VIEW_ALL ) Retrieves tasks from the Kolab server.
synchronize ( mixed $token = false ) Synchronize with the Kolab backend.

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

Метод Описание
_add ( array $task ) : string Adds a task to the backend storage.
_buildTask ( array $task ) : array Build a task based a data array
_delete ( string $taskId ) Deletes a task from the backend.
_deleteAll ( ) : array Deletes all tasks from the backend.
_getData ( boolean $force = false ) : Horde_Kolab_Storage_Data Return the Kolab data handler for the current tasklist.
_getDataForTasklist ( string $tasklist ) : Horde_Kolab_Storage_Date Return the Kolab data handler for the specified tasklist.
_getObject ( array $task ) : array Retrieve the Kolab object representations for the task.
_modify ( string $taskId, array $task ) Modifies an existing task.
_move ( string $taskId, string $newTasklist ) Moves a task to a different tasklist.

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

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

Constructs a new Kolab storage object.
public __construct ( string $tasklist, array $params = [] )
$tasklist string The tasklist to load.
$params array A hash containing connection parameters.

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

Adds a task to the backend storage.
protected _add ( array $task ) : string
$task array A hash with the following possible properties: - alarm: (integer) The alarm associated with the task. - assignee: (string) The assignee of the event. - completed: (integer) The completion state of the task. - desc: (string) The description (long) of the task. - due: (integer) The due date of the task. - estimate: (float) The estimated time to complete the task. - methods: (array) The overridden alarm notification methods. - name: (string) The name (short) of the task. - organizer: (string) The organizer/owner of the task. - owner: (string) The owner of the event. - parent: (string) The parent task. - priority: (integer) The priority of the task. - private: (boolean) Whether the task is private. - recurrence: (Horde_Date_Recurrence|array) Recurrence information. - start: (integer) The start date of the task. - tags: (array) The task tags. - uid: (string) A Unique Identifier for the task.
Результат string The Nag ID of the new task.

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

Build a task based a data array
protected _buildTask ( array $task ) : array
$task array The data for the task
Результат array The converted data array representing the task

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

Deletes a task from the backend.
protected _delete ( string $taskId )
$taskId string The task to delete.

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

Deletes all tasks from the backend.
protected _deleteAll ( ) : array
Результат array An array of ids that have been deleted.

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

Return the Kolab data handler for the current tasklist.
protected _getData ( boolean $force = false ) : Horde_Kolab_Storage_Data
$force boolean Force returning a new handler
Результат Horde_Kolab_Storage_Data The data handler.

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

Return the Kolab data handler for the specified tasklist.
protected _getDataForTasklist ( string $tasklist ) : Horde_Kolab_Storage_Date
$tasklist string The tasklist name.
Результат Horde_Kolab_Storage_Date The data handler.

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

Retrieve the Kolab object representations for the task.
protected _getObject ( array $task ) : array
$task array A hash with the following possible properties: - actual: (float) The actual number of hours accumulated. - alarm: (integer) The alarm associated with the task. - assignee: (string) The assignee of the event. - completed: (integer) The completion state of the task. - completed_date: (integer) The task's completion date. - desc: (string) The description (long) of the task. - due: (integer) The due date of the task. - estimate: (float) The estimated time to complete the task. - methods: (array) The overridden alarm notification methods. - name: (string) The name (short) of the task. - organizer: (string) The organizer/owner of the task. - owner: (string) The owner of the event. - parent: (string) The parent task. - priority: (integer) The priority of the task. - private: (boolean) Whether the task is private. - recurrence: (Horde_Date_Recurrence|array) Recurrence information. - start: (integer) The start date of the task. - tags: (array) The task tags.
Результат array The Kolab object.

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

Detect if a string is already Horde_Url::uriB64Encode()'ed or not.
public _isBase64EncodedUid ( string $s ) : boolean
$s string The string to test.
Результат boolean True if $s was base64 encoded.

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

Modifies an existing task.
protected _modify ( string $taskId, array $task )
$taskId string The task to modify.
$task array

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

Moves a task to a different tasklist.
protected _move ( string $taskId, string $newTasklist )
$taskId string The task to move.
$newTasklist string The new tasklist.

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

Retrieves one task from the backend.
public get ( string $taskId ) : Nag_Task
$taskId string The id of the task to retrieve.
Результат Nag_Task A Nag_Task object.

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

Retrieves one task from the database by UID.
public getByUID ( string $uid, array $tasklists = null, boolean $getall = true ) : Nag_Task
$uid string The UID of the task to retrieve.
$tasklists array An optional array of tasklists to search.
$getall boolean If true, return all instances of the task, otherwise only one. Attempts to find the instance owned by the current user.
Результат Nag_Task A Nag_Task object.

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

Retrieves sub-tasks from the database.
public getChildren ( string $parentId, boolean $include_history = true ) : array
$parentId string The parent id for the sub-tasks to retrieve.
$include_history boolean Include created/modified info? Not currently honored.
Результат array List of sub-tasks.

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

Lists all alarms near $date.
public listAlarms ( integer $date ) : array
$date integer The unix epoch time to check for alarms.
Результат array An array of Nag_Task objects that have alarms that match.

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

Sets the currently open tasklist.
public open ( string $tasklist )
$tasklist string The tasklist.

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

Retrieves tasks from the Kolab server.
public retrieve ( integer $completed = Nag::VIEW_ALL )
$completed integer Which tasks to retrieve (1 = all tasks, 0 = incomplete tasks, 2 = complete tasks).

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

Synchronize with the Kolab backend.
public synchronize ( mixed $token = false )
$token mixed A value indicating the last synchronization point, if available.

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

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

The current tasklist.
protected Horde_Kolab_Storage_Data $_data
Результат Horde_Kolab_Storage_Data

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

The Kolab_Storage backend.
protected Horde_Kolab_Storage $_kolab
Результат Horde_Kolab_Storage