NsmReports
[ class tree: NsmReports ] [ index: NsmReports ] [ all elements ]

Class: Channels_complex_report

Source Location: /reports/channels_complex_report/channels_complex_report.php

Class Overview

Nsm_report_base
   |
   --Channels_complex_report

Report object


Variables

Methods


Inherited Methods

Class: Nsm_report_base

Nsm_report_base::__construct()
PHP5 constructor function.
Nsm_report_base::configHTML()
Returns Control Panel HTML to configure report if report type is complex or returns 'false' if simple
Nsm_report_base::download()
Forces user to download generated report by sending appropriate HTTP Header details
Nsm_report_base::email_report()
Sends an email using incoming 'email_config' parameters and 'attachments' collection of reports
Nsm_report_base::generate()
Process report and output an array defining the generated report for later file-based processing
Nsm_report_base::generateResults()
Generates the SQL query string and returns the results as an array
Nsm_report_base::getInfo()
Returns an array of the report's static variables
Nsm_report_base::outputBrowser()
Renders a View from the report results to display in the browser
Nsm_report_base::outputCSV()
Builds Comma-Seperated-Value string from report results
Nsm_report_base::outputHTML()
Builds HTML string from report results
Nsm_report_base::outputTSV()
Builds Tab-Seperated-Value string from report results
Nsm_report_base::outputXML()
Builds an XML string from report results
Nsm_report_base::setConfig()
Merges incoming configuration options with default options and sets the report config
Nsm_report_base::zip_report()
Takes incoming 'file' array and adds information to new zip archive
Nsm_report_base::__toString()
PHP5 toString function.

Class Details

[line 22]
Report object



[ Top ]


Class Variables

$author =  'Iain Saxon - Newism'

[line 46]

Name and/or company of the report's creator



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]

$cache_path =  ''

[line 120]

The file-path where the report output can be stored on the server



Tags:

access:  public

Type:   string
Overrides:   Array


[ Top ]

$config = array(
      '_output' => 'browser',
      'channel_filter' => false,
      'status_filter' => false
   )

[line 92]

Default report configuration options with '_output' as a minumum entry



Tags:

access:  protected

Type:   array
Overrides:   Array


[ Top ]

$docs_url =  'http://www.newism.com.au'

[line 54]

A URL to the report's documentation (optional)



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]

$error =  false

[line 128]

Stores any report errors that are encountered and saved at report run



Tags:

var:  By default error is a boolean value and a string if an error is stored
access:  public

Type:   bool|string
Overrides:   Array


[ Top ]

$notes =  'Demonstrates a complex report example by retrieving all channel titles and providing configuration options to users'

[line 38]

Basic description of the report



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]

$output_types = array(
                           'browser' => 'View in browser',
                           'csv' => 'Comma-Seperated Values (CSV)',
                           'tab' => 'Tab-Seperated Values (TSV)',
                           'html' => 'HyperText Markup Language (HTML)',
                           'xml' => 'eXtensible Markup Language (XML)'
                        )

[line 78]

Valid report output types



Tags:

access:  public

Type:   array
Overrides:   Array


[ Top ]

$report_path =  ''

[line 112]

The file-path where the report is located and is used for including report views



Tags:

access:  public

Type:   string
Overrides:   Array


[ Top ]

$sql =  ""

[line 104]

Stores the generated SQL statement used by the report



Tags:

access:  public

Type:   string
Overrides:   Array


[ Top ]

$title =  'Channels: Complex Demo'

[line 30]

Displays the report name in the control panel



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]

$type =  'complex'

[line 70]

Report type as either 'simple' or 'complex'



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]

$version =  '1.0.2'

[line 62]

Version number of report as a string to preserve decimal points



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]



Class Methods


constructor __construct [line 140]

void __construct( )

PHP5 constructor function.

Prepares instance of ExpressionEngine for object scope and sets report path Report classes extending this class should always call the parent's constructor




Tags:

access:  public


Overrides Nsm_report_base::__construct() (PHP5 constructor function.)

[ Top ]

method configHTML [line 150]

string|bool configHTML( )

Returns Control Panel HTML to configure report if report type is complex or returns 'false' if simple



Tags:

return:  Configuration HTML or false
access:  public


Overrides Nsm_report_base::configHTML() (Returns Control Panel HTML to configure report if report type is complex or returns 'false' if simple)

[ Top ]

method generateResults [line 183]

array generateResults( )

Generates the SQL query string and returns the results as an array



Tags:

return:  Array of database results
access:  public


Overrides Nsm_report_base::generateResults() (Generates the SQL query string and returns the results as an array)

[ Top ]

method outputBrowser [line 226]

string outputBrowser( object $results)

Renders a View from the report results to display in the browser



Tags:

return:  Result data represented as HTML
access:  public


Overrides Nsm_report_base::outputBrowser() (Renders a View from the report results to display in the browser)

Parameters:

object   $results   Array of report results.

[ Top ]

method outputCSV [line 307]

string outputCSV( object $results)

Builds Comma-Seperated-Value string from report results



Tags:

return:  Result data represented as a CSV
access:  public


Overrides Nsm_report_base::outputCSV() (Builds Comma-Seperated-Value string from report results)

Parameters:

object   $results   Array of report results.

[ Top ]

method outputHTML [line 255]

string outputHTML( object $results)

Builds HTML string from report results



Tags:

return:  Result data represented as HTML
access:  public


Overrides Nsm_report_base::outputHTML() (Builds HTML string from report results)

Parameters:

object   $results   Array of report results.

[ Top ]

method outputTSV [line 323]

string outputTSV( object $results)

Builds Tab-Seperated-Value string from report results



Tags:

return:  Generated TSV string
access:  public


Overrides Nsm_report_base::outputTSV() (Builds Tab-Seperated-Value string from report results)

Parameters:

object   $results   Array of report results.

[ Top ]

method outputXML [line 344]

string outputXML( object $results)

Builds an XML string from report results



Tags:

return:  Result data represented as an XML string
access:  public


Overrides Nsm_report_base::outputXML() (Builds an XML string from report results)

Parameters:

object   $results   Array of report results.

[ Top ]


Documentation generated on Fri, 11 Mar 2011 10:05:48 +1100 by phpDocumentor 1.4.3