Upgrade5_4_0B1 extends UpgradeUtil
Upgrades to version 5.4.0-b1
Table of Contents
Properties
| $tasks |
Methods
| __construct() | Setup |
| addConfig() | Adds a config setting to the given file |
| addDataFeedsPermissions() | Adds data feeds permissions for the new AdminCompanyFeeds controller |
| 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 |
| addDataFeeds() | Adds the required tables for the data feeds |
| addLogoSizeSettings() | Sets the company settings for the client and admin logo size |
| addMerchantGatewayCallback() | Add Blesta.mgw_callback_url config to blesta.php |
| addPackageOptionGroupsHiddenColumn() | Adds a "hidden" column to the package option groups table |
| addPackageOptionsHiddenColumn() | Adds a "hidden" column to the package options table |
| addUnverifiedStatusAccountsAch() | Updates the accounts_ach.status field to include the "unverified" status |
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
addDataFeedsPermissions()
Adds data feeds permissions for the new AdminCompanyFeeds controller
public
addDataFeedsPermissions([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, or false to perform the change
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() : array<string|int, mixed>
Return values
array<string|int, mixed> —A numerically indexed array of tasks to execute for the upgrade process
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
addDataFeeds()
Adds the required tables for the data feeds
private
addDataFeeds([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, or false to perform the change
addLogoSizeSettings()
Sets the company settings for the client and admin logo size
private
addLogoSizeSettings([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change false to perform the change
addMerchantGatewayCallback()
Add Blesta.mgw_callback_url config to blesta.php
private
addMerchantGatewayCallback([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change false to perform the change
addPackageOptionGroupsHiddenColumn()
Adds a "hidden" column to the package option groups table
private
addPackageOptionGroupsHiddenColumn([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, or false to perform the change
addPackageOptionsHiddenColumn()
Adds a "hidden" column to the package options table
private
addPackageOptionsHiddenColumn([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, or false to perform the change
addUnverifiedStatusAccountsAch()
Updates the accounts_ach.status field to include the "unverified" status
private
addUnverifiedStatusAccountsAch([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change false to perform the change