Open Journal Systems  3.3.0
CounterReport Class Reference
Inheritance diagram for CounterReport:
CounterReportAR1 CounterReportJR1

Public Member Functions

 __construct ($release)
 
 _getVendorComponent ($key)
 
 createXML ($reportItems)
 
 getCode ()
 
 getErrors ()
 
 getKeyForFiletype ($filetype)
 
 getRelease ()
 
 getReportItems ($columns=array(), $filters=array(), $orderBy=array(), $range=null)
 
 getTitle ()
 
 getVendorContacts ()
 
 getVendorId ()
 
 getVendorLogoUrl ()
 
 getVendorName ()
 
 getVendorWebsiteUrl ()
 
 setError ($error)
 

Data Fields

 $_errors
 
 $_release
 

Protected Member Functions

 createMetricByMonth ($period, $counters)
 
 filterForContext ($filters)
 

Detailed Description

A COUNTER report, base class.

Definition at line 33 of file CounterReport.inc.php.

Constructor & Destructor Documentation

◆ __construct()

CounterReport::__construct (   $release)

Constructor

Parameters
string$release

Definition at line 55 of file CounterReport.inc.php.

Member Function Documentation

◆ _getVendorComponent()

CounterReport::_getVendorComponent (   $key)

Get the Vendor Componet by key

Parameters
$keystring
Returns
mixed

Definition at line 271 of file CounterReport.inc.php.

References PKPApplication\get(), Application\getContextDAO(), and setError().

Referenced by getVendorContacts(), getVendorId(), getVendorLogoUrl(), getVendorName(), and getVendorWebsiteUrl().

◆ createMetricByMonth()

CounterReport::createMetricByMonth (   $period,
  $counters 
)
protected

Given a Year-Month period and array of COUNTER\PerformanceCounters, create a COUNTER\Metric

Parameters
string$periodDate in Ym format
array$countersCOUNTER\PerformanceCounter array
Returns
COUNTER\Metric

Definition at line 163 of file CounterReport.inc.php.

References setError().

Referenced by CounterReportAR1\getReportItems(), and CounterReportJR1\getReportItems().

◆ createXML()

CounterReport::createXML (   $reportItems)

Construct a Reports result containing the provided performance metrics

Parameters
$reportItemsarray COUNTER\ReportItem
Returns
string xml

Definition at line 186 of file CounterReport.inc.php.

References PKPString\generateUUID(), getCode(), getErrors(), getRelease(), getTitle(), getVendorContacts(), getVendorLogoUrl(), getVendorName(), getVendorWebsiteUrl(), and setError().

◆ filterForContext()

CounterReport::filterForContext (   $filters)
protected

Ensure that the $filters do not exceed the current Context

Parameters
array()$filters
Returns
array()

Definition at line 143 of file CounterReport.inc.php.

References PKPApplication\get(), and setError().

Referenced by CounterReportAR1\getReportItems(), and CounterReportJR1\getReportItems().

◆ getCode()

CounterReport::getCode ( )

Get the report code

Returns
$string

Definition at line 72 of file CounterReport.inc.php.

Referenced by createXML().

◆ getErrors()

CounterReport::getErrors ( )

Get an array of errors

Returns
array of Exceptions

Definition at line 123 of file CounterReport.inc.php.

Referenced by createXML().

◆ getKeyForFiletype()

CounterReport::getKeyForFiletype (   $filetype)

Get the COUNTER metric type for an Statistics file type

Parameters
$filetypestring
Returns
string

Definition at line 81 of file CounterReport.inc.php.

Referenced by CounterReportJR1\getReportItems().

◆ getRelease()

CounterReport::getRelease ( )

Get the COUNTER Release

Returns
$string

Definition at line 64 of file CounterReport.inc.php.

References $_release.

Referenced by createXML().

◆ getReportItems()

CounterReport::getReportItems (   $columns = array(),
  $filters = array(),
  $orderBy = array(),
  $range = null 
)

Reimplemented in CounterReportAR1, and CounterReportJR1.

Definition at line 115 of file CounterReport.inc.php.

◆ getTitle()

CounterReport::getTitle ( )

Abstract method must be implemented in the child class Get the report title

Returns
$string

Reimplemented in CounterReportAR1, and CounterReportJR1.

Definition at line 101 of file CounterReport.inc.php.

Referenced by createXML().

◆ getVendorContacts()

CounterReport::getVendorContacts ( )

Get the Vendor Contacts

Returns
array() COUNTER\Contact

Definition at line 246 of file CounterReport.inc.php.

References _getVendorComponent().

Referenced by createXML().

◆ getVendorId()

CounterReport::getVendorId ( )

Get the Vendor Id

Returns
$string

Definition at line 230 of file CounterReport.inc.php.

References _getVendorComponent().

◆ getVendorLogoUrl()

CounterReport::getVendorLogoUrl ( )

Get the Vendor Contacts

Returns
array COUNTER\Contact

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

References _getVendorComponent().

Referenced by createXML().

◆ getVendorName()

CounterReport::getVendorName ( )

Get the Vendor Name

Returns
$string

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

References _getVendorComponent().

Referenced by createXML().

◆ getVendorWebsiteUrl()

CounterReport::getVendorWebsiteUrl ( )

Get the Vendor Website URL

Returns
string

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

References _getVendorComponent().

Referenced by createXML().

◆ setError()

CounterReport::setError (   $error)

Set an errors condition; Proper Exception handling is deferred until the OJS 3.0 Release

Parameters
$errorException

Definition at line 131 of file CounterReport.inc.php.

Referenced by _getVendorComponent(), createMetricByMonth(), createXML(), filterForContext(), CounterReportAR1\getReportItems(), and CounterReportJR1\getReportItems().

Field Documentation

◆ $_errors

array CounterReport::$_errors

$_errors An array of accumulated Exceptions

Definition at line 49 of file CounterReport.inc.php.

◆ $_release

string CounterReport::$_release

$_release A COUNTER release number

Definition at line 41 of file CounterReport.inc.php.

Referenced by getRelease().


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