Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 16 |
|
0.00% |
0 / 6 |
CRAP | |
0.00% |
0 / 1 |
| tao_models_classes_table_StaticColumn | |
0.00% |
0 / 16 |
|
0.00% |
0 / 6 |
42 | |
0.00% |
0 / 1 |
| prepare | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getValue | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| fromArray | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| toArray | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| getDataProvider | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| 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 tao_models_classes_table_StaticColumn |
| 29 | * |
| 30 | * @access public |
| 31 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 32 | * @package tao |
| 33 | |
| 34 | */ |
| 35 | class tao_models_classes_table_StaticColumn extends tao_models_classes_table_Column implements |
| 36 | tao_models_classes_table_DataProvider |
| 37 | { |
| 38 | // --- ASSOCIATIONS --- |
| 39 | |
| 40 | |
| 41 | // --- ATTRIBUTES --- |
| 42 | |
| 43 | /** |
| 44 | * Short description of attribute value |
| 45 | * |
| 46 | * @access public |
| 47 | * @var string |
| 48 | */ |
| 49 | public $value = ''; |
| 50 | |
| 51 | // --- OPERATIONS --- |
| 52 | |
| 53 | /** |
| 54 | * Short description of method prepare |
| 55 | * |
| 56 | * @access public |
| 57 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 58 | * @param array resources |
| 59 | * @param array columns |
| 60 | * @return mixed |
| 61 | */ |
| 62 | public function prepare($resources, $columns) |
| 63 | { |
| 64 | |
| 65 | // nothing to do |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Short description of method getValue |
| 70 | * |
| 71 | * @access public |
| 72 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 73 | * @param Resource resource |
| 74 | * @param Column column |
| 75 | * @return string |
| 76 | */ |
| 77 | public function getValue(core_kernel_classes_Resource $resource, tao_models_classes_table_Column $column) |
| 78 | { |
| 79 | $returnValue = (string) ''; |
| 80 | |
| 81 | |
| 82 | $returnValue = $column->value; |
| 83 | |
| 84 | |
| 85 | return (string) $returnValue; |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Short description of method fromArray |
| 90 | * |
| 91 | * @access protected |
| 92 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 93 | * @param array array |
| 94 | * @return tao_models_classes_table_StaticColumn |
| 95 | */ |
| 96 | protected static function fromArray($array) |
| 97 | { |
| 98 | $returnValue = null; |
| 99 | |
| 100 | |
| 101 | $returnValue = new self($array['label'], $array['val']); |
| 102 | |
| 103 | |
| 104 | return $returnValue; |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Short description of method __construct |
| 109 | * |
| 110 | * @access public |
| 111 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 112 | * @param string label |
| 113 | * @param string value |
| 114 | * @return mixed |
| 115 | */ |
| 116 | public function __construct($label, $value) |
| 117 | { |
| 118 | |
| 119 | parent::__construct($label); |
| 120 | $this->value = $value; |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Short description of method toArray |
| 125 | * |
| 126 | * @access public |
| 127 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 128 | * @return array |
| 129 | */ |
| 130 | public function toArray() |
| 131 | { |
| 132 | $returnValue = []; |
| 133 | |
| 134 | |
| 135 | $returnValue = parent::toArray(); |
| 136 | $returnValue['val'] = $this->value; |
| 137 | |
| 138 | |
| 139 | return (array) $returnValue; |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Short description of method getDataProvider |
| 144 | * |
| 145 | * @access public |
| 146 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 147 | * @return tao_models_classes_table_DataProvider |
| 148 | */ |
| 149 | public function getDataProvider() |
| 150 | { |
| 151 | $returnValue = null; |
| 152 | |
| 153 | |
| 154 | $returnValue = $this; |
| 155 | |
| 156 | |
| 157 | return $returnValue; |
| 158 | } |
| 159 | } |