Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

   1  <?php
   2  
   3  namespace IMSGlobal\LTI\ToolProvider;
   4  
   5  /**
   6   * Class to represent a content-item image object
   7   *
   8   * @author  Stephen P Vickers <svickers@imsglobal.org>
   9   * @copyright  IMS Global Learning Consortium Inc
  10   * @date  2016
  11   * @version 3.0.2
  12   * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  13   */
  14  class ContentItemImage
  15  {
  16  
  17  /**
  18   * Class constructor.
  19   *
  20   * @param string $id      URL of image
  21   * @param int    $height  Height of image in pixels (optional)
  22   * @param int    $width   Width of image in pixels (optional)
  23   */
  24      function __construct($id, $height = null, $width = null)
  25      {
  26  
  27          $this->{'@id'} = $id;
  28          if (!is_null($height)) {
  29              $this->height = $height;
  30          }
  31          if (!is_null($width)) {
  32              $this->width = $width;
  33          }
  34  
  35      }
  36  
  37  }