| [ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 241 lines (7 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
ActionRouter:: (8 methods):
__construct()
getInstance()
setupAction()
transitionAction()
handleFatalException()
loadAction()
checkAction()
getAction()
Class: ActionRouter - X-Ref
Class ActionRouter| __construct() X-Ref |
| ActionRouter constructor. Singleton, thus protected! Sets up the correct action based on the $ACT global. Writes back the selected action to $ACT |
| getInstance($reinit = false) X-Ref |
| Get the singleton instance return: ActionRouter param: bool $reinit |
| setupAction(&$actionname) X-Ref |
| Setup the given action Instantiates the right class, runs permission checks and pre-processing and sets $action triggers: ACTION_ACT_PREPROCESS param: string $actionname this is passed as a reference to $ACT, for plugin backward compatibility |
| transitionAction($from, $to, $e = null) X-Ref |
| Transitions from one action to another Basically just calls setupAction() again but does some checks before. param: string $from current action name param: string $to new action name param: null|ActionException $e any previous exception that caused the transition |
| handleFatalException(\Throwable $e) X-Ref |
| Aborts all processing with a message When a FataException instanc is passed, the code is treated as Status code param: \Exception|FatalException $e |
| loadAction($actionname) X-Ref |
| Load the given action Each action name maps to exactly one class. A name made up of letters and digits maps to the class of the same name with an uppercased first letter. The export modes and profile_delete are the only action names containing underscores. Any other name does not name an action. Example: 'media' -> Media, 'export_odt_book' -> Export return: AbstractAction param: string $actionname the name of the action to load |
| checkAction(AbstractAction $action) X-Ref |
| Execute all the checks to see if this action can be executed param: AbstractAction $action |
| getAction() X-Ref |
| Returns the action handling the current request return: AbstractAction |