UpgradeUtil Class Reference

Static Public Member Functions

static runPart1 (MessageStreamer $messageStreamer, $doNotlAlterFiles=false)
static runPart2 (MessageStreamer $messageStreamer)
static isApplicationInUpgradeMode ()
static getUpgradeFolderPath ()
static setUpgradeState ($key, $value)
static getUpgradeState ($key)
static unsetUpgradeState ()
static isUpgradeStateValid ()

Data Fields

const UPGRADE_STATE_KEY = 'zurmoUpgrade'

Static Protected Member Functions

static checkPermissions ()
static checkIfZipExtensionIsLoaded ()
static setCurrentZurmoVersion ()
static checkForUpgradeZip ()
static unzipUpgradeZip ($upgradeZipFilePath)
static checkManifestIfVersionIsOk ($upgradeExtractPath)
static loadUpgraderComponent ($upgradeExtractPath, MessageLogger $messageLogger)
static clearCache ()
static processBeforeConfigFiles ()
static processConfigFiles ($pathToConfigurationFolder)
static processAfterConfigFiles ()
static processBeforeFiles ()
static processFiles ($upgradeExtractPath, $configuration)
static processAfterFiles ()
static processBeforeUpdateSchema ()
static processUpdateSchema ($messageLogger)
static processAfterUpdateSchema ()
static clearAssetsAndRunTimeItems ()
static processFinalTouches ()
static removeUpgradeFiles ($upgradeExtractPath)

Detailed Description

Definition at line 37 of file UpgradeUtil.php.


Member Function Documentation

static runPart1 ( MessageStreamer messageStreamer,
doNotlAlterFiles = false 
) [static]

Run first part of upgrade process, which includes:

  • Checking if application is in maintenance mode
  • Check file permissions
  • Check if php zip extension is loaded
  • Load UpgraderComponent from extracted upgrade files
  • Modify configure files if needed
  • Copy, add and remove files
    Parameters:
    MessageStreamer $messageStreamer

Definition at line 51 of file UpgradeUtil.php.

static runPart2 ( MessageStreamer messageStreamer  )  [static]

Run second and last part of upgrade process, which include:

  • Update schema
  • Clean assets and runtime foders
  • Process final tasks
  • Remove upgrade files
  • Clear cache
    Parameters:
    MessageStreamer $messageStreamer

Definition at line 113 of file UpgradeUtil.php.

static getUpgradeFolderPath (  )  [static]

Return path to upgrade folder

Returns:
string

Definition at line 182 of file UpgradeUtil.php.

static checkPermissions (  )  [static, protected]

Check if all files are directories are writeable by user.

Exceptions:
FileNotWriteableException 
Returns:
boolean

Definition at line 192 of file UpgradeUtil.php.

static checkIfZipExtensionIsLoaded (  )  [static, protected]

Check if PHP Zip extension is loaded.

Exceptions:
NotSupportedException 
Returns:
boolean

Definition at line 213 of file UpgradeUtil.php.

static setCurrentZurmoVersion (  )  [static, protected]

Set current Zurmo version

Definition at line 227 of file UpgradeUtil.php.

static checkForUpgradeZip (  )  [static, protected]

Check if one and only one zip file exist, so upgrade process will use it.

Exceptions:
NotFoundException 
NotSupportedException 
Returns:
string $upgradeZipFile - path to zip file

Definition at line 239 of file UpgradeUtil.php.

static unzipUpgradeZip ( upgradeZipFilePath  )  [static, protected]

Unzip upgrade files.

Parameters:
string $upgradeZipFilePath
Exceptions:
NotSupportedException 
Returns:
string - path to unzipped files

Definition at line 277 of file UpgradeUtil.php.

static checkManifestIfVersionIsOk ( upgradeExtractPath  )  [static, protected]

Check if upgrade version is correct, and if can be executed for current ZUrmo version.

Parameters:
string $upgradeExtractPath
Exceptions:
NotSupportedException 
Returns:
array

Definition at line 307 of file UpgradeUtil.php.

static loadUpgraderComponent ( upgradeExtractPath,
MessageLogger messageLogger 
) [static, protected]

Load upgrader component as yii component from upgrade files.

Parameters:
string $upgradeExtractPath

Definition at line 346 of file UpgradeUtil.php.

static clearCache (  )  [static, protected]

Clear cache

Definition at line 367 of file UpgradeUtil.php.

static processBeforeConfigFiles (  )  [static, protected]

This is just wrapper function to call function from UpgraderComponent

Definition at line 375 of file UpgradeUtil.php.

static processConfigFiles ( pathToConfigurationFolder  )  [static, protected]

This is just wrapper function to call function from UpgraderComponent

Definition at line 383 of file UpgradeUtil.php.

static processAfterConfigFiles (  )  [static, protected]

This is just wrapper function to call function from UpgraderComponent

Definition at line 391 of file UpgradeUtil.php.

static processBeforeFiles (  )  [static, protected]

This is just wrapper function to call function from UpgraderComponent

Definition at line 399 of file UpgradeUtil.php.

static processFiles ( upgradeExtractPath,
configuration 
) [static, protected]

This is just wrapper function to call function from UpgraderComponent

Parameters:
string $upgradeExtractPath
array $configuration

Definition at line 409 of file UpgradeUtil.php.

static processAfterFiles (  )  [static, protected]

This is just wrapper function to call function from UpgraderComponent

Definition at line 419 of file UpgradeUtil.php.

static processBeforeUpdateSchema (  )  [static, protected]

This is just wrapper function to call function from UpgraderComponent

Definition at line 427 of file UpgradeUtil.php.

static processUpdateSchema ( messageLogger  )  [static, protected]

This is just wrapper function to call function from UpgraderComponent

Definition at line 435 of file UpgradeUtil.php.

static processAfterUpdateSchema (  )  [static, protected]

This is just wrapper function to call function from UpgraderComponent

Definition at line 443 of file UpgradeUtil.php.

static clearAssetsAndRunTimeItems (  )  [static, protected]

This is just wrapper function to call function from UpgraderComponent

Definition at line 451 of file UpgradeUtil.php.

static processFinalTouches (  )  [static, protected]

This is just wrapper function to call function from UpgraderComponent

Definition at line 459 of file UpgradeUtil.php.

static setUpgradeState ( key,
value 
) [static]

Set upgrade state into Zurmo persistent storage

Parameters:
string $key
string $value
Returns:
boolean

Definition at line 475 of file UpgradeUtil.php.

static getUpgradeState ( key  )  [static]

Get upgrade state from Zurmo persistent storage

Parameters:
string $key
Returns:
mixed

Definition at line 489 of file UpgradeUtil.php.

static unsetUpgradeState (  )  [static]

Clear upgrade info from Zurmo state persister

Definition at line 503 of file UpgradeUtil.php.

static isUpgradeStateValid (  )  [static]

Check if upgrade state still valid

Returns:
boolean

Definition at line 516 of file UpgradeUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Nov 24 07:10:30 2017