PHP Class Whups_Reports, horde

Copyright 2002-2016 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.
Author: Chuck Hagenbuch ([email protected])
Datei anzeigen Open project: horde/horde

Protected Properties

Property Type Description
$_alltickets array Local cache of ticket sets
$_backend Whups_Driver
$_closedtickets array Local cache of closed tickets
$_opentickets array Local cache of open tickets

Public Methods

Method Description
__construct ( Whups_Driver $whups_driver ) : Whups_Reports Constructor
_updateDataSet ( array &$dataset, integer $index, mixed $newdata, string $operation ) Update the dataset
getDataSet ( string $report ) : array Get the data set
getTime ( $stat, string $group_by = null ) : integer | array Returns a time (max, min, avg) that tickets are in a particular state (open, assigned, etc.).

Protected Methods

Method Description
_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.

Method Details

__construct() public method

Constructor
public __construct ( Whups_Driver $whups_driver ) : Whups_Reports
$whups_driver Whups_Driver The backend driver
return Whups_Reports

_getTicketSet() protected method

Loads a set of tickets, and cache the result inside the Whups_Reports:: object to save on database access.
protected _getTicketSet ( string $type, boolean $expanded = false ) : array
$type string 'open', 'closed', or 'all' - the set of tickets to fetch. A previously cached set will be returned if it is available.
$expanded boolean List tickets once for each owner of the ticket?
return array The ticket set.

_updateDataSet() public method

Update the dataset
public _updateDataSet ( array &$dataset, integer $index, mixed $newdata, string $operation )
$dataset array The dataset.
$index integer The index to update.
$newdata mixed The new data to insert.
$operation string The operation being performed.

getDataSet() public method

Get the data set
public getDataSet ( string $report ) : array
$report string The report
return array The dataset

getTime() public method

Returns a time (max, min, avg) that tickets are in a particular state (open, assigned, etc.).
public getTime ( $stat, string $group_by = null ) : integer | array
$group_by string A ticket property by which to group the results.
return integer | array The time value requested, or an array of values, if the $group_by parameter has been specified.

Property Details

$_alltickets protected_oe property

Local cache of ticket sets
protected array $_alltickets
return array

$_backend protected_oe property

protected Whups_Driver $_backend
return Whups_Driver

$_closedtickets protected_oe property

Local cache of closed tickets
protected array $_closedtickets
return array

$_opentickets protected_oe property

Local cache of open tickets
protected array $_opentickets
return array