ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 public 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 case 'count':
30 if ((strlen($this->data[$property]) == 0) || (!is_numeric($this->data[$property]))) {
31 return 0;
32 }
33 return $this->data[$property];
34 break;
35 case 'qpl':
36 return $this->data[$property];
37 break;
38 default:
39 return null;
40 break;
41 }
42 }
43
44 public function __set($property, $value)
45 {
46 switch ($property) {
47 case 'count':
48 case 'qpl':
49 $this->data[$property] = $value;
50 break;
51 default:
52 break;
53 }
54 }
55}
An exception for terminatinating execution or to throw for unit testing.
This class represents a random test input property in a property form.
__construct($a_count="", $a_qpl="")
Constructor.
__set($property, $value)
$this data['403_header']