Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
| AbstractContainer | |
0.00% |
0 / 7 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 1 |
| setId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRuntimeParams | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getRuntimeParams | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| jsonSerialize | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| getExecutionContainer | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
| 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 | namespace oat\taoDelivery\model\container\delivery; |
| 22 | |
| 23 | use oat\taoDelivery\model\execution\DeliveryExecution; |
| 24 | use oat\taoDelivery\model\container\DeliveryContainer; |
| 25 | use oat\oatbox\Configurable; |
| 26 | use Zend\ServiceManager\ServiceLocatorAwareInterface; |
| 27 | use Zend\ServiceManager\ServiceLocatorAwareTrait; |
| 28 | |
| 29 | abstract class AbstractContainer extends Configurable implements |
| 30 | DeliveryContainer, |
| 31 | ServiceLocatorAwareInterface, |
| 32 | \JsonSerializable |
| 33 | { |
| 34 | use ServiceLocatorAwareTrait; |
| 35 | |
| 36 | private $containerId; |
| 37 | |
| 38 | private $params; |
| 39 | |
| 40 | public function setId($containerId) |
| 41 | { |
| 42 | $this->containerId = $containerId; |
| 43 | } |
| 44 | |
| 45 | public function setRuntimeParams($params) |
| 46 | { |
| 47 | $this->params = $params; |
| 48 | } |
| 49 | |
| 50 | public function getRuntimeParams() |
| 51 | { |
| 52 | return $this->params; |
| 53 | } |
| 54 | |
| 55 | public function jsonSerialize() |
| 56 | { |
| 57 | return [ |
| 58 | 'container' => $this->containerId, |
| 59 | 'params' => $this->params |
| 60 | ]; |
| 61 | } |
| 62 | |
| 63 | abstract public function getExecutionContainer(DeliveryExecution $execution); |
| 64 | } |