Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

   1  <?php
   2  
   3  namespace IMSGlobal\LTI\Profile;
   4  
   5  /**
   6   * Class to represent a generic item object
   7   *
   8   * @author  Stephen P Vickers <svickers@imsglobal.org>
   9   * @copyright  IMS Global Learning Consortium Inc
  10   * @date  2016
  11   * @version 3.0.0
  12   * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  13   */
  14  #[\AllowDynamicProperties]
  15  class Item
  16  {
  17  
  18  /**
  19   * ID of item.
  20   *
  21   * @var string $id
  22   */
  23      public $id = null;
  24  /**
  25   * Name of item.
  26   *
  27   * @var string $name
  28   */
  29      public $name = null;
  30  /**
  31   * Description of item.
  32   *
  33   * @var string $description
  34   */
  35      public $description = null;
  36  /**
  37   * URL of item.
  38   *
  39   * @var string $url
  40   */
  41      public $url = null;
  42  /**
  43   * Version of item.
  44   *
  45   * @var string $version
  46   */
  47      public $version = null;
  48  /**
  49   * Timestamp of item.
  50   *
  51   * @var int $timestamp
  52   */
  53      public $timestamp = null;
  54  
  55  /**
  56   * Class constructor.
  57   *
  58   * @param string $id           ID of item (optional)
  59   * @param string $name         Name of item (optional)
  60   * @param string $description  Description of item (optional)
  61   * @param string $url          URL of item (optional)
  62   * @param string $version      Version of item (optional)
  63   * @param int    $timestamp    Timestamp of item (optional)
  64   */
  65  
  66      function __construct($id = null, $name = null, $description = null, $url = null, $version = null, $timestamp = null)
  67      {
  68  
  69          $this->id = $id;
  70          $this->name = $name;
  71          $this->description = $description;
  72          $this->url = $url;
  73          $this->version = $version;
  74          $this->timestamp = $timestamp;
  75  
  76      }
  77  
  78  }