LSYii_Application

Extends \CWebApplication

Implements global config

Methods

Initiates the application

__construct($aApplicationConfig = null) : void
access

public

Arguments

$aApplicationConfig

init

init() 

initLanguage

initLanguage() 

Loads a helper

loadHelper(string $helper) : void
access

public

Arguments

$helper

string

Loads a library

loadLibrary($library) : void
access

public

Arguments

$library

Sets a configuration variable into the config

setConfig(string $name, mixed $value) : void
access

public

Arguments

$name

string

$value

mixed

Set a 'flash message'.

setFlashMessage(string $message, string $type = 'success') : \LSYii_Application

A flahs message will be shown on the next request and can contain a message to tell that the action was successful or not. The message is displayed and cleared when it is shown in the view using the widget: $this->widget('application.extensions.FlashMessage.FlashMessage');

Arguments

$message

string

The message you want to show on next page load

$type

string

Type can be 'success','info','warning','danger','error' which relate to the particular bootstrap alert classes - see http://getbootstrap.com/components/#alerts . Note: Option 'error' is synonymous to 'danger'

Response

\LSYii_Application

Provides a fluent interface

Loads a config from a file

loadConfig(string $file) : void
access

public

Arguments

$file

string

Returns a config variable from the config

getConfig(string $name, \type $default = false) : mixed
access

public

Arguments

$name

string

$default

\type

Value to return when not found, default is false

Response

mixed

For future use, cache the language app wise as well.

setLanguage($sLanguage) : void
access

public

Arguments

$sLanguage

Get the Api object.

getApi() 

Get the pluginManager

getPluginManager() : \PluginManager

Response

\PluginManager

The pre-filter for controller actions.

beforeControllerAction(\CController $controller, \CAction $action) : boolean

This method is invoked before the currently requested controller action and all its filters are executed. You may override this method with logic that needs to be done before all controller actions.

Arguments

$controller

\CController

the controller

$action

\CAction

the action

Response

boolean

whether the action should be executed.

Used by PluginHelper to make the controlling plugin available from everywhere, e.g. from the plugin's models.

setPlugin(mixed $plugin) : void

Corresponds to Yii::app()->getController()

Arguments

$plugin

mixed

Return plugin, if any

getPlugin() : object

Response

object

Properties

config

config : 

api

api : \LimesurveyApi
var

Type(s)

\LimesurveyApi

If a plugin action is accessed through the PluginHelper, store it here.

plugin : \iPlugin
var

Type(s)

\iPlugin

log

log : \CLogRouter

Log router component.

Type(s)

\CLogRouter