Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| AdaptiveSectionInjectionException | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getInvalidItemIdentifiers | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setInvalidItemIdentifiers | |
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) 2017 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | namespace oat\taoQtiTest\models\cat; |
| 23 | |
| 24 | /** |
| 25 | * This Exception class must be thrown in reaction to an error occuring |
| 26 | * during a adaptive section injection process. |
| 27 | * |
| 28 | * @author Aleksej Tikhanovich <aleksej@taotesting.com> |
| 29 | * |
| 30 | */ |
| 31 | class AdaptiveSectionInjectionException extends CatException |
| 32 | { |
| 33 | private $invalidItemIdentifiers; |
| 34 | |
| 35 | /** |
| 36 | * Create a new AdaptiveSectionInjectionException object. |
| 37 | * |
| 38 | * @param string $message A human readable message explaining the error. |
| 39 | * @param array $invalidItemIdentifiers An array of string containing the invalid items identifiers. |
| 40 | * @param int $code (optional) A machine understandable error code. This should be used by very specific |
| 41 | * implementations only. |
| 42 | * @param \Exception $previous A previous caught exception that led to this one. |
| 43 | */ |
| 44 | public function __construct($message, array $invalidItemIdentifiers, $code = 0, \Exception $previous = null) |
| 45 | { |
| 46 | parent::__construct($message, $code, $previous); |
| 47 | $this->setInvalidItemIdentifiers($invalidItemIdentifiers); |
| 48 | } |
| 49 | |
| 50 | public function getInvalidItemIdentifiers() |
| 51 | { |
| 52 | return $this->invalidItemIdentifiers; |
| 53 | } |
| 54 | |
| 55 | private function setInvalidItemIdentifiers(array $invalidItemIdentifiers) |
| 56 | { |
| 57 | $this->invalidItemIdentifiers = $invalidItemIdentifiers; |
| 58 | } |
| 59 | } |