Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PKPStatisticsHelper Class Reference
Inheritance diagram for PKPStatisticsHelper:
StatisticsHelper

Public Member Functions

 canonicalizeMetricTypes ($metricType, $context, $defaultSiteMetricType, $siteMetricTypes)
 
 getAllMetricTypeStrings ()
 
 getColumnNames ($column=null)
 
getContext ($filter)
 
 getFileTypeString ($fileType=null)
 
getGeoLocationTool ()
 
 getObjectTypeString ($assocType=null)
 
getReportPluginByMetricType ($metricType)
 
 getReportUrl ($request, $metricType, $columns, $filter, $orderBy=array())
 

Protected Member Functions

 getAppColumnTitle ($column)
 
 getFileTypesArray ()
 
 getReportColumnsArray ()
 
 getReportObjectTypesArray ()
 

Detailed Description

Statistics helper class.

Definition at line 61 of file PKPStatisticsHelper.inc.php.

Member Function Documentation

PKPStatisticsHelper::canonicalizeMetricTypes (   $metricType,
  $context,
  $defaultSiteMetricType,
  $siteMetricTypes 
)

Identify and canonicalize the filtered metric type.

Parameters
$metricTypestring|array A wildcard can be used to identify all metric types.
$contextnull|Context
$defaultSiteMetricTypestring
$siteMetricTypesarray
Returns
null|array The canonicalized metric type array. Null if an error occurred.

Definition at line 103 of file PKPStatisticsHelper.inc.php.

PKPStatisticsHelper::getAllMetricTypeStrings ( )

Get metric type display strings implemented by all available report plugins.

Returns
array Metric type as index and the display string as values.

Definition at line 179 of file PKPStatisticsHelper.inc.php.

References PluginRegistry\loadCategory().

PKPStatisticsHelper::getAppColumnTitle (   $column)
abstractprotected

Get an application specific column name.

Parameters
$columnstring One of the statistics column constant.
Returns
string A localized text.

Referenced by getReportColumnsArray().

PKPStatisticsHelper::getColumnNames (   $column = null)

Get report column name.

Parameters
$columnstring (optional)
Returns
array|string|null

Definition at line 200 of file PKPStatisticsHelper.inc.php.

References getReportColumnsArray().

& PKPStatisticsHelper::getContext (   $filter)

Check whether the filter filters on a context and if so: retrieve it.

NB: We do not check filters below the context level as this would be unnecessarily complex. We'd have to check whether the given publication objects are actually from the same context. This again would require us to retrieve all context objects for the filtered objects, etc.

Parameters
$filterarray
Returns
null|Context

Definition at line 79 of file PKPStatisticsHelper.inc.php.

References Application\getContextDAO().

PKPStatisticsHelper::getFileTypesArray ( )
protected

Get all file types that have statistics, with their respective names as array values.

Returns
array

Definition at line 334 of file PKPStatisticsHelper.inc.php.

Referenced by getFileTypeString().

PKPStatisticsHelper::getFileTypeString (   $fileType = null)

Get file type string.

Parameters
$fileTypemixed int or null (optional)
Returns
mixed string or array

Definition at line 238 of file PKPStatisticsHelper.inc.php.

References getFileTypesArray().

& PKPStatisticsHelper::getGeoLocationTool ( )

Get the geo location tool.

Returns
GeoLocationTool

Definition at line 282 of file PKPStatisticsHelper.inc.php.

References PluginRegistry\getPlugin().

PKPStatisticsHelper::getObjectTypeString (   $assocType = null)

Get object type string.

Parameters
$assocTypemixed int or null (optional)
Returns
mixed string or array

Definition at line 219 of file PKPStatisticsHelper.inc.php.

References getReportObjectTypesArray().

PKPStatisticsHelper::getReportColumnsArray ( )
protected

Get all statistics report columns, with their respective names as array values.

Returns
array

Definition at line 300 of file PKPStatisticsHelper.inc.php.

References getAppColumnTitle().

Referenced by getColumnNames().

PKPStatisticsHelper::getReportObjectTypesArray ( )
protected

Get all statistics report public objects, with their respective names as array values.

Returns
array

Definition at line 323 of file PKPStatisticsHelper.inc.php.

Referenced by getObjectTypeString().

& PKPStatisticsHelper::getReportPluginByMetricType (   $metricType)

Get the report plugin that implements the passed metric type.

Parameters
$metricTypestring
Returns
mixed ReportPlugin or null

Definition at line 147 of file PKPStatisticsHelper.inc.php.

References PluginRegistry\loadCategory().

PKPStatisticsHelper::getReportUrl (   $request,
  $metricType,
  $columns,
  $filter,
  $orderBy = array() 
)

Get an url that requests a statiscs report, using the passed parameters as request arguments.

Parameters
$requestPKPRequest
$metricTypestring Report metric type.
$columnsarray Report columns
$filterarray Report filters.
$orderByarray (optional) Report order by values.
Returns
string

Definition at line 262 of file PKPStatisticsHelper.inc.php.


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