InstallerConfigForm
extends CFormModel
in package
Class InstallerConfigForm
Table of Contents
Constants
- DB_TYPE_DBLIB = 'dblib'
- DB_TYPE_MSSQL = 'mssql'
- DB_TYPE_MYSQL = 'mysql'
- DB_TYPE_MYSQLI = 'mysqli'
- DB_TYPE_ODBC = 'odbc'
- DB_TYPE_PGSQL = 'pgsql'
- DB_TYPE_SQLSRV = 'sqlsrv'
- ENGINE_TYPE_INNODB = 'INNODB'
- ENGINE_TYPE_MYISAM = 'MYISAM'
- MINIMUM_MEMORY_LIMIT = 128
- MINIMUM_PHP_VERSION = '7.4.0'
Properties
- $adminEmail : string
- $adminLoginName : string
- $adminLoginPwd : string
- $adminName : string
- $confirmPwd : string
- $db : DbConnection
- $db_names : array<string|int, mixed>
- $dbengine : string
- $dbEngines : array<string|int, mixed>
- $dbExists : bool
- $dblocation : string
- $dbname : string
- $dbport : string
- $dbprefix : string
- $dbpwd : string
- $dbtype : string
- $dbuser : string
- $hasMinimumRequirements : bool
- $isCollatorPresent : bool
- $isConfigDirWriteable : bool
- $isConfigPresent : bool
- $isMemoryLimitOK : bool
- $isMSSql : bool
- $isMysql : bool
- $isPhpFileInfoPresent : bool
- $isPhpGdPresent : bool
- $isPhpImapPresent : bool
- $isPhpJsonPresent : bool
- $isPhpLdapPresent : bool
- $isPhpMbStringPresent : bool
- $isPhpVersionOK : bool
- $isPhpZipPresent : bool
- $isPhpZlibPresent : bool
- $isSodiumPresent : bool
- $isTmpDirWriteable : bool
- $isUploadDirWriteable : bool
- $memoryLimit : float|int
- $phpGdHasJpegSupport : bool
- $siteName : string
- $supportedDbTypes : array<string|int, string>
- $surveylang : string
- $tablesExist : bool
- $useDbName : bool
Methods
- __construct() : mixed
- InstallerConfigForm constructor.
- attributeHints() : mixed
- attributeLabels() : mixed
- createDatabase() : void
- dbConnect() : bool
- Connect to the database
- getDataBaseName() : mixed
- getDbEngines() : array<string|int, mixed>
- getDbPort() : string
- Get the default port if database port is not set
- getDsn() : string
- Get the dsn for the database connection
- getHasMinimumRequirements() : bool
- Chek whether system meets minimum requirements
- getIsConfigDirWriteable() : bool
- getIsMSSql() : bool
- getIsMysql() : bool
- getIsTmpDirWriteable() : bool
- getIsUploadDirWriteable() : bool
- getMemoryLimit() : float|int
- Memory limit in MB
- getSupportedDbTypes() : array<string|int, mixed>
- Get the array of supported DB type
- isInnoDbLargeFilePrefixEnabled() : mixed
- isWritableRecursive() : bool
- rules() : mixed
- setupTables() : array<string|int, string>|bool
- Function that actually modify the database.
- validate() : mixed
- validateDBEngine() : mixed
- checkMemoryLimit() : bool
- checkStatus() : mixed
- createDbQuery() : string
- dbTest() : bool
- getDbDefaultPort() : string
- getMssqlDsn() : string
- getMySqlConfigValue() : string
- getMysqlDsn() : string
- getPgsqlDsn() : string
- isInnoDbBarracudaFileFormat() : bool
- setInitialEngine() : mixed
- setMySQLDefaultEngine() : mixed
Constants
DB_TYPE_DBLIB
public
mixed
DB_TYPE_DBLIB
= 'dblib'
DB_TYPE_MSSQL
public
mixed
DB_TYPE_MSSQL
= 'mssql'
DB_TYPE_MYSQL
public
mixed
DB_TYPE_MYSQL
= 'mysql'
DB_TYPE_MYSQLI
public
mixed
DB_TYPE_MYSQLI
= 'mysqli'
DB_TYPE_ODBC
public
mixed
DB_TYPE_ODBC
= 'odbc'
DB_TYPE_PGSQL
public
mixed
DB_TYPE_PGSQL
= 'pgsql'
DB_TYPE_SQLSRV
public
mixed
DB_TYPE_SQLSRV
= 'sqlsrv'
ENGINE_TYPE_INNODB
public
mixed
ENGINE_TYPE_INNODB
= 'INNODB'
ENGINE_TYPE_MYISAM
public
mixed
ENGINE_TYPE_MYISAM
= 'MYISAM'
MINIMUM_MEMORY_LIMIT
public
mixed
MINIMUM_MEMORY_LIMIT
= 128
MINIMUM_PHP_VERSION
public
mixed
MINIMUM_PHP_VERSION
= '7.4.0'
Properties
$adminEmail
public
string
$adminEmail
= 'your-email@example.net'
$adminLoginName
public
string
$adminLoginName
= 'admin'
$adminLoginPwd
public
string
$adminLoginPwd
= 'password'
$adminName
public
string
$adminName
= 'Administrator'
$confirmPwd
public
string
$confirmPwd
= 'password'
$db
public
DbConnection
$db
$db_names
public
array<string|int, mixed>
$db_names
= array(self::DB_TYPE_MYSQL => 'MySQL', self::DB_TYPE_MYSQLI => 'MySQL (newer driver)', self::DB_TYPE_SQLSRV => 'Microsoft SQL Server (sqlsrv)', self::DB_TYPE_MSSQL => 'Microsoft SQL Server (mssql)', self::DB_TYPE_DBLIB => 'Microsoft SQL Server (dblib)', self::DB_TYPE_PGSQL => 'PostgreSQL')
$dbengine
public
string
$dbengine
Database Engine type if DB type is MySQL
$dbEngines
public
array<string|int, mixed>
$dbEngines
the MySQL database engines as [value=>'label']
$dbExists
public
bool
$dbExists
= \false
dbExists
$dblocation
public
string
$dblocation
= 'localhost'
$dbname
public
string
$dbname
$dbport
public
string
$dbport
$dbprefix
public
string
$dbprefix
= 'lime_'
$dbpwd
public
string
$dbpwd
$dbtype
public
string
$dbtype
$dbuser
public
string
$dbuser
$hasMinimumRequirements
public
bool
$hasMinimumRequirements
$isCollatorPresent
public
bool
$isCollatorPresent
= \false
$isConfigDirWriteable
public
bool
$isConfigDirWriteable
$isConfigPresent
public
bool
$isConfigPresent
= \false
$isMemoryLimitOK
public
bool
$isMemoryLimitOK
= \false
$isMSSql
public
bool
$isMSSql
whether the db type is one of MS Sql types
$isMysql
public
bool
$isMysql
whether the db type is mysql or mysqli
$isPhpFileInfoPresent
public
bool
$isPhpFileInfoPresent
= \false
$isPhpGdPresent
public
bool
$isPhpGdPresent
= \false
$isPhpImapPresent
public
bool
$isPhpImapPresent
= \false
$isPhpJsonPresent
public
bool
$isPhpJsonPresent
= \false
$isPhpLdapPresent
public
bool
$isPhpLdapPresent
= \false
$isPhpMbStringPresent
public
bool
$isPhpMbStringPresent
= \false
$isPhpVersionOK
public
bool
$isPhpVersionOK
= \false
$isPhpZipPresent
public
bool
$isPhpZipPresent
= \false
$isPhpZlibPresent
public
bool
$isPhpZlibPresent
= \false
$isSodiumPresent
public
bool
$isSodiumPresent
= \false
$isTmpDirWriteable
public
bool
$isTmpDirWriteable
$isUploadDirWriteable
public
bool
$isUploadDirWriteable
$memoryLimit
public
float|int
$memoryLimit
$phpGdHasJpegSupport
public
bool
$phpGdHasJpegSupport
= \false
$siteName
public
string
$siteName
= 'LimeSurvey'
$supportedDbTypes
public
array<string|int, string>
$supportedDbTypes
$surveylang
public
string
$surveylang
= 'en'
$tablesExist
public
bool
$tablesExist
= \false
$useDbName
public
bool
$useDbName
= \true
Methods
__construct()
InstallerConfigForm constructor.
public
__construct([string $scenario = 'database' ]) : mixed
Parameters
- $scenario : string = 'database'
attributeHints()
public
attributeHints() : mixed
attributeLabels()
public
attributeLabels() : mixed
Tags
createDatabase()
public
createDatabase() : void
Tags
dbConnect()
Connect to the database
public
dbConnect() : bool
Return values
boolgetDataBaseName()
public
getDataBaseName() : mixed
getDbEngines()
public
getDbEngines() : array<string|int, mixed>
Return values
array<string|int, mixed>getDbPort()
Get the default port if database port is not set
public
getDbPort() : string
Return values
stringgetDsn()
Get the dsn for the database connection
public
getDsn() : string
Tags
Return values
stringgetHasMinimumRequirements()
Chek whether system meets minimum requirements
public
getHasMinimumRequirements() : bool
Return values
boolgetIsConfigDirWriteable()
public
getIsConfigDirWriteable() : bool
Return values
boolgetIsMSSql()
public
getIsMSSql() : bool
Return values
boolgetIsMysql()
public
getIsMysql() : bool
Return values
boolgetIsTmpDirWriteable()
public
getIsTmpDirWriteable() : bool
Return values
boolgetIsUploadDirWriteable()
public
getIsUploadDirWriteable() : bool
Return values
boolgetMemoryLimit()
Memory limit in MB
public
getMemoryLimit() : float|int
Return values
float|intgetSupportedDbTypes()
Get the array of supported DB type
public
getSupportedDbTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>isInnoDbLargeFilePrefixEnabled()
public
isInnoDbLargeFilePrefixEnabled() : mixed
isWritableRecursive()
public
static isWritableRecursive(string $sDirectory) : bool
Parameters
- $sDirectory : string
Return values
boolrules()
public
rules() : mixed
Tags
setupTables()
Function that actually modify the database.
public
setupTables() : array<string|int, string>|bool
Return values
array<string|int, string>|bool —True if everything was okay, otherwise error message.
validate()
public
validate([mixed $attributes = null ][, mixed $clearErrors = true ]) : mixed
Parameters
- $attributes : mixed = null
- $clearErrors : mixed = true
validateDBEngine()
public
validateDBEngine(mixed $attribute) : mixed
Parameters
- $attribute : mixed
checkMemoryLimit()
private
checkMemoryLimit() : bool
Return values
boolcheckStatus()
private
checkStatus() : mixed
createDbQuery()
private
createDbQuery() : string
Return values
stringdbTest()
private
dbTest() : bool
Return values
bool —if connection is done
getDbDefaultPort()
private
getDbDefaultPort() : string
Return values
stringgetMssqlDsn()
private
getMssqlDsn() : string
Return values
stringgetMySqlConfigValue()
private
getMySqlConfigValue( $itemName) : string
Parameters
Return values
stringgetMysqlDsn()
private
getMysqlDsn() : string
Return values
stringgetPgsqlDsn()
private
getPgsqlDsn() : string
Return values
stringisInnoDbBarracudaFileFormat()
private
isInnoDbBarracudaFileFormat() : bool
Return values
boolsetInitialEngine()
private
setInitialEngine() : mixed
setMySQLDefaultEngine()
private
setMySQLDefaultEngine(string $dbEngine) : mixed
Parameters
- $dbEngine : string