Upgrade4_3_0B1 extends UpgradeUtil
Upgrades to version 4.3.0-b1
Table of Contents
Properties
| $tasks |
Methods
| __construct() | Setup |
| addConfig() | Adds a config setting to the given file |
| editConfig() | Updates a config setting in the given file with the given value |
| errors() | Return all validation errors encountered |
| getEnvironment() | Fetches the current tasks environment |
| mergeConfig() | Extracts all config settings from $file, merges their values into $template and writes the result back in $file. |
| process() | Processes the given task |
| rollback() | Rolls back all tasks completed for the upgrade process |
| setEnvironment() | Set the environment where the task are going to be executed |
| tasks() | Returns a numerically indexed array of tasks to execute for the upgrade process |
| newRecord() | Creates a new database connection |
| replaceConfig() | Replaces a config setting within the context of a string |
| addMarketingPermission() | Adds permissions to the marketing company setting page |
| addMarketingSettings() | Sets marketing settings |
| addPackageDeletionPermission() | Adds a permission for package deletion |
| addPackagePlugins() | Creates the `package_plugins` table |
| addProrateAddonSetting() | Adds a new 'synchronize_addons' company setting |
| addServiceSupensionReason() | Add the suspension reason to a service |
| addSupensionReasonTag() | Add tag for the suspension reason |
| addSystemEvents() | Creates the `system_events` table |
| createClientSettingsLog() | Creates the `log_client_settings` table |
| refactorCronTasks() | Refactors the `cron_tasks` table to support tasks for modules |
| removeDir() | If able removes the given directory and all files/subdirectories inside it |
| removeGoogleFinance() | Removes google finance files and updates the exchange_rates_processor company setting |
| removeNavCaches() | Remove nav caches |
| setSystemEvents() | Adds system events to the `system_events` table |
| updateConfig() | Update config |
Methods
__construct()
Setup
public
__construct() : mixed
addConfig()
Adds a config setting to the given file
public
addConfig(string $file, string $key, mixed $value) : mixed
Parameters
- $file : string
-
The full path to the config file
- $key : string
-
The config setting name
- $value : mixed
-
The config setting value
editConfig()
Updates a config setting in the given file with the given value
public
editConfig(string $file, string $key, mixed $value) : mixed
Parameters
- $file : string
-
The full path to the config file
- $key : string
-
The config setting name
- $value : mixed
-
The config setting value
errors()
Return all validation errors encountered
public
errors() : mixed
Return values
mixed —Boolean false if no errors encountered, an array of errors otherwise
getEnvironment()
Fetches the current tasks environment
public
getEnvironment() : string
Return values
string —The environment where the tasks are running
mergeConfig()
Extracts all config settings from $file, merges their values into $template and writes the result back in $file.
public
mergeConfig(string $file, string $template) : mixed
Parameters
- $file : string
-
The full path to the config
- $template : string
-
The full path to the config template
process()
Processes the given task
public
process(string $task) : mixed
Parameters
- $task : string
-
The task to process
rollback()
Rolls back all tasks completed for the upgrade process
public
rollback() : mixed
setEnvironment()
Set the environment where the task are going to be executed
public
setEnvironment(string $environment) : mixed
Parameters
- $environment : string
-
The environment where the upgrade tasks are running, "install" or "upgrade"
tasks()
Returns a numerically indexed array of tasks to execute for the upgrade process
public
tasks() : mixed
Tags
newRecord()
Creates a new database connection
protected
newRecord() : Record
Return values
Record —a new instance of Record
replaceConfig()
Replaces a config setting within the context of a string
protected
replaceConfig(string $key, string $value, string $contents) : string
Parameters
- $key : string
-
The config key to replace the value of
- $value : string
-
The new value
- $contents : string
-
The context in which the $key is set
Return values
string —$contents with the given $value replaced
addMarketingPermission()
Adds permissions to the marketing company setting page
private
addMarketingPermission([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
addMarketingSettings()
Sets marketing settings
private
addMarketingSettings([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
addPackageDeletionPermission()
Adds a permission for package deletion
private
addPackageDeletionPermission([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
addPackagePlugins()
Creates the `package_plugins` table
private
addPackagePlugins([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
addProrateAddonSetting()
Adds a new 'synchronize_addons' company setting
private
addProrateAddonSetting([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, or false to perform the change
addServiceSupensionReason()
Add the suspension reason to a service
private
addServiceSupensionReason([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
addSupensionReasonTag()
Add tag for the suspension reason
private
addSupensionReasonTag([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
addSystemEvents()
Creates the `system_events` table
private
addSystemEvents([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
createClientSettingsLog()
Creates the `log_client_settings` table
private
createClientSettingsLog([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
refactorCronTasks()
Refactors the `cron_tasks` table to support tasks for modules
private
refactorCronTasks([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
removeDir()
If able removes the given directory and all files/subdirectories inside it
private
removeDir(string $dir) : mixed
Parameters
- $dir : string
-
the path to the directory
removeGoogleFinance()
Removes google finance files and updates the exchange_rates_processor company setting
private
removeGoogleFinance([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, or false to perform the change
removeNavCaches()
Remove nav caches
private
removeNavCaches([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
setSystemEvents()
Adds system events to the `system_events` table
private
setSystemEvents([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
Whether to add or undo the change
updateConfig()
Update config
private
updateConfig([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, or false to perform the change