Releases: php-xapi/model
0.5.1
0.5.0
-
[BC BREAK]: The type of the following properties has been changed from
string
to instances of the newIRI
class:Activity::$id
Attachment::$usageType
Definition::$type
InverseFunctionalIdentifier::$mbox
Verb::$id
Type hints of respective methods have been updated accordingly.
-
[BC BREAK]: The type of the following properties has been changed from
string
to instances of the newIRL
class:Account::$homePage
Attachment::$fileUrl
Definition::$moreInfo
StatementResult::$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
null
values for statement ids insideStatement::equals()
. Previously,StatementId::equals()
might have been called even if a statement's identifier was not defined. -
Added an
Attachment
class 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$moreInfo
properties of theDefinition
class and its subclasses to ease the creation of newDefinition
objects based on existing instances. -
Added new classes to model user interaction activity definitions (all extending an abstract
InteractionDefinition
class which in turn is a child class of the already existingDefinition
class):ChoiceInteractionDefinition
FillInInteractionDefinition
LikertInteractionDefinition
LongFillInInteractionDefinition
MatchingInteractionDefinition
NumericInteractionDefinition
OtherInteractionDefinition
PerformanceInteractionDefinition
SequencingInteractionDefinition
TrueFalseInteractionDefinition
Interaction components which are part of some of the new definition classes will be handled by
InteractionComponent
instances. -
[BC BREAK]: Added a
LanguageMap
value object class to model the$display
property ofVerb
instances as well as the$name
and$description
properties of theDefinition
class (all these properties have been plain PHP arrays before). -
[BC BREAK]: Added a value object for statement ids.
-
The constructor of the
SubStatement
class now throws an exception when aSubStatement
instance is passed as the$object
argument to comply with the Experience API spec which does not allow to nest sub statements. -
[BC BREAK]: Removed the
$id
property from theSubStatement
class 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
$context
attribute toSubStatement
instances -
added
equals()
method to theResult
model class -
added a
StatementFactory
to ease the creation of complex xAPI statements -
Added
with*()
methods toResult
,Score
,Statement
,SubStatement
that allow the creation of new model objects based on existing instances. -
added
Context
,ContextActivities
, andExtensions
classes 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
, andVerb
classes - Made
Object
a parent class of theActor
class to reflect the fact that actors can also be objects in xAPI statements. - The argument type of the
equals()
method in theActor
base class was changed fromActor
toObject
to be compatible with the same method from the parentObject
class.
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
StatementsFilter
class to ensure the fluent interface - changed the default value of the
display
property of theVerb
class tonull
(was the empty array before) to make it possible to distinguish the empty list from the case when thedisplay
property 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
null
to omit them - all values of a result are optional, pass
null
to 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
null
to omit them - values passed to the constructor of the
Score
class are no longer cast tofloat