ActivityFacade
in package
Public API for the Activity module.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor.
- getCalendarHeatmapData() : array<string, array{total: int, created: int, reviewed: int, read: int}>
- Get calendar heatmap data for the last 365 days.
- getStreakStatistics() : StreakResult
- Get streak statistics (current, best, total active days).
- getTodaySummary() : array{terms_created: int, terms_reviewed: int, texts_read: int}
- Get today's activity summary.
- incrementTermsCreated() : void
- Increment terms-created counter for today.
- incrementTermsReviewed() : void
- Increment terms-reviewed counter for today.
- incrementTextsRead() : void
- Increment texts-read counter for today.
Properties
$repository
private
ActivityRepositoryInterface
$repository
Methods
__construct()
Constructor.
public
__construct([ActivityRepositoryInterface|null $repository = null ]) : mixed
Parameters
- $repository : ActivityRepositoryInterface|null = null
-
Activity repository
getCalendarHeatmapData()
Get calendar heatmap data for the last 365 days.
public
getCalendarHeatmapData() : array<string, array{total: int, created: int, reviewed: int, read: int}>
Return values
array<string, array{total: int, created: int, reviewed: int, read: int}>getStreakStatistics()
Get streak statistics (current, best, total active days).
public
getStreakStatistics() : StreakResult
Return values
StreakResultgetTodaySummary()
Get today's activity summary.
public
getTodaySummary() : array{terms_created: int, terms_reviewed: int, texts_read: int}
Return values
array{terms_created: int, terms_reviewed: int, texts_read: int}incrementTermsCreated()
Increment terms-created counter for today.
public
incrementTermsCreated([int $count = 1 ]) : void
Parameters
- $count : int = 1
-
Number to add
incrementTermsReviewed()
Increment terms-reviewed counter for today.
public
incrementTermsReviewed([int $count = 1 ]) : void
Parameters
- $count : int = 1
-
Number to add
incrementTextsRead()
Increment texts-read counter for today.
public
incrementTextsRead([int $count = 1 ]) : void
Parameters
- $count : int = 1
-
Number to add