[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Action/Exception/ -> ActionException.php (summary)

(no description)

File Size: 69 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ActionException:: (3 methods):
  __construct()
  getNewAction()
  displayToUser()


Class: ActionException  - X-Ref

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

__construct($newaction = null, $message = '')   X-Ref
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

getNewAction()   X-Ref
Returns the action to use next

return: string

displayToUser($set = null)   X-Ref
Should this Exception's message be shown to the user?

return: bool
param: null|bool $set when null is given, the current setting is not changed