Skip to content

Commit a2b94a9

Browse files
committed
more tweaking - add statistic
1 parent 9546856 commit a2b94a9

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/Users/UserStatistics.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,24 @@ public function getStatistic($typeCode,$categoryCode)
4545
* Add a user statistic.
4646
*
4747
*/
48-
public function addStatistic($typeCode,$categoryCode)
48+
public function addStatistic($typeCode,$typeDesc,$categoryCode,$categoryDesc,$note,$segment_type)
4949
{
50+
# Create the new statistic object
51+
$stat_obj = (object) [
52+
'statistic_category' => [(object) [
53+
'value' => $categoryCode,
54+
'desc' => $categoryDesc,
55+
]],
56+
'category_type' => [(object) [
57+
'value' => $typeCode,
58+
'desc' => $typeDesc,
59+
]],
60+
'statistic_note' => $note,
61+
'segment_type' => $segment_type,
62+
];
63+
64+
# Add the object to the user
65+
$this->data->user_statistic[] = $stat_obj;
5066
}
5167

5268
/**

0 commit comments

Comments
 (0)