ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilRandomTestData.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
12{
13 protected $data = array();
14
21 function __construct($a_count = "", $a_qpl = "")
22 {
23 $this->data = array('count' => $a_count, 'qpl' => $a_qpl);
24 }
25
26 public function __get($property)
27 {
28 switch ($property)
29 {
30 case 'count':
31 if ((strlen($this->data[$property]) == 0) || (!is_numeric($this->data[$property]))) return 0;
32 return $this->data[$property];
33 break;
34 case 'qpl':
35 return $this->data[$property];
36 break;
37 default:
38 return null;
39 break;
40 }
41 }
42
43 public function __set($property, $value)
44 {
45 switch ($property)
46 {
47 case 'count':
48 case 'qpl':
49 $this->data[$property] = $value;
50 break;
51 default:
52 break;
53 }
54 }
55}
This class represents a random test input property in a property form.
__construct($a_count="", $a_qpl="")
Constructor.
__set($property, $value)