1 | <?php |
||
16 | class ActionException extends \Exception { |
||
17 | |||
18 | /** @var string the new action */ |
||
19 | protected $newaction; |
||
20 | |||
21 | /** @var bool should the exception's message be shown to the user? */ |
||
22 | protected $displayToUser = false; |
||
23 | |||
24 | /** |
||
25 | * ActionException constructor. |
||
26 | * |
||
27 | * When no new action is given 'show' is assumed. For requests that originated in a POST, |
||
28 | * a 'redirect' is used which will cause a redirect to the 'show' action. |
||
29 | * |
||
30 | * @param string|null $newaction the action that should be used next |
||
31 | * @param string $message optional message, will not be shown except for some dub classes |
||
32 | */ |
||
33 | public function __construct($newaction = null, $message = '') { |
||
46 | |||
47 | /** |
||
48 | * Returns the action to use next |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getNewAction() { |
||
55 | |||
56 | /** |
||
57 | * Should this Exception's message be shown to the user? |
||
58 | * |
||
59 | * @param null|bool $set when null is given, the current setting is not changed |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function displayToUser($set = null) { |
||
66 | } |
||
67 |