Open Journal Systems
3.3.0
|
Public Member Functions | |
getLoadId ($assocType, $assocId, $metricType) | |
& | getMetrics ($metricType, $columns=array(), $filters=array(), $orderBy=array(), $range=null, $nonAdditive=true) |
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 | |
Class with basic operations for retrieving and adding statistics data.
Definition at line 21 of file PKPMetricsDAO.inc.php.
|
protected |
Foreign key lookup for the published object dimension.
$assocType | int |
$assocId | int |
Reimplemented in MetricsDAO.
Definition at line 348 of file PKPMetricsDAO.inc.php.
References PKPServices\get(), getAssocObjectInfo(), Application\getContextAssocType(), Application\getContextDAO(), DAORegistry\getDAO(), Application\getRepresentationDAO(), and Application\getSectionDAO().
Referenced by insertRecord().
|
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.
$submissionId | Submission id. |
$contextId | The submission context id. |
Reimplemented in MetricsDAO.
Definition at line 430 of file PKPMetricsDAO.inc.php.
Referenced by foreignKeyLookup().
PKPMetricsDAO::getLoadId | ( | $assocType, | |
$assocId, | |||
$metricType | |||
) |
Get all load ids that are associated with records filtered by the passed arguments.
$assocType | int |
$assocId | int |
$metricType | string |
Definition at line 215 of file PKPMetricsDAO.inc.php.
References DAO\retrieve().
& PKPMetricsDAO::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.
$metricType | string|array metrics selection |
$columns | string|array column (aggregation level) selection |
$filters | array report-level filter selection |
$orderBy | array order criteria |
$range | null|DBResultRange paging specification |
$nonAdditive | boolean (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. |
Reimplemented in MetricsDAO.
Definition at line 43 of file PKPMetricsDAO.inc.php.
References DAO\retrieve(), and DAO\retrieveRange().
PKPMetricsDAO::hasRecord | ( | $metricType | ) |
Check for the presence of any record that has the passed metric type.
$metricType | string |
Definition at line 234 of file PKPMetricsDAO.inc.php.
References DAO\retrieve().
PKPMetricsDAO::insertRecord | ( | $record | ) |
Insert an entry into metrics table.
$record | array |
$errorMsg | string |
Definition at line 269 of file PKPMetricsDAO.inc.php.
References foreignKeyLookup(), PKPString\regexp_match(), and DAO\update().
PKPMetricsDAO::purgeLoadBatch | ( | $loadId | ) |
Purge a load batch.
$loadId | string |
Definition at line 249 of file PKPMetricsDAO.inc.php.
References DAO\update().
PKPMetricsDAO::purgeRecords | ( | $metricType, | |
$toDate | |||
) |
Purge all records associated with the passed metric type until the passed date.
$metricType | string |
$toDate | string |
Definition at line 259 of file PKPMetricsDAO.inc.php.
References DAO\update().