ILIAS  release_8 Revision v8.24
class.ilSurveyMaterial.php
Go to the documentation of this file.
1<?php
2
25{
27 public const MATERIAL_TYPE_URL = 1;
28 public const MATERIAL_TYPE_FILE = 2;
29 protected array $data;
30
31 public function __construct()
32 {
33 $this->data = array(
34 'type' => self::MATERIAL_TYPE_INTERNALLINK,
35 'internal_link' => '',
36 'title' => '',
37 'url' => '',
38 'filename' => ''
39 );
40 }
41
42 public function __set(string $name, string $value): void
43 {
44 $this->data[$name] = $value;
45 }
46
47 public function __get(string $name): ?string
48 {
49 if (array_key_exists($name, $this->data)) {
50 switch ($name) {
51 case 'internal_link':
52 case 'import_id':
53 case 'material_title':
54 case 'text_material':
55 case 'file_material':
56 case 'external_link':
57 return (strlen($this->data[$name])) ? $this->data[$name] : null;
58 default:
59 return $this->data[$name];
60 }
61 }
62 return null;
63 }
64}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__set(string $name, string $value)
if($format !==null) $name
Definition: metadata.php:247