Documentation

GRIS_STATS
in package

Class to manage statisitcal information

With this class statisitcal information can be shown

PHP 7

Copyright (c) 2019, Jan Peterek, LIfBi Leibniz Institute for Educational Trajectories Wilhelmsplatz 3 96047 Bamberg, Germany

Tags
copyright

Copyright (c) 2019, Jan Peterek, LIfBi Leibniz Institute for Educational Trajectories

link

LIfBi Leibniz Institute for Educational Trajectories

since
2

File available since Release 2.0

version
2.0
author

Jan Peterek jan.peterek@lifbi.de

Table of Contents

settings_group  = "stats"
The constant for the settings group
$classname  : string
The name of the class
$dbconnection  : object
The database object for managing the connection
$i18n  : object
The object for translations
$settings  : object
The object for settings
$state  : object
The object for logs
__construct()  : mixed
The class constructor
get_latest_history_stats()  : array<string|int, mixed>
Gets stats for the latest history event entry
get_project_active_stats()  : array<string|int, mixed>
Returns project statistics for active entries
get_project_started_stats()  : array<string|int, mixed>
Returns project statistics for started entries

Constants

settings_group

The constant for the settings group

public mixed settings_group = "stats"

Properties

$classname

The name of the class

private string $classname
Tags
access

private

$dbconnection

The database object for managing the connection

private object $dbconnection = NULL
Tags
access

private

$i18n

The object for translations

private object $i18n
Tags
access

private

$settings

The object for settings

private object $settings = null
Tags
access

private

$state

The object for logs

private object $state
Tags
access

private

Methods

__construct()

The class constructor

public __construct() : mixed

Initializes the objects

Return values
mixed

get_latest_history_stats()

Gets stats for the latest history event entry

public get_latest_history_stats(string $date[, string $historytype = NULL ][, string $historystate = NULL ][, bool $use_year = false ][, bool $only_open = false ][, bool $not_paused = false ][, bool $previous_years = false ]) : array<string|int, mixed>
Parameters
$date : string

The filter date

$historytype : string = NULL

Get entries only for certain type

$historystate : string = NULL

Get entries only for certain state

$use_year : bool = false

Uses a year instaed of specific date

$only_open : bool = false

Only Open historie series

$not_paused : bool = false

Only history series that arent currently paused

$previous_years : bool = false

Get Entries with previous years included

Return values
array<string|int, mixed>

The array with statistics

get_project_active_stats()

Returns project statistics for active entries

public get_project_active_stats([mixed $group = NULL ][, mixed $date = NULL ]) : array<string|int, mixed>
Parameters
$group : mixed = NULL
$date : mixed = NULL
Return values
array<string|int, mixed>

The array with statistics

get_project_started_stats()

Returns project statistics for started entries

public get_project_started_stats([mixed $group = NULL ][, mixed $date = NULL ]) : array<string|int, mixed>
Parameters
$group : mixed = NULL
$date : mixed = NULL
Return values
array<string|int, mixed>

The array with statistics

Search results