Moodle user analysable.
More...
|
static | instance ($user, ?\context $context=null) |
| Returns an analytics user instance.
|
|
|
const | MAX_TIME = 9999999999 |
| Max timestamp.
|
|
|
| load () |
| Loads the analytics user object.
|
|
|
bool | $loaded = false |
| Has this user data been already loaded.
|
|
int int | $now = 0 |
| Store current Unix timestamp.
|
|
stdClass | $user = null |
| User object.
|
|
context_user | $usercontext = null |
| The user context.
|
|
|
static int | $cachedid = 0 |
| $cachedid self\$cachedinstance analysable id.
|
|
static core_analytics user | $cachedinstance = null |
| $cachedinstance
|
|
Moodle user analysable.
- Copyright
- 2019 David Monllao
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_analytics\user::__construct |
( |
| $user, |
|
|
?\context | $context = null ) |
Constructor.
Use self\instance() instead to get cached copies of the class. Instances obtained through this constructor will not be cached.
- Parameters
-
int | stdClass | $user | User id |
context | null | $context | |
- Return values
-
◆ get_context()
core_analytics\user::get_context |
( |
| ) |
|
◆ get_end()
core_analytics\user::get_end |
( |
| ) |
|
◆ get_id()
core_analytics\user::get_id |
( |
| ) |
|
◆ get_name()
core_analytics\user::get_name |
( |
| ) |
|
◆ get_start()
core_analytics\user::get_start |
( |
| ) |
|
◆ get_user_data()
core_analytics\user::get_user_data |
( |
| ) |
|
Returns a user plain object.
- Return values
-
◆ instance()
static core_analytics\user::instance |
( |
| $user, |
|
|
?\context | $context = null ) |
|
static |
Returns an analytics user instance.
Lazy load of analysable data.
- Parameters
-
int | stdClass | $user | User object or user id |
context | null | $context | |
- Return values
-
◆ load()
core_analytics\user::load |
( |
| ) |
|
|
protected |
Loads the analytics user object.
- Return values
-
The documentation for this class was generated from the following file: