Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

   1  <?php
   2  
   3  namespace IMSGlobal\LTI\Profile;
   4  
   5  /**
   6  
   7   * Class to represent a resource handler message object
   8   *
   9   * @author  Stephen P Vickers <svickers@imsglobal.org>
  10   * @copyright  IMS Global Learning Consortium Inc
  11   * @date  2016
  12   * @version 3.0.0
  13   * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  14   */
  15  
  16  class Message
  17  {
  18  
  19  /**
  20   * LTI message type.
  21   *
  22   * @var string $type
  23   */
  24      public $type = null;
  25  /**
  26   * Path to send message request to (used in conjunction with a base URL for the Tool Provider).
  27   *
  28   * @var string $path
  29   */
  30      public $path = null;
  31  /**
  32   * Capabilities required by message.
  33   *
  34   * @var array $capabilities
  35   */
  36      public $capabilities = null;
  37  /**
  38   * Variable parameters to accompany message request.
  39   *
  40   * @var array $variables
  41   */
  42      public $variables = null;
  43  /**
  44   * Fixed parameters to accompany message request.
  45   *
  46   * @var array $constants
  47   */
  48      public $constants = null;
  49  
  50  
  51  /**
  52   * Class constructor.
  53   *
  54   * @param string $type          LTI message type
  55   * @param string $path          Path to send message request to
  56   * @param array  $capabilities  Array of capabilities required by message
  57   * @param array  $variables     Array of variable parameters to accompany message request
  58   * @param array  $constants     Array of fixed parameters to accompany message request
  59   */
  60      function __construct($type, $path, $capabilities = array(), $variables = array(), $constants = array())
  61      {
  62  
  63          $this->type = $type;
  64          $this->path = $path;
  65          $this->capabilities = $capabilities;
  66          $this->variables = $variables;
  67          $this->constants = $constants;
  68  
  69      }
  70  
  71  }