| 1 | <?php | ||
| 8 | class TrelloItemNotFoundException extends \Exception | ||
| 9 | { | ||
| 10 | /** | ||
| 11 | * @var array | ||
| 12 | */ | ||
| 13 | private static $itemTypes = [ | ||
| 14 | 'board', | ||
| 15 | 'list', | ||
| 16 | 'card', | ||
| 17 | ]; | ||
| 18 | |||
| 19 | /** | ||
| 20 | * @var string | ||
| 21 | */ | ||
| 22 | private $itemType; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * @var string | ||
| 26 | */ | ||
| 27 | private $itemName; | ||
| 28 | |||
| 29 | /** | ||
| 30 | * TrelloItemNotFoundException constructor. | ||
| 31 | * | ||
| 32 | * @param string $itemType | ||
| 33 | * @param string $itemName | ||
| 34 | * @param int $code | ||
| 35 | * @param \Exception|null $previous | ||
| 36 | */ | ||
| 37 | 7 | public function __construct(String $itemType, String $itemName, $code = 0, \Exception $previous = null) | |
| 49 | |||
| 50 | /** | ||
| 51 | * @param $itemType | ||
| 52 | * @param $itemName | ||
| 53 | * | ||
| 54 | * @return string | ||
| 55 | * | ||
| 56 | * @throws \Exception | ||
| 57 | */ | ||
| 58 | 7 | private static function getNotFoundMessage($itemType, $itemName) | |
| 66 | |||
| 67 | /** | ||
| 68 | * @return string | ||
| 69 | */ | ||
| 70 | 4 | public function getItemName() | |
| 74 | |||
| 75 | /** | ||
| 76 | * @return string | ||
| 77 | */ | ||
| 78 | 4 | public function getItemType() | |
| 82 | } | ||
| 83 |