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   * Class to represent a resource handler 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  
  15  class ResourceHandler
  16  {
  17  
  18  /**
  19   * General details of resource handler.
  20   *
  21   * @var Item $item
  22   */
  23      public $item = null;
  24  /**
  25   * URL of icon.
  26   *
  27   * @var string $icon
  28   */
  29      public $icon = null;
  30  /**
  31   * Required Message objects for resource handler.
  32   *
  33   * @var array $requiredMessages
  34   */
  35      public $requiredMessages = null;
  36  /**
  37   * Optional Message objects for resource handler.
  38   *
  39   * @var array $optionalMessages
  40   */
  41      public $optionalMessages = null;
  42  
  43  /**
  44   * Class constructor.
  45   *
  46   * @param Item      $item      General details of resource handler
  47   * @param string    $icon      URL of icon
  48   * @param array     $requiredMessages  Array of required Message objects for resource handler
  49   * @param array     $optionalMessages  Array of optional Message objects for resource handler
  50   */
  51      function __construct($item, $icon, $requiredMessages, $optionalMessages)
  52      {
  53  
  54          $this->item = $item;
  55          $this->icon = $icon;
  56          $this->requiredMessages = $requiredMessages;
  57          $this->optionalMessages = $optionalMessages;
  58  
  59      }
  60  
  61  }