ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilQTIMatimage.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
31 {
32  public const EMBEDDED_BASE64 = 'base64';
33 
34  public ?string $imagetype = null;
35  public string $label = '';
36  public ?string $height = null;
37  public ?string $width = null;
38  public string $uri = '';
39  public ?string $embedded = null;
40  public ?string $x0 = null;
41  public ?string $y0 = null;
42  public ?string $entityref = null;
43  public string $content = '';
44 
45  public function setImagetype(string $a_imagetype): void
46  {
47  $this->imagetype = $a_imagetype;
48  }
49 
50  public function getImagetype(): ?string
51  {
52  return $this->imagetype;
53  }
54 
55  public function setLabel(string $a_label): void
56  {
57  $this->label = $a_label;
58  }
59 
60  public function getLabel(): string
61  {
62  return $this->label;
63  }
64 
65  public function setHeight(string $a_height): void
66  {
67  $this->height = $a_height;
68  }
69 
70  public function getHeight(): ?string
71  {
72  return $this->height;
73  }
74 
75  public function setWidth(string $a_width): void
76  {
77  $this->width = $a_width;
78  }
79 
80  public function getWidth(): ?string
81  {
82  return $this->width;
83  }
84 
85  public function setEmbedded(string $a_embedded): void
86  {
87  $this->embedded = $a_embedded;
88  }
89 
90  public function getEmbedded(): ?string
91  {
92  return $this->embedded;
93  }
94 
95  public function setUri(string $a_uri): void
96  {
97  $this->uri = $a_uri;
98  }
99 
100  public function getUri(): string
101  {
102  return $this->uri;
103  }
104 
105  public function setX0(string $a_x0): void
106  {
107  $this->x0 = $a_x0;
108  }
109 
110  public function getX0(): ?string
111  {
112  return $this->x0;
113  }
114 
115  public function setY0(string $a_y0): void
116  {
117  $this->y0 = $a_y0;
118  }
119 
120  public function getY0(): ?string
121  {
122  return $this->y0;
123  }
124 
125  public function setEntityref(string $a_entityref): void
126  {
127  $this->entityref = $a_entityref;
128  }
129 
130  public function getEntityref(): ?string
131  {
132  return $this->entityref;
133  }
134 
135  public function setContent(string $a_content): void
136  {
137  $this->content = $a_content;
138  }
139 
140  public function getContent(): string
141  {
142  return $this->content;
143  }
144 
148  public function getRawContent()
149  {
150  switch ($this->getEmbedded()) {
151  case self::EMBEDDED_BASE64:
152 
153  return base64_decode($this->getContent());
154  }
155 
156  return $this->getContent();
157  }
158 }
setContent(string $a_content)
setImagetype(string $a_imagetype)
setX0(string $a_x0)
setY0(string $a_y0)
setUri(string $a_uri)
setHeight(string $a_height)
setEntityref(string $a_entityref)
setLabel(string $a_label)
setWidth(string $a_width)
setEmbedded(string $a_embedded)