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_object Class Reference

Abstract object item used in xAPI statements. More...

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

Public Member Functions

 get_data ()
 Return the original data from 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)
 Create a xAPI object compatible from data (Agent, Group or Activity). More...
 

Protected Attributes

stdClass $data
 the item structure.
 

Detailed Description

Abstract object item used in xAPI statements.

Object represents the object in which a xAPI verb is applied. There are 3 types of objects supported: agent (user), group (of users) and activity (defined by every plugin).

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_object::create_from_data ( stdClass  $data)
static

Create a xAPI object compatible from data (Agent, Group or Activity).

Parameters
stdClass$datadata structure from statement object
Return values
itemitem_group|item_agent|item_activity resulting object

Reimplemented from core_xapi\local\statement\item.

Reimplemented in core_xapi\local\statement\item_activity, core_xapi\local\statement\item_actor, 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

◆ 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: