LimeSurvey API - Master branch

ConsoleApplication extends CConsoleApplication
in package
Uses LSApplicationTrait

Table of Contents

Properties

$api  : LimesurveyApi
$config  : mixed
$currentUserId  : mixed

Methods

__construct()  : mixed
createPublicUrl()  : string
Creates an absolute URL based on the given controller and action information.
getApi()  : mixed
Get the Api object.
getAssetManager()  : CAssetManager
getClientScript()  : CClientScript
Returns the client script manager.
getConfig()  : mixed
Returns a config variable from the config
getController()  : mixed
This function is implemented since em_core_manager incorrectly requires it to create urls.
getCurrentUserId()  : int|null
get the current id of connected user, check if user exist before return for security
getPluginManager()  : IApplicationComponent
Returns the plugin manager
getPublicBaseUrl()  : string
Returns the relative URL for the application while considering if a "publicurl" config parameter is set to a valid url
getSession()  : mixed
loadHelper()  : void
Loads a helper
setConfig()  : void
Sets a configuration variable into the config

Properties

Methods

__construct()

public __construct([mixed $aApplicationConfig = null ]) : mixed
Parameters
$aApplicationConfig : mixed = null

createPublicUrl()

Creates an absolute URL based on the given controller and action information.

public createPublicUrl(string $route[, array<string|int, mixed> $params = array() ][, string $schema = '' ][, string $ampersand = '&' ]) : string
Parameters
$route : string

the URL route. This should be in the format of 'ControllerID/ActionID'.

$params : array<string|int, mixed> = array()

additional GET parameters (name=>value). Both the name and value will be URL-encoded.

$schema : string = ''

schema to use (e.g. http, https). If empty, the schema used for the current request will be used.

$ampersand : string = '&'

the token separating name-value pairs in the URL.

Return values
string

the constructed URL

getAssetManager()

public getAssetManager() : CAssetManager
Return values
CAssetManager

the asset manager component

getClientScript()

Returns the client script manager.

public getClientScript() : CClientScript
Return values
CClientScript

the client script manager

getConfig()

Returns a config variable from the config

public getConfig([string $name = null ]) : mixed
Parameters
$name : string = null
Tags
access

public

getController()

This function is implemented since em_core_manager incorrectly requires it to create urls.

public getController() : mixed

getCurrentUserId()

get the current id of connected user, check if user exist before return for security

public getCurrentUserId() : int|null
Return values
int|null

user id, 0 mean invalid user

getPluginManager()

Returns the plugin manager

public getPluginManager() : IApplicationComponent
Return values
IApplicationComponent

getPublicBaseUrl()

Returns the relative URL for the application while considering if a "publicurl" config parameter is set to a valid url

public getPublicBaseUrl([bool $absolute = false ]) : string
Parameters
$absolute : bool = false

whether to return an absolute URL. Defaults to false, meaning returning a relative one.

Return values
string

the relative or the configured public URL for the application

loadHelper()

Loads a helper

public loadHelper(string $helper) : void
Parameters
$helper : string
Tags
access

public

setConfig()

Sets a configuration variable into the config

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

public


        
On this page

Search results