JDSparkle  v.2014-02-11
Sparkle Updater Plugin for CakePHP
JDSparkleReport Class Reference

This class represents the interface to reports. More...

Inheritance diagram for JDSparkleReport:

Public Member Functions

 addReport ($reportData, $fakeInfo=false)
 Adds a report and records to the database. More...
 
 buildSampleData ($recordsEach=500)
 Adds a lot of random, sample data to the database for testing. More...
 
 getOverviewData ($appName= '', $periodInDays=60)
 Returns a data structure needed to display an overview report. More...
 
 getReportDataForApp ($appName, $periodInDays=60)
 Returns a data structure needed to display an application report. More...
 

Data Fields

 $hasMany
 Default relations for this model. More...
 
 $order
 Default sorting order. More...
 
 $primaryKey = 'id'
 Primary key.
 
 $useDbConfig = 'JDSparkleDB'
 Database configuration in app/config
 
 $useTable = 'reports'
 Database table this model uses.
 

Detailed Description

This class represents the interface to reports.

Member Function Documentation

getReportDataForApp (   $appName,
  $periodInDays = 60 
)

Returns a data structure needed to display an application report.

Parameters
string$appNameName of the app as from appName query.
integer$periodInDaysReporting period start date, in days.
Returns
array
getOverviewData (   $appName = '',
  $periodInDays = 60 
)

Returns a data structure needed to display an overview report.

Parameters
string$appNameName of the app as from appName query.
integer$periodInDaysReporting period start date, in days.
Returns
array
buildSampleData (   $recordsEach = 500)

Adds a lot of random, sample data to the database for testing.

Each $appNames will add 500 records each consisting of random data.

Parameters
integer$recordsEachQuantity of random records to add for each app.
addReport (   $reportData,
  $fakeInfo = false 
)

Adds a report and records to the database.

Parameters
array$reportDataArray of key-value pairs to add.
boolean$fakeInfoIndicates we will use fake report information. This supports random data generation for testing.

Field Documentation

$order
Initial value:
= [
'app_name' => 'ASC'

Default sorting order.

$hasMany
Initial value:
= [
'JDSparkleRecord' => [
'className' => 'JDSparkle.JDSparkleRecord'

Default relations for this model.


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