UserInputException.php
| 1 | <?php |
| 2 | /* |
| 3 | * |
| 4 | * JetBackup @ package |
| 5 | * Created By Idan Ben-Ezra |
| 6 | * |
| 7 | * Copyrights @ JetApps |
| 8 | * https://www.jetapps.com |
| 9 | * |
| 10 | **/ |
| 11 | namespace JetBackup\Exception; |
| 12 | |
| 13 | use Throwable; |
| 14 | |
| 15 | if (!defined( '__JETBACKUP__')) die('Direct access is not allowed'); |
| 16 | |
| 17 | class UserInputException extends JBException { |
| 18 | private array $_types; |
| 19 | private array $_data; |
| 20 | |
| 21 | /** |
| 22 | * @param string $message |
| 23 | * @param array $data |
| 24 | * @param array $types |
| 25 | * @param int $code |
| 26 | * @param throwable|null $previous |
| 27 | */ |
| 28 | public function __construct(string $message="", array $data=[], array $types=[], int $code = 0, ?throwable $previous=null) { |
| 29 | $this->_types = $types; |
| 30 | $this->_data = $data; |
| 31 | parent::__construct($message, $code, $previous); |
| 32 | } |
| 33 | |
| 34 | public function getTypes():array { return $this->_types; } |
| 35 | public function getData():array { return $this->_data; } |
| 36 | } |
| 37 |