Open Journal Systems  2.4.8
 All Classes Namespaces Functions Variables Groups Pages
MetricsDAO Class Reference
Inheritance diagram for MetricsDAO:

Public Member Functions

 getLoadId ($assocType, $assocId, $metricType)
getMetrics ($metricType, $columns=array(), $filters=array(), $orderBy=array(), $range=null, $nonAdditive=true)
 hasRecord ($metricType)
 insertRecord (&$record, &$errorMsg)
 purgeLoadBatch ($loadId)
 purgeRecords ($metricType, $toDate)
- Public Member Functions inherited from DAO
 concat ()
 convertFromDB ($value, $type)
 convertToDB ($value, &$type)
 DAO ($dataSource=null, $callHooks=true)
 dateFromDB ($d)
 datetimeFromDB ($dt)
 datetimeToDB ($dt)
 dateToDB ($d)
 flushCache ()
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 getAffectedRows ()
 getDataChangedEvent ($elementId=null, $parentElementId=null)
getDataSource ()
 getDirectionMapping ($direction)
 getDriver ()
 getInsertId ($table= '', $id= '', $callHooks=true)
 getType ($value)
 replace ($table, $arrFields, $keyCols)
retrieve ($sql, $params=false, $callHooks=true)
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 setCacheDir ()
 setDataSource (&$dataSource)
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)

Additional Inherited Members

- Public Attributes inherited from DAO

Detailed Description

Operations for retrieving and adding statistics data.

Definition at line 20 of file

Member Function Documentation

MetricsDAO::getLoadId (   $assocType,

Get all load ids that are associated with records filtered by the passed arguments.


Definition at line 201 of file

References DAO\retrieve().

& MetricsDAO::getMetrics (   $metricType,
  $columns = array(),
  $filters = array(),
  $orderBy = array(),
  $range = null,
  $nonAdditive = true 

Retrieve a range of aggregate, filtered, ordered metric values, i.e. a statistics report.

See Also for a full specification of the input and output format of this method.
$metricTypestring|array metrics selection
$columnsstring|array column (aggregation level) selection
$filtersarray report-level filter selection
$orderByarray order criteria
$rangenull|DBResultRange paging specification
$nonAdditiveboolean False will mix two different metric types, results, which is conceptually wrong because different metric types counts events differently. Only use this in cases that you know the metric types counts events similary, and where the metric numbers accuracy is not that crucial.
null|array The selected data as a simple tabular result set or null if metrics are not supported by this plug-in, the specified report is invalid or cannot be produced or another error occurred.

Definition at line 44 of file

References DAO\retrieveLimit(), and DAO\retrieveRange().

MetricsDAO::hasRecord (   $metricType)

Check for the presence of any record that has the passed metric type.


Definition at line 220 of file

References DAO\retrieve().

MetricsDAO::insertRecord ( $record,

Insert an entry into metrics table.


Definition at line 255 of file

References DAORegistry\getDAO(), String\regexp_match(), and DAO\update().

MetricsDAO::purgeLoadBatch (   $loadId)

Purge a load batch before re-loading it.


Definition at line 235 of file

References DAO\update().

MetricsDAO::purgeRecords (   $metricType,

Purge all records associated with the passed metric type until the passed date.


Definition at line 245 of file

References DAO\update().

The documentation for this class was generated from the following file: