Class Nag_Driver_Sql
Nag storage implementation for PHP's PEAR database abstraction layer.
The table structure can be created by the scripts/sql/nag.sql script.
See the enclosed file COPYING for license information (GPL). If you
did not receive this file, see http://www.horde.org/licenses/gpl.
-
Nag_Driver
-
Nag_Driver_Sql
Methods summary
public
Nag_Driver
|
#
__construct( string $tasklist, array $params = array() )
Constructs a new SQL storage object.
Constructs a new SQL storage object.
Parameters
- $tasklist
- The tasklist to load.
- $params
- A hash containing connection parameters.
Returns
Overrides
|
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
Throws
Overrides
|
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
Throws
Overrides
|
public
|
#
deleteAll( )
Deletes all tasks from the backend.
Deletes all tasks from the backend.
Throws
|
public
|
#
retrieve( integer $completed = Nag::VIEW_ALL )
Retrieves tasks from the database.
Retrieves tasks from the database.
Parameters
- $completed
- <p>Which tasks to retrieve (1 = all tasks,
0 = incomplete tasks, 2 = complete tasks,
3 = future tasks, 4 = future and incomplete
tasks).</p>
Throws
Overrides
|
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
Overrides
|
public
array
|
#
listAlarms( integer $date )
Lists all alarms near $date.
Lists 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.
Throws
Overrides
|