InstallerController

Extends \CController

Installer

todo

Output code belongs into view

package

LimeSurvey

author

Shubham Sachdeva

copyright

2011

access

public

Methods

Checks for action specific authorization and then executes an action

run(string $action = 'index') : boolean|null
access

public

Arguments

$action

string

Response

boolean|null

Installer::_checkInstallation()

_checkInstallation() 

Based on existance of 'sample_installer_file.txt' file, check if installation should proceed further or not.

Load and set session vars

_sessioncontrol() : void
access

protected

welcome and language selection install step

stepWelcome() 

Display license

stepLicense() 

display the license file as IIS for example does not display it via the server.

stepViewLicense() 

check a few writing permissions and optional settings

stepPreInstallationCheck() 

Configure database screen

stepDatabaseConfiguration() 

Installer::stepCreateDb() Create database.

stepCreateDb() 

Installer::stepPopulateDb() Function to populate the database.

stepPopulateDb() 

Optional settings screen

stepOptionalConfiguration() 

Loads a helper

loadHelper(string $helper) : void
access

public

Arguments

$helper

string

Loads a library

loadLibrary($library) : void
access

public

Arguments

$library

check requirements

_check_requirements($aData) : bool

Arguments

$aData

Response

bool

requirements met

Installer::_setup_tables() Function that actually modify the database. Read $sqlfile and execute it.

_setup_tables(string $sFileName, $aDbConfig = array(), $sDatabasePrefix = '') : \Empty

Arguments

$sFileName

string

$aDbConfig

$sDatabasePrefix

Response

\Empty

string if everything was okay - otherwise the error messages

Executes an SQL file

_executeSQLFile(string $sFileName, string $sDatabasePrefix) 

Arguments

$sFileName

string

$sDatabasePrefix

string

Function to write given database settings in APPPATH.'config/config.php'

_writeConfigFile() 

Create a random ASCII string

_getRandomString() : string

Response

string

Get the dsn for the database connection

_getDsn(string $sDatabaseType, $sDatabaseLocation, string $sDatabasePort, $sDatabaseName, $sDatabaseUser, $sDatabasePwd) : string

Arguments

$sDatabaseType

string

$sDatabaseLocation

$sDatabasePort

string

$sDatabaseName

$sDatabaseUser

$sDatabasePwd

Response

string

Get the default port if database port is not set

_getDbPort(string $sDatabaseType, string $sDatabasePort = '') : string

Arguments

$sDatabaseType

string

$sDatabasePort

string

Response

string

Gets the database configuration from the session

_getDatabaseConfig() : array

Response

array

Database Config

Connect to the database

_dbConnect(array $aDbConfig = array(), array $aData = array()) : bool

Arguments

$aDbConfig

array

: The config to be tested

$aData

array

Response

bool

Trye a connexion to the DB and add error in model if exist

dbTest(array $aDbConfig = array(), array $aData = array()) : \void,

Arguments

$aDbConfig

array

: The config to be tested

$aData

array

Response

\void,

bool if connection is done

Contains a number of extensions that can be expected to be installed by default, but maybe not on BSD systems etc.

checkDefaultExtensions() : void

Check them silently and die if they are missing.

Properties

connection

connection : \CDbConnection
var

Type(s)

\CDbConnection

clang

lang : 

layout

layout :