Upgrade3_1_0B1 extends UpgradeUtil
Upgrades to version 3.1.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 |
| addEmailAttachments() | Updates emails table to add an additional field for whether to send attachments with the email |
| addPackageGroupSort() | Adds package group sorting capabilities |
| addPackageOptions() | Adds package options |
| addServiceCreationErrorEmail() | Adds a new email group and email for the service_creation_error |
| addServiceUnsuspensionEmail() | Adds the service unsuspension email template |
| updateAgingInvoicesEmail() | Updates the Aging Invoices email for report_ar |
| updateAutodebitSettings() | Replaces the 'autodebit_backoff' setting with an 'autodebit_attempts' setting |
| updateEmailGroupFields() | Add the notice_type column to the email_groups table |
| updateInvoiceCreationEmail() | Updates the Invoice Creation email for report_invoice_creation |
| updatePackages() | Update packages to set a single term option |
| updatePermissions() | Add new permissions, removed unused permissions |
| updateServiceCancellationErrorEmail() | Updates the content of the Service Cancellation Error email template |
| updateServiceCreationEmail() | Update the service_creation email templates to change the formatting of package pricing for backward compatibility |
| updateServiceSuspensionErrorEmail() | Updates the content of the Service Suspension Error email template |
| updateServiceUnsuspensionErrorEmail() | Updates the content of the Service Unsuspension Error email template |
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
addEmailAttachments()
Updates emails table to add an additional field for whether to send attachments with the email
private
addEmailAttachments([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change false to perform the change
addPackageGroupSort()
Adds package group sorting capabilities
private
addPackageGroupSort([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change
addPackageOptions()
Adds package options
private
addPackageOptions([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change false to perform the change
addServiceCreationErrorEmail()
Adds a new email group and email for the service_creation_error
private
addServiceCreationErrorEmail([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change
addServiceUnsuspensionEmail()
Adds the service unsuspension email template
private
addServiceUnsuspensionEmail([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change
updateAgingInvoicesEmail()
Updates the Aging Invoices email for report_ar
private
updateAgingInvoicesEmail([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change
updateAutodebitSettings()
Replaces the 'autodebit_backoff' setting with an 'autodebit_attempts' setting
private
updateAutodebitSettings([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change
updateEmailGroupFields()
Add the notice_type column to the email_groups table
private
updateEmailGroupFields([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change
updateInvoiceCreationEmail()
Updates the Invoice Creation email for report_invoice_creation
private
updateInvoiceCreationEmail([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change
updatePackages()
Update packages to set a single term option
private
updatePackages([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change false to perform the change
updatePermissions()
Add new permissions, removed unused permissions
private
updatePermissions([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change false to perform the change
updateServiceCancellationErrorEmail()
Updates the content of the Service Cancellation Error email template
private
updateServiceCancellationErrorEmail([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change
updateServiceCreationEmail()
Update the service_creation email templates to change the formatting of package pricing for backward compatibility
private
updateServiceCreationEmail([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change
updateServiceSuspensionErrorEmail()
Updates the content of the Service Suspension Error email template
private
updateServiceSuspensionErrorEmail([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change
updateServiceUnsuspensionErrorEmail()
Updates the content of the Service Unsuspension Error email template
private
updateServiceUnsuspensionErrorEmail([bool $undo = false ]) : mixed
Parameters
- $undo : bool = false
-
True to undo the change, false to perform the change