Skip to content

Releases: php-xapi/model

0.5.1

26 Sep 07:01
v0.5.1
Compare
Choose a tag to compare
0.5.1 Pre-release
Pre-release
  • Fixed the handling of IRI instances (for Verb::$id and Activity::$id) in StatementsFilter to only include the IRI's string value in the generated filter.

0.5.0

26 Sep 07:00
v0.5.0
Compare
Choose a tag to compare
0.5.0 Pre-release
Pre-release
  • [BC BREAK]: The type of the following properties has been changed from string to instances of the new IRI 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 new IRL 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 inside Statement::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 the Definition class and its subclasses to ease the creation of new Definition 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 existing Definition 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 of Verb instances as well as the $name and $description properties of the Definition 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 a SubStatement 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 the SubStatement class as well as the getStatementReference() and getVoidStatement() 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 to SubStatement instances

  • added equals() method to the Result model class

  • added a StatementFactory to ease the creation of complex xAPI statements

  • Added with*() methods to Result, Score, Statement, SubStatement that allow the creation of new model objects based on existing instances.

  • added Context, ContextActivities, and Extensions classes that represent statement contexts, their context's activities, and statement extensions respectively

v0.4.1

22 Aug 16:03
v0.4.1
Compare
Choose a tag to compare
v0.4.1 Pre-release
Pre-release
  • also compare timestamps when performing statement equality checks

v0.4.0

05 Jul 14:56
v0.4.0
Compare
Choose a tag to compare
v0.4.0 Pre-release
Pre-release
  • fixed some edge cases in the equals() methods of the Definition, Result, and Verb classes
  • Made Object a parent class of the Actor class to reflect the fact that actors can also be objects in xAPI statements.
  • The argument type of the equals() method in the Actor base class was changed from Actor to Object to be compatible with the same method from the parent Object class.

v0.3.0

07 Jun 07:12
v0.3.0
Compare
Choose a tag to compare
v0.3.0 Pre-release
Pre-release
  • 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 the Verb class to null (was the empty array before) to make it possible to distinguish the empty list from the case when the display 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 to float

v0.2.0

25 Mar 18:02
v0.2.0
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release
  • added a dedicated class to refer to inverse functional identifiers, refer to the upgrade file for more detailed information
  • marked the Statement class as final

v0.1.0

21 Mar 14:24
v0.1.0
Compare
Choose a tag to compare
v0.1.0 Pre-release
Pre-release

This is the first release containing immutable and final classes that reflect all parts of Experience API statements.

This package replaces the xabbuh/xapi-model package which is now deprecated and should no longer be used.