\Whups_Reports

Whups_Reports:: class.

Copyright 2002-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.

Summary

Methods
Properties
Constants
__construct()
getDataSet()
_updateDataSet()
getTime()
No public properties found
No constants found
_getTicketSet()
$_backend
$_opentickets
$_closedtickets
$_alltickets
N/A
No private methods found
No private properties found
N/A

Properties

$_opentickets

$_opentickets : array

Local cache of open tickets

Type

array

$_closedtickets

$_closedtickets : array

Local cache of closed tickets

Type

array

$_alltickets

$_alltickets : array

Local cache of ticket sets

Type

array

Methods

__construct()

__construct(\Whups_Driver  $whups_driver) : \Whups_Reports

Constructor

Parameters

\Whups_Driver $whups_driver

The backend driver

Returns

\Whups_Reports

getDataSet()

getDataSet(string  $report) : array

Get the data set

Parameters

string $report

The report

Returns

array —

The dataset

_updateDataSet()

_updateDataSet(array  $dataset, integer  $index, mixed  $newdata, string  $operation) 

Update the dataset

Parameters

array $dataset

The dataset.

integer $index

The index to update.

mixed $newdata

The new data to insert.

string $operation

The operation being performed.

getTime()

getTime(  $stat, string  $group_by = null) : integer|array

Returns a time (max, min, avg) that tickets are in a particular state (open, assigned, etc.).

Parameters

$stat
string $group_by

A ticket property by which to group the results.

Throws

\Whups_Exception

Returns

integer|array —

The time value requested, or an array of values, if the $group_by parameter has been specified.

_getTicketSet()

_getTicketSet(string  $type, boolean  $expanded = false) : array

Loads a set of tickets, and cache the result inside the Whups_Reports:: object to save on database access.

Parameters

string $type

'open', 'closed', or 'all' - the set of tickets to fetch. A previously cached set will be returned if it is available.

boolean $expanded

List tickets once for each owner of the ticket?

Returns

array —

The ticket set.