PHP Класс Horde_History_Mock, horde

Автор: Gunnar Wrobel ([email protected])
Наследование: extends Horde_History
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$getCount integer Used for testing caching.

Открытые методы

Метод Описание
_getByTimestamp ( string $cmp, integer $ts, array $filters = [], string $parent = null ) : array Finds history objects by timestamp, and optionally filter on other fields as well.
_getHistory ( string $guid ) : Horde_History_Log Returns a Horde_History_Log corresponding to the named history entry, with the data retrieved appropriately.
getHighestModSeq ( string $parent = null ) : integer | boolean Return the current value of the modseq. We take the MAX of the horde_histories table instead of the value of the horde_histories_modseq table to ensure we never miss an entry if we query the history system between the time we call nextModSeq() and the time the new entry is written.
removeByNames ( array $names ) Removes one or more history entries by name.

Защищенные методы

Метод Описание
_getByModSeq ( integer $start, integer $end, array $filters = [], string $parent = null ) : array Return history objects with changes during a modseq interval, and optionally filtered on other fields as well.
_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.

Описание методов

_getByModSeq() защищенный Метод

Return history objects with changes during a modseq interval, and optionally filtered on other fields as well.
protected _getByModSeq ( integer $start, integer $end, array $filters = [], string $parent = null ) : array
$start integer The start of the modseq range.
$end integer The end of the modseq range.
$filters array 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').
$parent string The parent history to start searching at. If non-empty, will be searched for with a LIKE '$parent:%' clause.
Результат array An array of history object ids, or an empty array if none matched the criteria.

_getByTimestamp() публичный Метод

Finds history objects by timestamp, and optionally filter on other fields as well.
public _getByTimestamp ( string $cmp, integer $ts, array $filters = [], string $parent = null ) : array
$cmp string The comparison operator (<, >, <=, >=, or =) to check the timestamps with.
$ts integer The timestamp to compare against.
$filters array 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').
$parent string The parent history to start searching at. If non-empty, will be searched for with a LIKE '$parent:%' clause.
Результат array An array of history object ids, or an empty array if none matched the criteria.

_getHistory() публичный Метод

Returns a Horde_History_Log corresponding to the named history entry, with the data retrieved appropriately.
public _getHistory ( string $guid ) : Horde_History_Log
$guid string The name of the history entry to retrieve.
Результат Horde_History_Log A Horde_History_Log object.

_log() защищенный Метод

Logs an event to an item's history log. Any other details about the event are passed in $attributes.
protected _log ( Horde_History_Log $history, array $attributes, boolean $replaceAction = false )
$history Horde_History_Log The history item to add to.
$attributes array The hash of name => value entries that describe this event.
$replaceAction boolean If $attributes['action'] is already present in the item's history log, update that entry instead of creating a new one.

getHighestModSeq() публичный Метод

Return the current value of the modseq. We take the MAX of the horde_histories table instead of the value of the horde_histories_modseq table to ensure we never miss an entry if we query the history system between the time we call nextModSeq() and the time the new entry is written.
public getHighestModSeq ( string $parent = null ) : integer | boolean
$parent string Restrict to entries a specific parent.
Результат integer | boolean The highest used modseq value, false if no history.

removeByNames() публичный Метод

Removes one or more history entries by name.
public removeByNames ( array $names )
$names array The history entries to remove.

Описание свойств

$getCount публичное свойство

Used for testing caching.
public int $getCount
Результат integer