Releases: php-xapi/model
0.5.1
0.5.0
-
[BC BREAK]: The type of the following properties has been changed from
stringto instances of the newIRIclass:Activity::$idAttachment::$usageTypeDefinition::$typeInverseFunctionalIdentifier::$mboxVerb::$id
Type hints of respective methods have been updated accordingly.
-
[BC BREAK]: The type of the following properties has been changed from
stringto instances of the newIRLclass:Account::$homePageAttachment::$fileUrlDefinition::$moreInfoStatementResult::$moreUrlPath
Type hints of respective methods have been updated accordingly.
-
Fixed how context attributes of statements are dealt with in
Statement::equals()(previously, they were completely ignored). -
Fixed handling
nullvalues for statement ids insideStatement::equals(). Previously,StatementId::equals()might have been called even if a statement's identifier was not defined. -
Added an
Attachmentclass to store statement attachments. -
Fixed some edge cases in
Context::equals()where statement references, teams, and extensions would not have been compared properly. -
Added missing extensions to activity definitions.
-
Added
with*()methods for the$name,$description,$type, and$moreInfoproperties of theDefinitionclass and its subclasses to ease the creation of newDefinitionobjects based on existing instances. -
Added new classes to model user interaction activity definitions (all extending an abstract
InteractionDefinitionclass which in turn is a child class of the already existingDefinitionclass):ChoiceInteractionDefinitionFillInInteractionDefinitionLikertInteractionDefinitionLongFillInInteractionDefinitionMatchingInteractionDefinitionNumericInteractionDefinitionOtherInteractionDefinitionPerformanceInteractionDefinitionSequencingInteractionDefinitionTrueFalseInteractionDefinition
Interaction components which are part of some of the new definition classes will be handled by
InteractionComponentinstances. -
[BC BREAK]: Added a
LanguageMapvalue object class to model the$displayproperty ofVerbinstances as well as the$nameand$descriptionproperties of theDefinitionclass (all these properties have been plain PHP arrays before). -
[BC BREAK]: Added a value object for statement ids.
-
The constructor of the
SubStatementclass now throws an exception when aSubStatementinstance is passed as the$objectargument to comply with the Experience API spec which does not allow to nest sub statements. -
[BC BREAK]: Removed the
$idproperty from theSubStatementclass as well as thegetStatementReference()andgetVoidStatement()methods which relied on the existence of an id as a sub statement must not have an id according to the xAPI spec. -
added a
$contextattribute toSubStatementinstances -
added
equals()method to theResultmodel class -
added a
StatementFactoryto ease the creation of complex xAPI statements -
Added
with*()methods toResult,Score,Statement,SubStatementthat allow the creation of new model objects based on existing instances. -
added
Context,ContextActivities, andExtensionsclasses that represent statement contexts, their context's activities, and statement extensions respectively
v0.4.1
v0.4.0
- fixed some edge cases in the
equals()methods of theDefinition,Result, andVerbclasses - Made
Objecta parent class of theActorclass to reflect the fact that actors can also be objects in xAPI statements. - The argument type of the
equals()method in theActorbase class was changed fromActortoObjectto be compatible with the same method from the parentObjectclass.
v0.3.0
- made sure that boolean statements filter parameters are passed as the strings
'true'and'false' - added missing return statements to some methods of the
StatementsFilterclass to ensure the fluent interface - changed the default value of the
displayproperty of theVerbclass tonull(was the empty array before) to make it possible to distinguish the empty list from the case when thedisplayproperty was omitted - added the possibility to attach an IRL to an activity definition that acts as a reference to a document that contains human-readable information about the activity
- all values of an activity definition are optional, pass
nullto omit them - all values of a result are optional, pass
nullto omit them - throw an exception when not existing document data is accessed instead of failing with a PHP notice
- all values of a score are optional, pass
nullto omit them - values passed to the constructor of the
Scoreclass are no longer cast tofloat