PHP 클래스 Nag_Driver, horde

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
저자: Jon Parise ([email protected])
저자: Jan Schneider ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$tasks Nag_Task A Nag_Task instance holding the current task list.

보호된 프로퍼티들

프로퍼티 타입 설명
$_errormsg string An error message to throw when something is wrong.
$_params array Hash containing connection parameters.
$_tasklist string String containing the current tasklist.

공개 메소드들

메소드 설명
__construct ( array $params = [], string $errormsg = null ) : Nag_Driver Constructor - just store the $params in our newly-created object. All other work is done by initialize().
add ( array $task ) : array Adds a task and handles notification.
delete ( string $taskId ) Deletes a task and handles notification.
deleteAll ( ) Deletes all tasks for the current task list.
get ( string $taskId ) : Nag_Task Retrieves one task from the database.
getByUID ( $uids, array $tasklists = null, boolean $getall = true ) : Nag_Task Retrieves one or multiple tasks from the database by UID.
getChildren ( string $parentId, boolean $include_history = true ) : array Retrieves sub-tasks from the database.
listAlarms ( integer $date ) : array List all alarms near $date.
modify ( string $taskId, array $properties ) Modifies an existing task and handles notification.
open ( string $tasklist ) Sets the currently open tasklist.
retrieve ( ) Retrieves tasks from the database.
synchronize ( mixed $token = false ) Synchronize with the Kolab backend.

보호된 메소드들

메소드 설명
_add ( array $task )
_addTags ( array $task ) Helper function to add tags from a newly created event to the tagger.
_modify ( $taskId, array $task )
_updateTags ( array $task ) Helper function to update an existing event's tags to tagger storage.

메소드 상세

__construct() 공개 메소드

Constructor - just store the $params in our newly-created object. All other work is done by initialize().
public __construct ( array $params = [], string $errormsg = null ) : Nag_Driver
$params array Any parameters needed for this driver.
$errormsg string Custom error message
리턴 Nag_Driver

_add() 추상적인 보호된 메소드

또한 보기: add()
abstract protected _add ( array $task )
$task array

_addTags() 보호된 메소드

Helper function to add tags from a newly created event to the tagger.
protected _addTags ( array $task )
$task array The task to save tags to storage for.

_modify() 추상적인 보호된 메소드

또한 보기: modify()
abstract protected _modify ( $taskId, array $task )
$task array

_updateTags() 보호된 메소드

Helper function to update an existing event's tags to tagger storage.
protected _updateTags ( array $task )
$task array The task to update

add() 공개 메소드

Adds a task and handles notification.
public add ( array $task ) : array
$task array A hash with the following possible properties: - desc: (string) The description (long) of the task. - name: (string) The name (short) of the task. - actual: (OPTIONAL, float) The actual time spent on the task. - alarm: (OPTIONAL, integer) The alarm associated with the task. - assignee: (OPTIONAL, string) The assignee of the event. - completed: (OPTIONAL, integer) The completion state of the task. - completed_date: (OPTIONAL, integer) The task's completion date. - due: (OPTIONAL, integer) The due date of the task. - estimate: (OPTIONAL, float) The estimated time to complete the task. - methods: (OPTIONAL, array) The overridden alarm notification methods. - owner: (OPTIONAL, string) The owner of the event. - parent: (OPTIONAL, string) The parent task. - priority: (OPTIONAL, integer) The priority of the task. - private: (OPTIONAL, boolean) Whether the task is private. - recurrence: (OPTIONAL, Horde_Date_Recurrence|array) Recurrence information. - start: (OPTIONAL, integer) The start date of the task. - tags: (OPTIONAL, string) The comma delimited list of tags. - uid: (OPTIONAL, string) A Unique Identifier for the task.
리턴 array array(ID,UID) of new task

delete() 공개 메소드

Deletes a task and handles notification.
public delete ( string $taskId )
$taskId string The task to delete.

deleteAll() 공개 메소드

Deletes all tasks for the current task list.
public deleteAll ( )

get() 공개 메소드

Retrieves one task from the database.
public get ( string $taskId ) : Nag_Task
$taskId string The id of the task to retrieve.
리턴 Nag_Task A Nag_Task object.

getByUID() 공개 메소드

Retrieves one or multiple tasks from the database by UID.
public getByUID ( $uids, array $tasklists = null, boolean $getall = true ) : Nag_Task
$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?
리턴 array List of sub-tasks.

listAlarms() 공개 메소드

List all alarms near $date.
public listAlarms ( integer $date ) : array
$date integer The unix epoch time to check for alarms.
리턴 array An array of tasks that have alarms that match.

modify() 공개 메소드

Modifies an existing task and handles notification.
public modify ( string $taskId, array $properties )
$taskId string The task to modify.
$properties array A hash with properties. @see add().

open() 공개 메소드

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

retrieve() 공개 메소드

Retrieves tasks from the database.
public retrieve ( )

synchronize() 공개 메소드

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

프로퍼티 상세

$_errormsg 보호되어 있는 프로퍼티

An error message to throw when something is wrong.
protected string $_errormsg
리턴 string

$_params 보호되어 있는 프로퍼티

Hash containing connection parameters.
protected array $_params
리턴 array

$_tasklist 보호되어 있는 프로퍼티

String containing the current tasklist.
protected string $_tasklist
리턴 string

$tasks 공개적으로 프로퍼티

A Nag_Task instance holding the current task list.
public Nag_Task $tasks
리턴 Nag_Task