$_auth
$_auth : string
The current user.
The Horde_History class provides methods of tracking changes in Horde objects.
log(string $guid, array $attributes = array(), boolean $replaceAction = false)
Logs an event to an item's history log.
The item must be uniquely identified by $guid. Any other details about the event are passed in $attributes. Standard suggested attributes are:
string | $guid | The unique identifier of the entry to add to. |
array | $attributes | The hash of name => value entries that describe this event. |
boolean | $replaceAction | If $attributes['action'] is already present in the item's history log, update that entry instead of creating a new one. |
getHistory(string $guid) : \Horde_History_Log
Returns a Horde_History_Log corresponding to the named history entry, with the data retrieved appropriately.
string | $guid | The name of the history entry to retrieve. |
A Horde_History_Log object.
_getHistory(string $guid) : \Horde_History_Log
Returns a Horde_History_Log corresponding to the named history entry, with the data retrieved appropriately.
string | $guid | The name of the history entry to retrieve. |
A Horde_History_Log object.
getByTimestamp(string $cmp, integer $ts, array $filters = array(), string $parent = null) : array
Finds history objects by timestamp, and optionally filter on other fields as well.
string | $cmp | The comparison operator (<, >, <=, >=, or =) to check the timestamps with. |
integer | $ts | The timestamp to compare against. |
array | $filters | An array of additional (ANDed) criteria. Each array value should be an array with 3 entries:
|
string | $parent | The parent history to start searching at. If non-empty, will be searched for with a LIKE '$parent:%' clause. |
An array of history object ids, or an empty array if none matched the criteria.
getByModSeq(integer $start, integer $end, array $filters = array(), string $parent = null) : array
Return history objects with changes during a modseq interval, and optionally filtered on other fields as well.
integer | $start | The (exclusive) start of the modseq range. |
integer | $end | The (inclusive) end of the modseq range. |
array | $filters | An array of additional (ANDed) criteria. Each array value should be an array with 3 entries:
|
string | $parent | The parent history to start searching at. If non-empty, will be searched for with a LIKE '$parent:%' clause. |
An array of history object ids, or an empty array if none matched the criteria.
_getByTimestamp(string $cmp, integer $ts, array $filters = array(), string $parent = null) : array
Finds history objects by timestamp, and optionally filter on other fields as well.
string | $cmp | The comparison operator (<, >, <=, >=, or =) to check the timestamps with. |
integer | $ts | The timestamp to compare against. |
array | $filters | An array of additional (ANDed) criteria. Each array value should be an array with 3 entries:
|
string | $parent | The parent history to start searching at. If non-empty, will be searched for with a LIKE '$parent:%' clause. |
An array of history object ids, or an empty array if none matched the criteria.
getActionTimestamp(string $guid, string $action) : integer
Gets the timestamp of the most recent change to $guid.
string | $guid | The name of the history entry to retrieve. |
string | $action | An action: 'add', 'modify', 'delete', etc. |
The timestamp, or 0 if no matching entry is found.
getActionModSeq(string $guid, string $action) : integer
Gets the modseq of the most recent change to $guid
string | $guid | The name of the history entry to retrieve. |
string | $action | An action: 'add', 'modify', 'delete', etc. |
The modseq, or 0 if no matching entry is found.
getLatestEntry(string $guid, boolean $use_ts = false) : array|boolean
Gets the latest entry of $guid
string | $guid | The name of the history entry to retrieve. |
boolean | $use_ts | If false we use the 'modseq' field to determine the latest entry. If true we use the timestamp instead of modseq to determine the latest entry. Note: Only 'modseq' can give a definitive answer. |
The latest history entry, or false if $guid does not exist.
_log(\Horde_History_Log $history, array $attributes, boolean $replaceAction = false)
Logs an event to an item's history log. Any other details about the event are passed in $attributes.
\Horde_History_Log | $history | The history item to add to. |
array | $attributes | The hash of name => value entries that describe this event. |
boolean | $replaceAction | If $attributes['action'] is already present in the item's history log, update that entry instead of creating a new one. |