LimeSurvey API - Master branch

InstallerController extends CController
in package

Installer

Tags
copyright

2019

access

public

Table of Contents

Properties

$connection  : CDbConnection
$lang  : mixed
clang
$layout  : mixed

Methods

checkDirectoryWriteable()  : bool
check if directory exists and is writeable, returns via parameters by reference
checkFileWriteable()  : bool
check if file exists and is writeable, returns via parameters by reference
checkPathWriteable()  : bool
check if file or directory exists and is writeable, returns via parameters by reference
checkPHPFunctionOrClass()  : bool
Check for a specific PHP Function or class, updates HTML image
chekHtmlImage()  : string
check image HTML template
executeSQLFile()  : mixed
Executes an SQL file
isWritableRecursive()  : mixed
loadHelper()  : void
Loads a helper
loadLibrary()  : void
Loads a library
run()  : void
Checks for action specific authorization and then executes an action
stepCreateDb()  : void
Installer::stepCreateDb() Create database.
stepPopulateDb()  : void
Installer::stepPopulateDb() Function to populate the database.
stepViewLicense()  : mixed
display the license file as IIS for example does not display it via the server.
sessioncontrol()  : void
Load and set session vars
checkDefaultExtensions()  : void
Contains a number of extensions that can be expected to be installed by default, but maybe not on BSD systems etc.
checkInstallation()  : void
Installer::checkInstallation()
checkRequirements()  : bool
check requirements
clearSession()  : mixed
clear the session from installation information
getDatabaseConfigArray()  : array<string|int, mixed>
Use with \Yii::app()->setComponent() to set connection at runtime.
getModelFromSession()  : InstallerConfigForm
getRandomString()  : string
Create a random ASCII string
stepDatabaseConfiguration()  : mixed
Configure database screen
stepLicense()  : mixed
Display license
stepOptionalConfiguration()  : mixed
Optional settings screen
stepPreInstallationCheck()  : mixed
check a few writing permissions and optional settings
stepWelcome()  : mixed
welcome and language selection install step
writeConfigFile()  : mixed
Function to write given database settings in APPPATH.'config/config.php'

Properties

Methods

checkDirectoryWriteable()

check if directory exists and is writeable, returns via parameters by reference

public checkDirectoryWriteable(string $directory, string &$data, string $base, string $keyError[, mixed $bRecursive = false ]) : bool
Parameters
$directory : string

to check

$data : string

to manipulate

$base : string

key for data manipulation

$keyError : string

key for error data

$bRecursive : mixed = false
Return values
bool

result of check (that it is writeable which implies existance)

checkFileWriteable()

check if file exists and is writeable, returns via parameters by reference

public checkFileWriteable(string $file, string &$data, string $base, string $keyError) : bool
Parameters
$file : string

to check

$data : string

to manipulate

$base : string

key for data manipulation

$keyError : string

key for error data

Return values
bool

result of check (that it is writeable which implies existance)

checkPathWriteable()

check if file or directory exists and is writeable, returns via parameters by reference

public checkPathWriteable(string $path, int $type, string &$aData, string $base, string $keyError[, mixed $bRecursive = false ]) : bool
Parameters
$path : string

file or directory to check

$type : int

0:undefined (invalid), 1:file, 2:directory

$aData : string
$base : string

key for data manipulation

$keyError : string

key for error data

$bRecursive : mixed = false
Return values
bool

result of check (that it is writeable which implies existance)

checkPHPFunctionOrClass()

Check for a specific PHP Function or class, updates HTML image

public checkPHPFunctionOrClass(string $sFunctionName, string &$sImage) : bool
Parameters
$sFunctionName : string

Function or class name

$sImage : string

HTML string for related image to show

Return values
bool

True if exists, otherwise false

chekHtmlImage()

check image HTML template

public chekHtmlImage(bool $result) : string
Parameters
$result : bool
Return values
string

Span with check if $result is true; otherwise a span with warning

executeSQLFile()

Executes an SQL file

public executeSQLFile(string $sFileName, string $sDatabasePrefix) : mixed
Parameters
$sFileName : string
$sDatabasePrefix : string

isWritableRecursive()

public isWritableRecursive(string $sDirectory) : mixed
Parameters
$sDirectory : string

loadHelper()

Loads a helper

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

public

loadLibrary()

Loads a library

public loadLibrary(mixed $library) : void
Parameters
$library : mixed
Tags
access

public

run()

Checks for action specific authorization and then executes an action

public run([string $action = 'index' ]) : void
Parameters
$action : string = 'index'
Tags
access

public

stepCreateDb()

Installer::stepCreateDb() Create database.

public stepCreateDb() : void
Tags
throws
Exception

stepPopulateDb()

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

public stepPopulateDb() : void

stepViewLicense()

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

public stepViewLicense() : mixed

sessioncontrol()

Load and set session vars

protected sessioncontrol() : void
Tags
access

protected

checkDefaultExtensions()

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

private checkDefaultExtensions() : void

Check them silently and die if they are missing.

checkInstallation()

Installer::checkInstallation()

private checkInstallation() : void

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

checkRequirements()

check requirements

private checkRequirements(mixed &$aData) : bool
Parameters
$aData : mixed
Tags
todo

Not used? Compare models/InstallerConfigForm::getHasMinimumRequirements

Return values
bool

requirements met

clearSession()

clear the session from installation information

private clearSession() : mixed

getDatabaseConfigArray()

Use with \Yii::app()->setComponent() to set connection at runtime.

private getDatabaseConfigArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRandomString()

Create a random ASCII string

private getRandomString([mixed $iTotalChar = 64 ]) : string
Parameters
$iTotalChar : mixed = 64
Return values
string

stepDatabaseConfiguration()

Configure database screen

private stepDatabaseConfiguration() : mixed

stepOptionalConfiguration()

Optional settings screen

private stepOptionalConfiguration() : mixed

stepPreInstallationCheck()

check a few writing permissions and optional settings

private stepPreInstallationCheck() : mixed

stepWelcome()

welcome and language selection install step

private stepWelcome() : mixed

writeConfigFile()

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

private writeConfigFile() : mixed

        
On this page

Search results