Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
StatisticsHelper Class Reference

Public Member Functions

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

Detailed Description

Statistics helper class.

See Also
StatisticsHelper

Definition at line 58 of file StatisticsHelper.inc.php.

Member Function Documentation

StatisticsHelper::canonicalizeMetricTypes (   $metricType,
$journal,
  $defaultSiteMetricType,
  $siteMetricTypes 
)

Identify and canonicalize the filtered metric type.

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

Definition at line 100 of file StatisticsHelper.inc.php.

Referenced by Application\getMetrics().

StatisticsHelper::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 176 of file StatisticsHelper.inc.php.

References PluginRegistry\loadCategory().

Referenced by ReportGeneratorForm\fetch().

StatisticsHelper::getColumnNames (   $column = null)

Get report column names.

Returns
array|string|null

Definition at line 196 of file StatisticsHelper.inc.php.

Referenced by ReportGeneratorHandler\_getReportGeneratorForm(), ReportGeneratorForm\fetch(), and StatisticsHandler\generateReport().

& StatisticsHelper::getContext (   $filter)

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

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

Parameters
$filterarray
Returns
null|Journal

Definition at line 76 of file StatisticsHelper.inc.php.

References DAORegistry\getDAO().

Referenced by Application\getMetrics().

StatisticsHelper::getFileTypeString (   $fileType = null)

Get file type string.

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

Definition at line 254 of file StatisticsHelper.inc.php.

Referenced by ReportGeneratorHandler\_getReportGeneratorForm().

& StatisticsHelper::getGeoLocationTool ( )
StatisticsHelper::getObjectTypeString (   $assocType = null)

Get object type string.

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

Definition at line 229 of file StatisticsHelper.inc.php.

Referenced by ReportGeneratorHandler\_getReportGeneratorForm(), and StatisticsHandler\generateReport().

& StatisticsHelper::getReportPluginByMetricType (   $metricType)

Get the report plugin that implements the passed metric type.

Parameters
$metricTypestring
Returns
mixed ReportPlugin or null

Definition at line 144 of file StatisticsHelper.inc.php.

References PluginRegistry\loadCategory().

Referenced by ReportGeneratorHandler\_getReportGeneratorForm(), and StatisticsHandler\generateReport().

StatisticsHelper::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 282 of file StatisticsHelper.inc.php.

Referenced by ReportGeneratorForm\execute().


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