Class that implements a xAPI activity compatible with xAPI object.
More...
|
stdClass | $data |
| the item structure.
|
|
item_definition | $definition |
| Definition object.
|
|
string | $id |
| Activity ID.
|
|
Class that implements a xAPI activity compatible with xAPI object.
- Copyright
- 2020 Ferran Recio
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_xapi\local\statement\item_activity::__construct |
( |
stdClass |
$data, |
|
|
item_definition |
$definition = null |
|
) |
| |
|
protected |
Item activity constructor.
An xAPI activity is mainly an IRI ID and an optional definition.
- Parameters
-
stdClass | $data | from the specific xAPI element |
item_definition | $definition | option definition item |
◆ create_from_data()
static core_xapi\local\statement\item_activity::create_from_data |
( |
stdClass |
$data | ) |
|
|
static |
◆ create_from_id()
static core_xapi\local\statement\item_activity::create_from_id |
( |
string |
$id, |
|
|
item_definition |
$definition = null |
|
) |
| |
|
static |
Generate a valid item_activity from a simple ID string and an optional definition.
- Parameters
-
- Return values
-
◆ get_data()
core_xapi\local\statement\item::get_data |
( |
| ) |
|
|
inherited |
Return the original data from this item.
- Return values
-
stdClass | the original data structure |
◆ get_definition()
core_xapi\local\statement\item_activity::get_definition |
( |
| ) |
|
Returns the item_definition of this item.
- Return values
-
item_definition|null | the item definition if available |
◆ get_id()
core_xapi\local\statement\item_activity::get_id |
( |
| ) |
|
Return the activity ID.
If the ID was generated by iri::generate this function will return the iri:extract value.
- Return values
-
◆ jsonSerialize()
core_xapi\local\statement\item::jsonSerialize |
( |
| ) |
|
|
inherited |
Return the data to serialize in case JSON statement is needed.
- Return values
-
stdClass | the original data structure |
The documentation for this class was generated from the following file: