| Code Coverage | ||||||||||
| Lines | Functions and Methods | Classes and Traits | ||||||||
| Total |  | 0.00% | 0 / 4 |  | 0.00% | 0 / 3 | CRAP |  | 0.00% | 0 / 1 | 
| CatEngineNotFoundException |  | 0.00% | 0 / 4 |  | 0.00% | 0 / 3 | 12 |  | 0.00% | 0 / 1 | 
| __construct |  | 0.00% | 0 / 2 |  | 0.00% | 0 / 1 | 2 | |||
| getRequestedEndpoint |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| setRequestedEndpoint |  | 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 | * CAT Engine Not Found Exception. | 
| 26 | * | 
| 27 | * This Exception must be thrown in case a CAT Engine is requested but | 
| 28 | * not endpoint configuration could be found for it. | 
| 29 | */ | 
| 30 | class CatEngineNotFoundException extends CatException | 
| 31 | { | 
| 32 | /** @var string The requested endpoint URL. */ | 
| 33 | private $requestedEndpoint; | 
| 34 | |
| 35 | /** | 
| 36 | * New CatEngineNotFoundException object. | 
| 37 | * | 
| 38 | * Creates a new CatEngineNotFoundException object to be thrown. | 
| 39 | * | 
| 40 | * @param string $message | 
| 41 | * @param string $requestedEndpoint The requested endpoint URL that made the exception occuring. | 
| 42 | * @param integer $code | 
| 43 | * @param \Exception $previous | 
| 44 | */ | 
| 45 | public function __construct($message, $requestedEndpoint, $code = 0, \Exception $previous = null) | 
| 46 | { | 
| 47 | parent::__construct($message, $code, $previous); | 
| 48 | $this->setRequestedEndpoint($requestedEndpoint); | 
| 49 | } | 
| 50 | |
| 51 | /** | 
| 52 | * Get Requested Endpoint. | 
| 53 | * | 
| 54 | * Get the requested endpoint URL. | 
| 55 | * | 
| 56 | * @return string | 
| 57 | */ | 
| 58 | public function getRequestedEndpoint() | 
| 59 | { | 
| 60 | return $this->requestedEndpoint; | 
| 61 | } | 
| 62 | |
| 63 | /** | 
| 64 | * Set Requested Endpoint. | 
| 65 | * | 
| 66 | * Set the requested endpoint URL. | 
| 67 | * | 
| 68 | * @param string $requestedEndpoint | 
| 69 | */ | 
| 70 | private function setRequestedEndpoint($requestedEndpoint) | 
| 71 | { | 
| 72 | $this->requestedEndpoint = $requestedEndpoint; | 
| 73 | } | 
| 74 | } |