Overview

Packages

  • History

Classes

  • Horde_History
  • Horde_History_Exception
  • Horde_History_Log
  • Horde_History_Mock
  • Horde_History_Sql
  • Overview
  • Package
  • Class
  • Tree

Class Horde_History_Sql

The Horde_History_Sql:: class provides a method of tracking changes in Horde objects, stored in a SQL table.

Copyright 2003-2012 Horde LLC (http://www.horde.org/)

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

Horde_History
Extended by Horde_History_Sql
Package: History
Category: Horde
License: LGPL 2.1
Author: Chuck Hagenbuch chuck@horde.org
Link: http://pear.horde.org/index.php?package=History
Located at Horde/History/Sql.php
Methods summary
public
# __construct( string $auth, Horde_Db_Adapter $db )

Constructor.

Constructor.

Parameters

$auth
The current user.
$db
The database connection.

Overrides

Horde_History::__construct()
public integer
# getActionTimestamp( string $guid, string $action )

Gets the timestamp of the most recent change to $guid.

Gets the timestamp of the most recent change to $guid.

Parameters

$guid
The name of the history entry to retrieve.
$action
An action: 'add', 'modify', 'delete', etc.

Returns

integer
The timestamp, or 0 if no matching entry is found.

Throws

Horde_History_Exception
If the input parameters are not of type string.

Overrides

Horde_History::getActionTimestamp()
public Horde_History_Log
# _getHistory( string $guid )

Returns a Horde_History_Log corresponding to the named history entry, with the data retrieved appropriately.

Returns a Horde_History_Log corresponding to the named history entry, with the data retrieved appropriately.

Parameters

$guid
The name of the history entry to retrieve.

Returns

Horde_History_Log
A Horde_History_Log object.

Throws

Horde_History_Exception
public array
# _getByTimestamp( string $cmp, integer $ts, array $filters = array(), string $parent = null )

Finds history objects by timestamp, and optionally filter on other fields as well.

Finds history objects by timestamp, and optionally filter on other fields as well.

Parameters

$cmp
<p>The comparison operator (&lt;, >, &lt;=, >=, or =) to check the timestamps with.</p>
$ts
The timestamp to compare against.
$filters
<p>An array of additional (ANDed) criteria. Each array value should be an array with 3 entries: - field: the history field being compared (i.e. 'action'). - op: the operator to compare this field with. - value: the value to check for (i.e. 'add').</p>
$parent
<p>The parent history to start searching at. If non-empty, will be searched for with a LIKE '$parent:%' clause.</p>

Returns

array

An array of history object ids, or an empty array if none matched the criteria.

Throws

Horde_History_Exception
public
# removeByNames( array $names )

Removes one or more history entries by name.

Removes one or more history entries by name.

Parameters

$names
The history entries to remove.

Throws

Horde_History_Exception
Methods inherited from Horde_History
getByTimestamp(), getHistory(), log(), removeByParent(), setLogger()
API documentation generated by ApiGen