Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
40.00% |
2 / 5 |
|
40.00% |
2 / 5 |
CRAP | |
0.00% |
0 / 1 |
| PortableElementModelTrait | |
40.00% |
2 / 5 |
|
40.00% |
2 / 5 |
10.40 | |
0.00% |
0 / 1 |
| getModel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setModel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getModelId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getModelLabel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getNamespace | |
0.00% |
0 / 1 |
|
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) 2016 (original work) Open Assessment Technologies SA; |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | namespace oat\taoQtiItem\model\portableElement\model; |
| 23 | |
| 24 | trait PortableElementModelTrait |
| 25 | { |
| 26 | /** |
| 27 | * @var PortableElementModel |
| 28 | */ |
| 29 | protected $model; |
| 30 | |
| 31 | /** |
| 32 | * @return PortableElementModel |
| 33 | */ |
| 34 | public function getModel() |
| 35 | { |
| 36 | return $this->model; |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * @param PortableElementModel $model |
| 41 | */ |
| 42 | public function setModel(PortableElementModel $model) |
| 43 | { |
| 44 | $this->model = $model; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * @return string |
| 49 | */ |
| 50 | public function getModelId() |
| 51 | { |
| 52 | return $this->model->getId(); |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * @return string |
| 57 | */ |
| 58 | public function getModelLabel() |
| 59 | { |
| 60 | return $this->model->getLabel(); |
| 61 | } |
| 62 | |
| 63 | public function getNamespace() |
| 64 | { |
| 65 | return $this->model->getNamespace(); |
| 66 | } |
| 67 | } |