Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 402] [Versions 310 and 403]

   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  class Item
  15  {
  16  
  17  /**
  18   * ID of item.
  19   *
  20   * @var string $id
  21   */
  22      public $id = null;
  23  /**
  24   * Name of item.
  25   *
  26   * @var string $name
  27   */
  28      public $name = null;
  29  /**
  30   * Description of item.
  31   *
  32   * @var string $description
  33   */
  34      public $description = null;
  35  /**
  36   * URL of item.
  37   *
  38   * @var string $url
  39   */
  40      public $url = null;
  41  /**
  42   * Version of item.
  43   *
  44   * @var string $version
  45   */
  46      public $version = null;
  47  /**
  48   * Timestamp of item.
  49   *
  50   * @var int $timestamp
  51   */
  52      public $timestamp = null;
  53  
  54  /**
  55   * Class constructor.
  56   *
  57   * @param string $id           ID of item (optional)
  58   * @param string $name         Name of item (optional)
  59   * @param string $description  Description of item (optional)
  60   * @param string $url          URL of item (optional)
  61   * @param string $version      Version of item (optional)
  62   * @param int    $timestamp    Timestamp of item (optional)
  63   */
  64  
  65      function __construct($id = null, $name = null, $description = null, $url = null, $version = null, $timestamp = null)
  66      {
  67  
  68          $this->id = $id;
  69          $this->name = $name;
  70          $this->description = $description;
  71          $this->url = $url;
  72          $this->version = $version;
  73          $this->timestamp = $timestamp;
  74  
  75      }
  76  
  77  }