reports_Core Class Reference

Help class for reports. More...

Public Member Functions

 lib_reports_assert_handler ($filename, $line, $code)
 Called by PHP as an assert callback to format errors usefully.
 percent ($dividend, $divisor)
 Generate a percentage easily.
 get_color_values ($labels=false)
 Assigns color to labels to be used in a piechart.
 convert_hex_color ($color_str)
 Converts an html hexadecimal color from the form "#rrggbb" to its separate components.
 get_date_ranges ()
 Fetch date ranges from reports class.
 format_report_value ($val)
 Format report value output.
 is_proper_report_item ($k, $data)
 Validate report item.

Static Public Member Functions

static js_strings ()
 Create common translated javascript strings.
static get_included_states ($report_type, $options)
 Return a text string representing the included host or service states.

Static Public Attributes

static $days_per_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
 Array of month_number => days_in_month.
static $valid_weekdays = array('sunday','monday','tuesday','wednesday','thursday','friday','saturday')
 Array of weekday names.
static $valid_months
 Array of month names.

Detailed Description

Help class for reports.


Member Function Documentation

reports_Core::convert_hex_color ( color_str  ) 

Converts an html hexadecimal color from the form "#rrggbb" to its separate components.

Parameters:
$color_str string: Color in html hex
Returns:
False on error. Array of 3 decimal values on success
reports_Core::get_date_ranges (  ) 

Fetch date ranges from reports class.

Returns:
Array of date ranges
reports_Core::is_proper_report_item ( k,
data 
)

Validate report item.

Parameters:
$k Unused FIXME
$data A data array that should have states return true if valid, false otherwise
reports_Core::percent ( dividend,
divisor 
)

Generate a percentage easily.

Parameters:
$dividend The whole
$divisor The part
Returns:
The percentage

Field Documentation

reports_Core::$valid_months [static]
Initial value:
 array
        (
                1  => 'january',
                2  => 'february',
                3  => 'march',
                4  => 'april',
                5  => 'may',
                6  => 'june',
                7  => 'july',
                8  => 'august',
                9  => 'september',
                10 => 'october',
                11 => 'november',
                12 => 'december'
        )

Array of month names.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 17 Dec 2012 for ninja by  doxygen 1.6.1