Open Journal Systems  3.3.0
PKPStatisticsHelper Class Reference
Inheritance diagram for PKPStatisticsHelper:
StatisticsHelper

Public Member Functions

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

Protected Member Functions

 getAppColumnTitle ($column)
 
 getReportColumnsArray ()
 
 getReportObjectTypesArray ()
 

Detailed Description

Statistics helper class.

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

Constructor & Destructor Documentation

◆ __construct()

PKPStatisticsHelper::__construct ( )

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

Member Function Documentation

◆ canonicalizeMetricTypes()

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.

◆ getAllMetricTypeStrings()

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().

◆ getAppColumnTitle()

PKPStatisticsHelper::getAppColumnTitle (   $column)
abstractprotected

Get an application specific column name.

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

Reimplemented in StatisticsHelper.

Referenced by getReportColumnsArray().

◆ getColumnNames()

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().

◆ getContext()

& 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().

◆ getFileTypesArray()

PKPStatisticsHelper::getFileTypesArray ( )

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().

◆ 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().

◆ getGeoLocationTool()

& PKPStatisticsHelper::getGeoLocationTool ( )

Get the geo location tool.

Returns
mixed GeoLocationTool object or null

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

References PluginRegistry\getPlugin().

◆ getObjectTypeString()

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().

◆ getReportColumnsArray()

PKPStatisticsHelper::getReportColumnsArray ( )
protected

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

Returns
array

Reimplemented in StatisticsHelper.

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

References getAppColumnTitle().

Referenced by getColumnNames().

◆ getReportObjectTypesArray()

PKPStatisticsHelper::getReportObjectTypesArray ( )
protected

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

Returns
array

Reimplemented in StatisticsHelper.

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

Referenced by getObjectTypeString().

◆ getReportPluginByMetricType()

& 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().

◆ getReportUrl()

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: