CustomStats
class CustomStats extends Stats (View source)
CustomStats class
Properties
protected string | $from | ||
protected string | $join | ||
protected string | $where | ||
protected string | $date_field | ||
protected string | $amount_field |
Methods
__construct($table_name, $join = '', $where = '', $date_field = 'creation_date', $amount_field = '')
Constructor
array
getNbByMonth(int $year, int $format)
Return object number by month for a year
array
getNbByYear()
Return object number per year
array
getAllByYear()
Return nb, total and average
array
getAmountByMonth(int $year, int $format)
Return object amount by month for a year
array
getAverageByMonth(int $year, int $format)
Return object amount average by month for a year
Details
at line 58
__construct($table_name, $join = '', $where = '', $date_field = 'creation_date', $amount_field = '')
Constructor
at line 82
array
getNbByMonth(int $year, int $format)
Return object number by month for a year
at line 101
array
getNbByYear()
Return object number per year
at line 119
array
getAllByYear()
Return nb, total and average
at line 139
array
getAmountByMonth(int $year, int $format)
Return object amount by month for a year
at line 159
array
getAverageByMonth(int $year, int $format)
Return object amount average by month for a year