Overview

Packages

  • Nag
  • None

Classes

  • Horde_Core_Ui_VarRenderer_Nag
  • Nag
  • Nag_Ajax_Application
  • Nag_Api
  • Nag_Driver
  • Nag_Driver_Kolab
  • Nag_Driver_Sql
  • Nag_Exception
  • Nag_Factory_Tasklists
  • Nag_Form_CreateTaskList
  • Nag_Form_DeleteTaskList
  • Nag_Form_EditTaskList
  • Nag_Form_Renderer_Task
  • Nag_Form_Task
  • Nag_Form_Type_NagAlarm
  • Nag_Form_Type_NagDue
  • Nag_Form_Type_NagMethod
  • Nag_Form_Type_NagStart
  • Nag_Task
  • Nag_Tasklists_Base
  • Nag_Tasklists_Default
  • Nag_Tasklists_Kolab
  • Overview
  • Package
  • Class
  • Tree

Class Nag_Driver

Nag_Driver:: defines an API for implementing storage backends for Nag.

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Direct known subclasses

Nag_Driver_Kolab, Nag_Driver_Sql
Package: Nag
Author: Jon Parise jon@horde.org
Author: Jan Schneider jan@horde.org
Located at Driver.php
Methods summary
public Nag_Driver
# __construct( array $params = array(), string $errormsg = null )

Constructor - just store the $params in our newly-created object. All other work is done by initialize().

Constructor - just store the $params in our newly-created object. All other work is done by initialize().

Parameters

$params
Any parameters needed for this driver.
$errormsg
Custom error message

Returns

Nag_Driver
public array
# listAlarms( integer $date )

List all alarms near $date.

List all alarms near $date.

Parameters

$date
The unix epoch time to check for alarms.

Returns

array
An array of tasks that have alarms that match.
public static mixed
# factory( string $tasklist = '', string $driver = null, array $params = null )

Attempts to return a concrete Nag_Driver instance based on $driver.

Attempts to return a concrete Nag_Driver instance based on $driver.

Parameters

$tasklist
The name of the tasklist to load.
$driver
<p>The type of concrete Nag_Driver subclass to return. The is based on the storage driver ($driver). The code is dynamically included.</p>
$params
<p>(optional) A hash containing any additional configuration or connection parameters a subclass might need.</p>

Returns

mixed

The newly created concrete Nag_Driver instance, or false on an error.

public static mixed &
# singleton( string $tasklist = '', string $driver = null, array $params = null )

Attempts to return a reference to a concrete Nag_Driver instance based on $driver. It will only create a new instance if no Nag_Driver instance with the same parameters currently exists.

Attempts to return a reference to a concrete Nag_Driver instance based on $driver. It will only create a new instance if no Nag_Driver instance with the same parameters currently exists.

This should be used if multiple storage sources are required.

This method must be invoked as: $var =& Nag_Driver::singleton()

Parameters

$tasklist
The name of the tasklist to load.
$driver
<p>The type of concrete Nag_Driver subclass to return. The is based on the storage driver ($driver). The code is dynamically included.</p>
$params
<p>(optional) A hash containing any additional configuration or connection parameters a subclass might need.</p>

Returns

mixed

The created concrete Nag_Driver instance, or false on error.

public array
# add( string $name, string $desc, integer $start = 0, integer $due = 0, integer $priority = 0, float $estimate = 0.0, integer $completed = 0, string $category = '', integer $alarm = 0, array $methods = null, string $uid = null, string $parent = '', boolean $private = false, string $owner = null, string $assignee = null )

Adds a task and handles notification.

Adds a task and handles notification.

Parameters

$name
The name (short) of the task.
$desc
The description (long) of the task.
$start
The start date of the task.
$due
The due date of the task.
$priority
The priority of the task.
$estimate
The estimated time to complete the task.
$completed
The completion state of the task.
$category
The category of the task.
$alarm
The alarm associated with the task.
$methods
The overridden alarm notification methods.
$uid
A Unique Identifier for the task.
$parent
The parent task.
$private
Whether the task is private.
$owner
The owner of the event.
$assignee
The assignee of the event.

Returns

array
array(ID,UID) of new task
public
# modify( string $taskId, string $name, string $desc, integer $start = 0, integer $due = 0, integer $priority = 0, float $estimate = 0.0, integer $completed = 0, string $category = '', integer $alarm = 0, array $methods = null, string $parent = '', boolean $private = false, string $owner = null, string $assignee = null, integer $completed_date = null, string $tasklist = null )

Modifies an existing task and handles notification.

Modifies an existing task and handles notification.

Parameters

$taskId
The task to modify.
$name
The name (short) of the task.
$desc
The description (long) of the task.
$start
The start date of the task.
$due
The due date of the task.
$priority
The priority of the task.
$estimate
The estimated time to complete the task.
$completed
The completion state of the task.
$category
The category of the task.
$alarm
The alarm associated with the task.
$methods
<p>The overridden alarm notification methods.</p>
$parent
The parent task.
$private
Whether the task is private.
$owner
The owner of the event.
$assignee
The assignee of the event.
$completed_date
The task's completion date.
$tasklist
The new tasklist.

Throws

Nag_Exception
public
# delete( string $taskId )

Deletes a task and handles notification.

Deletes a task and handles notification.

Parameters

$taskId
The task to delete.
public
# retrieve( )

Retrieves tasks from the database.

Retrieves tasks from the database.

Throws

Nag_Exception
public array
# getChildren( string $parentId )

Retrieves sub-tasks from the database.

Retrieves sub-tasks from the database.

Parameters

$parentId
The parent id for the sub-tasks to retrieve.

Returns

array
List of sub-tasks.

Throws

Nag_Exception
public Nag_Task
# get( string $taskId )

Retrieves one task from the database.

Retrieves one task from the database.

Parameters

$taskId
The id of the task to retrieve.

Returns

Nag_Task
A Nag_Task object.

Throws

Nag_Exception
public Nag_Task
# getByUID( string $uid )

Retrieves one task from the database by UID.

Retrieves one task from the database by UID.

Parameters

$uid
The UID of the task to retrieve.

Returns

Nag_Task
A Nag_Task object.

Throws

Nag_Exception
Properties summary
public Nag_Task $tasks

A Nag_Task instance holding the current task list.

A Nag_Task instance holding the current task list.

#
API documentation generated by ApiGen