Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
core_xapi\local\statement\item_actor Class Reference

Abstract xAPI actor class. More...

Inheritance diagram for core_xapi\local\statement\item_actor:
core_xapi\local\statement\item_object core_xapi\local\statement\item core_xapi\local\statement\item_agent core_xapi\local\statement\item_group

Public Member Functions

 get_all_users ()
 Return all moodle users represented by this item. More...
 
 get_data ()
 Return the original data from this item. More...
 
 get_user ()
 Returns the moodle user represented by this item. More...
 
 jsonSerialize ()
 Return the data to serialize in case JSON statement is needed. More...
 

Static Public Member Functions

static create_from_data (stdClass $data)
 Function to create an actor from part of the xAPI statement. More...
 

Protected Attributes

stdClass $data
 the item structure.
 

Detailed Description

Abstract xAPI actor class.

This class extends from item_object instead of basic item because both actors (agent and group) could be used as statement actor or object.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ create_from_data()

static core_xapi\local\statement\item_actor::create_from_data ( stdClass  $data)
static

Function to create an actor from part of the xAPI statement.

Parameters
stdClass$datathe original xAPI element
Return values
itemitem_agent|item_grou|item_activity xAPI generated

Reimplemented from core_xapi\local\statement\item_object.

Reimplemented in core_xapi\local\statement\item_agent, and core_xapi\local\statement\item_group.

◆ get_all_users()

core_xapi\local\statement\item_actor::get_all_users ( )
abstract

Return all moodle users represented by this item.

Return values
arrayuser records

Reimplemented in core_xapi\local\statement\item_agent, and core_xapi\local\statement\item_group.

◆ get_data()

core_xapi\local\statement\item::get_data ( )
inherited

Return the original data from this item.

Return values
stdClassthe original data structure

◆ get_user()

core_xapi\local\statement\item_actor::get_user ( )
abstract

Returns the moodle user represented by this item.

Return values
stdClassuser record

Reimplemented in core_xapi\local\statement\item_agent, and core_xapi\local\statement\item_group.

◆ jsonSerialize()

core_xapi\local\statement\item::jsonSerialize ( )
inherited

Return the data to serialize in case JSON statement is needed.

Return values
stdClassthe original data structure

The documentation for this class was generated from the following file: