Constructor - just store the $params in our newly-created object. All other work is done by initialize().
Nag_Driver
Nag_Driver
([array $params = array()], [ $errormsg = null])
-
array
$params: Any parameters needed for this driver.
-
$errormsg
Adds a task and handles notification.
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], [string $uid = null], [string $parent = ''], [boolean $private = false], [string $owner = null], [string $assignee = null])
-
string
$name: The name (short) of the task.
-
string
$desc: The description (long) of the task.
-
integer
$start: The start date of the task.
-
integer
$due: The due date of the task.
-
integer
$priority: The priority of the task.
-
float
$estimate: The estimated time to complete the task.
-
integer
$completed: The completion state of the task.
-
string
$category: The category of the task.
-
integer
$alarm: The alarm associated with the task.
-
string
$uid: A Unique Identifier for the task.
-
string
$parent: The parent task.
-
boolean
$private: Whether the task is private.
-
string
$owner: The owner of the event.
-
string
$assignee: The assignee of the event.
Deletes a task and handles notification.
void
delete
(string $taskId)
-
string
$taskId: The task to delete.
Attempts to return a concrete Nag_Driver instance based on $driver.
mixed
&factory
([string $tasklist = ''], [string $driver = null], [array $params = null])
-
string
$tasklist: The name of the tasklist to load.
-
string
$driver: The type of concrete Nag_Driver subclass to return. The is based on the storage driver ($driver). The code is dynamically included.
-
array
$params: (optional) A hash containing any additional configuration or connection parameters a subclass might need.
Generate a universal / unique identifier for a task. This is NOT something that we expect to be able to parse into a tasklist and a taskId.
string
generateUID
()
Retrieves one task from the database.
-
string
$taskId: The id of the task to retrieve.
Redefined in descendants as:
Retrieves one task from the database by UID.
-
string
$uid: The UID of the task to retrieve.
Redefined in descendants as:
Retrieves sub-tasks from the database.
array
getChildren
(string $parentId)
-
string
$parentId: The parent id for the sub-tasks to retrieve.
Redefined in descendants as:
List all alarms near $date.
array
listAlarms
(integer $date)
-
integer
$date: The unix epoch time to check for alarms.
Redefined in descendants as:
Modifies an existing task and handles notification.
void
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], [string $parent = ''], [boolean $private = false], [string $owner = null], [string $assignee = null], [integer $completed_date = null], [string $tasklist = null])
-
string
$taskId: The task to modify.
-
string
$name: The name (short) of the task.
-
string
$desc: The description (long) of the task.
-
integer
$start: The start date of the task.
-
integer
$due: The due date of the task.
-
integer
$priority: The priority of the task.
-
float
$estimate: The estimated time to complete the task.
-
integer
$completed: The completion state of the task.
-
string
$category: The category of the task.
-
integer
$alarm: The alarm associated with the task.
-
string
$parent: The parent task.
-
boolean
$private: Whether the task is private.
-
string
$owner: The owner of the event.
-
string
$assignee: The assignee of the event.
-
integer
$completed_date: The task's completion date.
-
string
$tasklist: The new tasklist.
Retrieves tasks from the database.
mixed
retrieve
()
Redefined in descendants as:
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()
mixed
&singleton
([string $tasklist = ''], [string $driver = null], [array $params = null])
-
string
$tasklist: The name of the tasklist to load.
-
string
$driver: The type of concrete Nag_Driver subclass to return. The is based on the storage driver ($driver). The code is dynamically included.
-
array
$params: (optional) A hash containing any additional configuration or connection parameters a subclass might need.