\phpWTL\LogWriter\DBLWDatabaseLogWriterHelper

Static helper class for DatabaseLogWriter (DBLW).

Summary

Methods
Properties
Constants
getConnectionParamsFromIni()
prepareHtaccessProtection()
getDatatypeMappingsFromIni()
No public properties found
SAFETY_NONE
SAFETY_OFF
SAFETY_ALL
SAFETY_MAX
SAFETY_DROP
SAFETY_CHANGE
SAFE_NAMING_STRATEGY_DBAL_ESCAPING
SAFE_NAMING_STRATEGY_WTL_CLEANSING
prepareIniPath()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

SAFETY_NONE

SAFETY_NONE

Safety level for schema diff operations, no safety

SAFETY_OFF

SAFETY_OFF

SAFETY_ALL

SAFETY_ALL

Safety level for schema diff operations, maximum safety

SAFETY_MAX

SAFETY_MAX

SAFETY_DROP

SAFETY_DROP

Safety level for schema diff operations, drop field safety

SAFETY_CHANGE

SAFETY_CHANGE

Safety level for schema diff operations, change field safety

SAFE_NAMING_STRATEGY_DBAL_ESCAPING

SAFE_NAMING_STRATEGY_DBAL_ESCAPING

Strategy for safe naming of database tables and columns: DBAL escaping via "quoteIdentifier"

SAFE_NAMING_STRATEGY_WTL_CLEANSING

SAFE_NAMING_STRATEGY_WTL_CLEANSING

Strategy for safe naming of database tables and columns: phpWTL internal character filter

Methods

getConnectionParamsFromIni()

getConnectionParamsFromIni(boolean  $handle_htaccess, string  $filename = null) : array

Read credentials ini file and return a connection params array.

Parameters

boolean $handle_htaccess

Create/update .htaccess to protect credentials file.

string $filename

Returns

array

prepareHtaccessProtection()

prepareHtaccessProtection(string  $filename, boolean  $overwrite = false) : boolean

Create/update .htacces to protect credentials file.

Parameters

string $filename
boolean $overwrite

true=overwrite whole .htaccess file, false=append (if entry is not already there)

Returns

boolean —

true if successful

getDatatypeMappingsFromIni()

getDatatypeMappingsFromIni(string  $filename = null) : array

Read datatype mappings ini file and return a parameter array.

Parameters

string $filename

Returns

array

prepareIniPath()

prepareIniPath(string  $inifile) : string

Sanitize a given .ini path and filename.

Parameters

string $inifile

Returns

string