Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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
#[\AllowDynamicProperties]
15
class ContentItemImage
16
{
17
 
18
/**
19
 * Class constructor.
20
 *
21
 * @param string $id      URL of image
22
 * @param int    $height  Height of image in pixels (optional)
23
 * @param int    $width   Width of image in pixels (optional)
24
 */
25
    function __construct($id, $height = null, $width = null)
26
    {
27
 
28
        $this->{'@id'} = $id;
29
        if (!is_null($height)) {
30
            $this->height = $height;
31
        }
32
        if (!is_null($width)) {
33
            $this->width = $width;
34
        }
35
 
36
    }
37
 
38
}