\UbillingUpdateManager
Performs deploy of database and config files updates
Synopsis
class UbillingUpdateManager
{
- // constants
- const DUMPS_PATH = 'content/updates/sql/';
- const CONFIGS_PATH = 'content/updates/configs/';
- const URL_ME = '?module=updatemanager';
- const URL_RELNOTES = 'wiki.ubilling.net.ua/doku.php?id=relnotes#section';
- // members
- protected array $altCfg = ;
- protected array $billCfg = ;
- protected array $mySqlCfg = ;
- protected $messages = '';
- protected array $allDumps = ;
- protected array $allConfigs = ;
- protected array $configFileNames = ;
- protected string $sudoPath = '/usr/local/bin/sudo';
- // methods
- public void __construct()
- protected void loadSystemConfigs()
- protected void setOptions()
- protected void initMessages()
- protected void loadDumps()
- protected void loadConfigs()
- protected void setConfigFilenames()
- protected MySQLDB ConnectDB()
- protected string getReleaseConfigFiles()
- protected string DoSqlDump()
- public string renderSqlDumpsList()
- public string renderConfigsList()
- public string applyMysqlDump()
- protected void fixAccessRights()
- public string applyConfigOptions()
- public string renderVersionInfo()
Constants
Name | Value |
---|---|
DUMPS_PATH | 'content/updates/sql/' |
CONFIGS_PATH | 'content/updates/configs/' |
URL_ME | '?module=updatemanager' |
URL_RELNOTES | 'wiki.ubilling.net.ua/doku.php?id=relnotes#section' |
Members
protected
- $allConfigs
—
array
Contains available configs updates as release=>configdata - $allDumps
—
array
Available mysql dumps for apply as release=>filename - $altCfg
—
array
System alter.ini config as key=>value - $billCfg
—
array
System billing.ini config as key=>value - $configFileNames
—
array
Contais configs filenames as shortid=>filename - $messages
—
System message helper object placeholder - $mySqlCfg
—
array
System mysql.ini config as key=>value - $sudoPath
—
string
system sudo path
Methods
protected
- ConnectDB() — Initialises connection with Ubilling database server and selects needed db
- DoSqlDump() — Apply Mysql Dump and returns results
- fixAccessRights() — Changes access rights for some path to be writable
- getReleaseConfigFiles() — Returns list of files which was updated in some release
- initMessages() — Inits system messages helper object instance
- loadConfigs() — Loads available configs update into protected prop
- loadDumps() — Loads available mysql dumps filenames into protected prop
- loadSystemConfigs() — Loads all required system config files into protected props for further usage
- setConfigFilenames() — Sets shortid=>filename with path configs associations array
- setOptions() — Sets all required options
public
- __construct() — Creates new update manager instance
- applyConfigOptions() — Renders interface and applies new options to some config files
- applyMysqlDump() — Applies mysql dump to current database
- renderConfigsList() — Renders list of available config files updates
- renderSqlDumpsList() — Renders list of sql dumps available for applying
- renderVersionInfo() — Renders current release info data and update check controls