ILIAS  release_8 Revision v8.23
ilSurveyMaterial Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilSurveyMaterial:

Public Member Functions

 __construct ()
 
 __set (string $name, string $value)
 
 __get (string $name)
 

Data Fields

const MATERIAL_TYPE_INTERNALLINK = 0
 
const MATERIAL_TYPE_URL = 1
 
const MATERIAL_TYPE_FILE = 2
 

Protected Attributes

array $data
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Survey material class

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Todo:
move to propert dto, get rid of magic functions

Definition at line 24 of file class.ilSurveyMaterial.php.

Constructor & Destructor Documentation

◆ __construct()

ilSurveyMaterial::__construct ( )

Definition at line 31 of file class.ilSurveyMaterial.php.

32  {
33  $this->data = array(
34  'type' => self::MATERIAL_TYPE_INTERNALLINK,
35  'internal_link' => '',
36  'title' => '',
37  'url' => '',
38  'filename' => ''
39  );
40  }

Member Function Documentation

◆ __get()

ilSurveyMaterial::__get ( string  $name)

Definition at line 47 of file class.ilSurveyMaterial.php.

References $name.

47  : ?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  }
if($format !==null) $name
Definition: metadata.php:247

◆ __set()

ilSurveyMaterial::__set ( string  $name,
string  $value 
)

Definition at line 42 of file class.ilSurveyMaterial.php.

References $name.

42  : void
43  {
44  $this->data[$name] = $value;
45  }
if($format !==null) $name
Definition: metadata.php:247

Field Documentation

◆ $data

array ilSurveyMaterial::$data
protected

Definition at line 29 of file class.ilSurveyMaterial.php.

◆ MATERIAL_TYPE_FILE

const ilSurveyMaterial::MATERIAL_TYPE_FILE = 2

Definition at line 28 of file class.ilSurveyMaterial.php.

◆ MATERIAL_TYPE_INTERNALLINK

const ilSurveyMaterial::MATERIAL_TYPE_INTERNALLINK = 0

Definition at line 26 of file class.ilSurveyMaterial.php.

◆ MATERIAL_TYPE_URL

const ilSurveyMaterial::MATERIAL_TYPE_URL = 1

Definition at line 27 of file class.ilSurveyMaterial.php.


The documentation for this class was generated from the following file: