Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| AbstractAdapter | |
0.00% |
0 / 5 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| send | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
| getMessages | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| setMessages | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| addMessage | |
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) 2008-2010 (original work) Deutsche Institut für Internationale Pädagogische Forschung |
| 19 | * (under the project TAO-TRANSFER); |
| 20 | * 2009-2012 (update and modification) Public Research Centre Henri Tudor |
| 21 | * (under the project TAO-SUSTAIN & TAO-DEV); |
| 22 | * 2013 (update and modification) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
| 23 | * |
| 24 | */ |
| 25 | |
| 26 | namespace oat\tao\model\messaging\transportStrategy; |
| 27 | |
| 28 | use oat\tao\model\messaging\Message; |
| 29 | |
| 30 | /** |
| 31 | * Short description of class tao_helpers_transfert_Adapter |
| 32 | * |
| 33 | * @abstract |
| 34 | * |
| 35 | * @access public |
| 36 | * @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu> |
| 37 | * @package tao |
| 38 | * |
| 39 | */ |
| 40 | abstract class AbstractAdapter |
| 41 | { |
| 42 | /** |
| 43 | * Short description of method send |
| 44 | * |
| 45 | * @abstract |
| 46 | * |
| 47 | * @access public |
| 48 | * @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu> |
| 49 | * @return int |
| 50 | */ |
| 51 | abstract public function send(); |
| 52 | |
| 53 | /** |
| 54 | * Short description of attribute messages |
| 55 | * |
| 56 | * @access protected |
| 57 | * @var array |
| 58 | */ |
| 59 | protected $messages = []; |
| 60 | |
| 61 | // --- OPERATIONS --- |
| 62 | |
| 63 | /** |
| 64 | * Short description of method getMessages |
| 65 | * |
| 66 | * @access public |
| 67 | * @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu> |
| 68 | * @return array |
| 69 | */ |
| 70 | public function getMessages() |
| 71 | { |
| 72 | $returnValue = []; |
| 73 | |
| 74 | $returnValue = $this->messages; |
| 75 | |
| 76 | return (array) $returnValue; |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * Short description of method setMessages |
| 81 | * |
| 82 | * @access public |
| 83 | * @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu> |
| 84 | * @param |
| 85 | * array messages |
| 86 | * @return mixed |
| 87 | */ |
| 88 | public function setMessages($messages) |
| 89 | { |
| 90 | $this->messages = (array) $messages; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Short description of method addMessage |
| 95 | * |
| 96 | * @access public |
| 97 | * @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu> |
| 98 | * @param |
| 99 | * Message message |
| 100 | * @return mixed |
| 101 | */ |
| 102 | public function addMessage(Message $message) |
| 103 | { |
| 104 | $this->messages[] = $message; |
| 105 | } |
| 106 | } |