wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
Application Class Reference

Public Member Functions

getInstance ()
 
 Application ()
 
 initialize ($configPath='include/', $mainConfigFile='config.ini', $defaultController='LoginController', $defaultContext='', $defaultAction='login', $defaultResponseFormat=MSG_FORMAT_HTML)
 
 getCallParameter ($name, $default)
 
 setupGlobals ($configPath='include/', $mainConfigFile='config.ini')
 
 getId ()
 

Public Attributes

 $_data = null
 

Detailed Description

The main application class. Does all the initialization.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 58 of file class.Application.php.

Member Function Documentation

& Application::getInstance ( )

Returns an instance of the class.

Returns
A reference to the only instance of the Singleton object

Definition at line 66 of file class.Application.php.

References Application().

Referenced by getCallParameter().

+ Here is the call graph for this function:

Application::Application ( )

Constructor

Definition at line 78 of file class.Application.php.

References $_data, $GLOBALS, and JSONUtil\decode().

Referenced by getInstance().

+ Here is the call graph for this function:

Application::initialize (   $configPath = 'include/',
  $mainConfigFile = 'config.ini',
  $defaultController = 'LoginController',
  $defaultContext = '',
  $defaultAction = 'login',
  $defaultResponseFormat = MSG_FORMAT_HTML 
)

Initialize the application.

  • Parses and processes the configuration
  • Sets global variables
  • Initialize the session and other main application classes
  • Extracts the application parameters
    Parameters
    configPathThe path where config files reside (as seen from main.php), optional [default: 'include/']
    mainConfigFileThe main configuration file to use, optional [default: 'config.ini']
    defaultControllerThe controller to call if none is given in request parameters, optional [default: 'LoginController']
    defaultContextThe context to set if none is given in request parameters, optional [default: '']
    defaultActionThe action to perform if none is given in request parameters, optional [default: 'login']
    defaultResponseFormatThe response format if none is given in request parameters, optional [default: MSG_FORMAT_HTML]
    Returns
    An associative array with keys 'action', 'context', 'controller', 'data'

Definition at line 106 of file class.Application.php.

References $GLOBALS, getCallParameter(), WCMFInifileParser\getInstance(), ObjectFactory\getInstance(), PersistenceFacade\getInstance(), RightsManager\getInstance(), SessionData\getInstance(), SessionData\init(), setupGlobals(), and WCMFException\throwEx().

+ Here is the call graph for this function:

Application::getCallParameter (   $name,
  $default 
)

Get a value from the call parameters (GET, POST variables)

Parameters
nameThe name of the parameter
defaultThe value to return, if no value is given
Returns
The value

Definition at line 181 of file class.Application.php.

References getInstance().

Referenced by initialize().

+ Here is the call graph for this function:

Application::setupGlobals (   $configPath = 'include/',
  $mainConfigFile = 'config.ini' 
)

Setup global variables. Does nothing related to session, users and persistence. Use this method if you just want to have all global variables initialized and need access to config values.

Parameters
configPathThe path where config files reside (as seen from main.php), maybe null [default: include/]
mainConfigFileThe main configuration file to use, maybe null [default: config.ini]

Definition at line 195 of file class.Application.php.

References $GLOBALS, WCMFInifileParser\getInstance(), and WCMFException\throwEx().

Referenced by initialize().

+ Here is the call graph for this function:

Application::getId ( )

Get an unique id for the application based on the installation location.

Returns
The id

Definition at line 222 of file class.Application.php.

Referenced by SessionData\getClassDefinitionFile().

Member Data Documentation

Application::$_data = null

Definition at line 60 of file class.Application.php.

Referenced by Application().


The documentation for this class was generated from the following file: