diff options
Diffstat (limited to 'wiki/inc/Action/Exception')
-rw-r--r-- | wiki/inc/Action/Exception/ActionAbort.php | 20 | ||||
-rw-r--r-- | wiki/inc/Action/Exception/ActionAclRequiredException.php | 17 | ||||
-rw-r--r-- | wiki/inc/Action/Exception/ActionDisabledException.php | 17 | ||||
-rw-r--r-- | wiki/inc/Action/Exception/ActionException.php | 66 | ||||
-rw-r--r-- | wiki/inc/Action/Exception/ActionUserRequiredException.php | 17 | ||||
-rw-r--r-- | wiki/inc/Action/Exception/FatalException.php | 29 | ||||
-rw-r--r-- | wiki/inc/Action/Exception/NoActionException.php | 15 |
7 files changed, 0 insertions, 181 deletions
diff --git a/wiki/inc/Action/Exception/ActionAbort.php b/wiki/inc/Action/Exception/ActionAbort.php deleted file mode 100644 index 9c188bb..0000000 --- a/wiki/inc/Action/Exception/ActionAbort.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace dokuwiki\Action\Exception; - -/** - * Class ActionAbort - * - * Strictly speaking not an Exception but an expected execution path. Used to - * signal when one action is done and another should take over. - * - * If you want to signal the same but under some error condition use ActionException - * or one of it's decendants. - * - * The message will NOT be shown to the enduser - * - * @package dokuwiki\Action\Exception - */ -class ActionAbort extends ActionException { - -} diff --git a/wiki/inc/Action/Exception/ActionAclRequiredException.php b/wiki/inc/Action/Exception/ActionAclRequiredException.php deleted file mode 100644 index 64a2c61..0000000 --- a/wiki/inc/Action/Exception/ActionAclRequiredException.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace dokuwiki\Action\Exception; - -/** - * Class ActionAclRequiredException - * - * Thrown by AbstractACLAction when an action requires that the ACL subsystem is - * enabled but it isn't. You should not use it - * - * The message will NOT be shown to the enduser - * - * @package dokuwiki\Action\Exception - */ -class ActionAclRequiredException extends ActionException { - -} diff --git a/wiki/inc/Action/Exception/ActionDisabledException.php b/wiki/inc/Action/Exception/ActionDisabledException.php deleted file mode 100644 index 40a0c7d..0000000 --- a/wiki/inc/Action/Exception/ActionDisabledException.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace dokuwiki\Action\Exception; - -/** - * Class ActionDisabledException - * - * Thrown when the requested action has been disabled. Eg. through the 'disableactions' - * config setting. You should probably not use it. - * - * The message will NOT be shown to the enduser, but a generic information will be shown. - * - * @package dokuwiki\Action\Exception - */ -class ActionDisabledException extends ActionException { - -} diff --git a/wiki/inc/Action/Exception/ActionException.php b/wiki/inc/Action/Exception/ActionException.php deleted file mode 100644 index 381584c..0000000 --- a/wiki/inc/Action/Exception/ActionException.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -namespace dokuwiki\Action\Exception; - -/** - * Class ActionException - * - * This exception and its subclasses signal that the current action should be - * aborted and a different action should be used instead. The new action can - * be given as parameter in the constructor. Defaults to 'show' - * - * The message will NOT be shown to the enduser - * - * @package dokuwiki\Action\Exception - */ -class ActionException extends \Exception { - - /** @var string the new action */ - protected $newaction; - - /** @var bool should the exception's message be shown to the user? */ - protected $displayToUser = false; - - /** - * ActionException constructor. - * - * When no new action is given 'show' is assumed. For requests that originated in a POST, - * a 'redirect' is used which will cause a redirect to the 'show' action. - * - * @param string|null $newaction the action that should be used next - * @param string $message optional message, will not be shown except for some dub classes - */ - public function __construct($newaction = null, $message = '') { - global $INPUT; - parent::__construct($message); - if(is_null($newaction)) { - if(strtolower($INPUT->server->str('REQUEST_METHOD')) == 'post') { - $newaction = 'redirect'; - } else { - $newaction = 'show'; - } - } - - $this->newaction = $newaction; - } - - /** - * Returns the action to use next - * - * @return string - */ - public function getNewAction() { - return $this->newaction; - } - - /** - * Should this Exception's message be shown to the user? - * - * @param null|bool $set when null is given, the current setting is not changed - * @return bool - */ - public function displayToUser($set = null) { - if(!is_null($set)) $this->displayToUser = $set; - return $set; - } -} diff --git a/wiki/inc/Action/Exception/ActionUserRequiredException.php b/wiki/inc/Action/Exception/ActionUserRequiredException.php deleted file mode 100644 index aab06cc..0000000 --- a/wiki/inc/Action/Exception/ActionUserRequiredException.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace dokuwiki\Action\Exception; - -/** - * Class ActionUserRequiredException - * - * Thrown by AbstractUserAction when an action requires that a user is logged - * in but it isn't. You should not use it. - * - * The message will NOT be shown to the enduser - * - * @package dokuwiki\Action\Exception - */ -class ActionUserRequiredException extends ActionException { - -} diff --git a/wiki/inc/Action/Exception/FatalException.php b/wiki/inc/Action/Exception/FatalException.php deleted file mode 100644 index 5f2516f..0000000 --- a/wiki/inc/Action/Exception/FatalException.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -namespace dokuwiki\Action\Exception; - -/** - * Class FatalException - * - * A fatal exception during handling the action - * - * Will abort all handling and display some info to the user. The HTTP status code - * can be defined. - * - * @package dokuwiki\Action\Exception - */ -class FatalException extends \Exception { - - protected $status; - - /** - * FatalException constructor. - * - * @param string $message the message to send - * @param int $status the HTTP status to send - * @param null|\Exception $previous previous exception - */ - public function __construct($message = 'A fatal error occured', $status = 500, $previous = null) { - parent::__construct($message, $status, $previous); - } -} diff --git a/wiki/inc/Action/Exception/NoActionException.php b/wiki/inc/Action/Exception/NoActionException.php deleted file mode 100644 index 1c4e4d0..0000000 --- a/wiki/inc/Action/Exception/NoActionException.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -namespace dokuwiki\Action\Exception; - -/** - * Class NoActionException - * - * Thrown in the ActionRouter when a wanted action can not be found. Triggers - * the unknown action event - * - * @package dokuwiki\Action\Exception - */ -class NoActionException extends \Exception { - -} |