Tariqa  3.0
 All Data Structures Namespaces Files Functions Variables Enumerations
Application Class Reference
Inheritance diagram for Application:
mModularApplication mApplication mBaseApplication

Public Member Functions

 __construct ($application_config)
 getTranslationTable ($section=false)
 getModuleTranslationTable ($module)
 getLanguageList ()
 getDefaultLanguage ()
 getCurrentLanguage ()
 setCurrentLanguage ($language)
 loadTranslationTable ($language)
 translate ($section, $keys)

Static Public Member Functions

static checkPhpSettings ()

Data Fields

const ERROR_LEXIS = 'lexisnexis'
const ERROR_AUTH = 'authentication'
const ERROR_SOAP = 'soap'
const ERROR_GENERAL = 'general'
const ERROR_PRIVILEGES = 'privileges'
const MODULES_BASE_FOLDER = 'modules'
const TRANSLATION_ROOT_SECTION = 'root'
const TRANSLATION_MODULE_SECTION = 'module'
 $db

Protected Member Functions

 onException ($e)
 onInitialize ()

Protected Attributes

 $translationTable
 $currentLanguage

Constructor & Destructor Documentation

__construct ( application_config)

Constructs the application module

Parameters:
array$application_configThe application params. The array should be an associative array If you want to send the config path and the config format just send an array like array('path' => 'my_path', 'format' => 'my_format') If you want to send the config array directly, just send an array like array('config' => $my_config)
Returns:
void

Reimplemented from mModularApplication.


Member Function Documentation

static checkPhpSettings ( ) [static]

Checks PHP settings

Returns:
bool
getCurrentLanguage ( ) [final]

Get the id of the currently selected language

Returns:
string
getDefaultLanguage ( ) [final]

Get the id of the default language as set in the configuration file

Returns:
string
getLanguageList ( ) [final]

Get the list of language id set in the configuration file (used for text translation)

Returns:
string[]
getModuleTranslationTable ( module) [final]

Returns the current translation table

Parameters:
string$moduleKey of the module
Returns:
array
getTranslationTable ( section = false) [final]

Returns the current translation table

Parameters:
string$sectionSection Id
Returns:
array
loadTranslationTable ( language) [final]

Load the translation table for a given language

Parameters:
string$languageLanguage Id
string$sectionSection Id
Returns:
void;
onException ( e) [protected]

Handle exceptions thrown by the modules protected

Reimplemented from mModularApplication.

onInitialize ( ) [protected]

Initializes the application protected

Returns:
void

Reimplemented from mModularApplication.

setCurrentLanguage ( language) [final]

Set the id of the currently selected language (and reload the translation table)

Parameters:
string$languageLanguage id
translate ( section,
keys 
) [final]

Get the translated text corresponding to a key or to a set of keys

Parameters:
string$sectionThe section's id
string | array | object$keysThe key, an array of keys, or an object (properties used as keys)
Returns:
string|array|object Returns the tanslated text or an array or object containing translated text

Field Documentation

$currentLanguage [protected]
$db
$translationTable [protected]
const ERROR_AUTH = 'authentication'

The Authentication error type

const ERROR_GENERAL = 'general'

The LexisNexis error type

const ERROR_LEXIS = 'lexisnexis'

The LexisNexis error type

const ERROR_PRIVILEGES = 'privileges'

The LexisNexis error type

const ERROR_SOAP = 'soap'

The LexisNexis error type

const MODULES_BASE_FOLDER = 'modules'
const TRANSLATION_MODULE_SECTION = 'module'
const TRANSLATION_ROOT_SECTION = 'root'

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