Deletes the currently saved action list.
It must be called after a successful login!
void
clearActionList
()
Returns a list of possible actions
array
getActionsList
()
Returns all available languages in the program
array
getAvailableLanguages
()
Returns the current called action.
string
getCurrentAction
()
Returns the current used language
string
getCurrentLanguage
()
Returns the current defined default action.
string
getDefaultAction
()
Returns the list of all actions, that should appear in the menu.
array
getMenuActions
()
Returns whether the user has rights for the given action.
boolean
hasUserRightForAction
(string $action)
-
string
$action: The class name of the requested action
Constructor.
Initializes all engines (Request, Session, Template engine, and so on)
myMVC_Controller
__construct
()
Process the request.
Action or View will be evaluated.
void
process
()
Set the available actions list.
void
setActions
(array $actions, string $defaultAction, [string $noRightAction = NULL])
-
array
$actions: Array of Action Class names (derived from myMVC_BaseAction)
-
string
$defaultAction: Name of the default Action (called if no Action was given)
-
string
$noRightAction: Name of the Action to be called if the current users does not have the rights for the called Action. If it is NULL, and the user doesn't have the rights, an Exception will be generated
Sets the filter for the controller.
A filter can be called before an action or a view IMPORTANT: just a filter per type can be defined!!
void
setFilter
(int $type, string $class, [array $exceptions = array()], [array $params = array()])
-
int
$type: Filter type (myMVC_Controller::$FILTER_PREACTION or myMVC_Controller::$FILTER_PREVIEW)
-
string
$class: The class of the filter (derived from myMVC_BaseFilter)
-
array
$exceptions: Optional list of classes (Action or View, depending on filter type, which has to be excluded from filter [aka: the controller will call this class, and not the filter])
-
array
$params: Optional parameters for the filter
Set the language information (GetText)
void
setLanguageInformation
(array $availableLanguages, string $defaultLanguage, string $getTextLocaleDir, $getTextLocaleDomain, [string $languageParameter = 'lang'])
-
array
$availableLanguages: Associative array of languages (code => description, eg. 'de_DE' => 'Deutsch')
-
string
$defaultLanguage: Default language. It MUST be one in the array $availableLanguages
-
string
$getTextLocaleDir: GetText Domain
-
string
$languageParameter: Name of the parameter with the new language (default: lang)
-
$getTextLocaleDomain
Set the render engine zu use for template.
Currently just myMVC_SmartyEngine is implemented.
void
setRenderEngine
(class $class)
-
class
$class: The render engine. It must be a subclass of myMVC_BaseEngine
Set the available views list.
void
setViews
(array $views)
-
array
$views: Array of View Class names (derived from myMVC_BaseView)