Open Journal Systems  3.3.0
MetricsDAO Class Reference
Inheritance diagram for MetricsDAO:
PKPMetricsDAO DAO

Public Member Functions

getMetrics ($metricType, $columns=array(), $filters=array(), $orderBy=array(), $range=null, $nonAdditive=true)
 
- Public Member Functions inherited from PKPMetricsDAO
 getLoadId ($assocType, $assocId, $metricType)
 
 hasRecord ($metricType)
 
 insertRecord ($record)
 
 purgeLoadBatch ($loadId)
 
 purgeRecords ($metricType, $toDate)
 
- Public Member Functions inherited from DAO
 __construct ($dataSource=null, $callHooks=true)
 
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAdditionalFieldNames ()
 
 getAffectedRows ()
 
 getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject)
 
 getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getLocaleFieldNames ()
 
 getType ($value)
 
 handleError ($dataSource, $sql)
 
 nullOrInt ($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)
 

Protected Member Functions

 foreignKeyLookup ($assocType, $assocId)
 
 getAssocObjectInfo ($submissionId, $contextId)
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table='', $id='')
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null, $content='')
 
- Data Fields inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and adding statistics data.

Definition at line 18 of file MetricsDAO.inc.php.

Member Function Documentation

◆ foreignKeyLookup()

MetricsDAO::foreignKeyLookup (   $assocType,
  $assocId 
)
protected

Foreign key lookup for the published object dimension.

Parameters
$assocTypeint
$assocIdint
Returns
array Values must be foreign keys relative to the context, pkp section, associated object (type and id), submission and representation.

Reimplemented from PKPMetricsDAO.

Definition at line 45 of file MetricsDAO.inc.php.

References DAORegistry\getDAO().

◆ getAssocObjectInfo()

MetricsDAO::getAssocObjectInfo (   $submissionId,
  $contextId 
)
protected

Get the id and type of the object that the passed submission info is associated with. Default implementation returns null, subclasses have to implement it.

Parameters
$submissionIdSubmission id.
$contextIdThe submission context id.
Returns
array Assoc type and id of the object.

Reimplemented from PKPMetricsDAO.

Definition at line 90 of file MetricsDAO.inc.php.

References PKPServices\get().

◆ getMetrics()

& 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
https://pkp.sfu.ca/wiki/index.php/OJSdeStatisticsConcept#Input_and_Output_Formats_.28Aggregation.2C_Filters.2C_Metrics_Data.29 for a full specification of the input and output format of this method.
Parameters
$metricTypestring|array metrics selection
$columnsstring|array column (aggregation level) selection
$filtersarray report-level filter selection
$orderByarray order criteria
$rangenull|DBResultRange paging specification
$nonAdditiveboolean (optional) Whether the metric type dimension will be additive or not. This must be used with care, different metric types should not be additive because they may diverge in ways of counting usage events.
Returns
null|array The selected data as a simple tabular result set or null if metrics are not supported, the specified report is invalid or cannot be produced or another error occurred.

Reimplemented from PKPMetricsDAO.

Definition at line 23 of file MetricsDAO.inc.php.


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