Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
10 / 10 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
1 / 1 |
common_configuration_Component | |
100.00% |
10 / 10 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
check | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
isOptional | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
setOptional | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getName | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
setName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License |
6 | * as published by the Free Software Foundation; under version 2 |
7 | * of the License (non-upgradable). |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | * |
18 | * Copyright (c) 2002-2008 (original work) Public Research Centre Henri Tudor & University of Luxembourg |
19 | * (under the project TAO & TAO2); |
20 | * 2008-2010 (update and modification) Deutsche Institut für Internationale Pädagogische Forschung |
21 | * (under the project TAO-TRANSFER); |
22 | * 2009-2012 (update and modification) Public Research Centre Henri Tudor |
23 | * (under the project TAO-SUSTAIN & TAO-DEV); |
24 | * |
25 | */ |
26 | |
27 | /** |
28 | * Short description of class common_configuration_Component |
29 | * |
30 | * @abstract |
31 | * @access public |
32 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
33 | * @package generis |
34 | |
35 | */ |
36 | abstract class common_configuration_Component |
37 | { |
38 | // --- ASSOCIATIONS --- |
39 | |
40 | |
41 | // --- ATTRIBUTES --- |
42 | |
43 | /** |
44 | * Short description of attribute optional |
45 | * |
46 | * @access private |
47 | * @var boolean |
48 | */ |
49 | private $optional = false; |
50 | |
51 | /** |
52 | * Short description of attribute name |
53 | * |
54 | * @access private |
55 | * @var string |
56 | */ |
57 | private $name = ''; |
58 | |
59 | // --- OPERATIONS --- |
60 | |
61 | /** |
62 | * Short description of method __construct |
63 | * |
64 | * @access public |
65 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
66 | * @param string name |
67 | * @param boolean optional |
68 | * @return mixed |
69 | */ |
70 | public function __construct($name = 'unknown', $optional = false) |
71 | { |
72 | |
73 | $this->setName($name); |
74 | $this->setOptional($optional); |
75 | } |
76 | |
77 | /** |
78 | * Short description of method check |
79 | * |
80 | * @abstract |
81 | * @access public |
82 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
83 | * @return common_configuration_Report |
84 | */ |
85 | abstract public function check(); |
86 | |
87 | /** |
88 | * Short description of method isOptional |
89 | * |
90 | * @access public |
91 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
92 | * @return boolean |
93 | */ |
94 | public function isOptional() |
95 | { |
96 | $returnValue = (bool) false; |
97 | |
98 | |
99 | $returnValue = $this->optional; |
100 | |
101 | |
102 | return (bool) $returnValue; |
103 | } |
104 | |
105 | /** |
106 | * Short description of method setOptional |
107 | * |
108 | * @access public |
109 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
110 | * @param boolean optional |
111 | * @return void |
112 | */ |
113 | public function setOptional($optional) |
114 | { |
115 | |
116 | $this->optional = $optional; |
117 | } |
118 | |
119 | /** |
120 | * Short description of method getName |
121 | * |
122 | * @access public |
123 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
124 | * @return string |
125 | */ |
126 | public function getName() |
127 | { |
128 | $returnValue = (string) ''; |
129 | |
130 | |
131 | $returnValue = $this->name; |
132 | |
133 | |
134 | return (string) $returnValue; |
135 | } |
136 | |
137 | /** |
138 | * Short description of method setName |
139 | * |
140 | * @access public |
141 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
142 | * @param string name |
143 | * @return void |
144 | */ |
145 | public function setName($name) |
146 | { |
147 | |
148 | $this->name = $name; |
149 | } |
150 | } |