UpdateHelper

Type
Class
Namespace
Craft
Inherits
Craft\UpdateHelper
Since
1.0

Helper class for updating.

See also http://craftcms.com

View source (opens new window)

# Public Methods

Method Description
cleanManifestFolderLine()
doFileUpdate()
getLocalVersionFromManifest() Returns the local version number from the given manifest file.
getManifestData() Returns the relevant lines from the update manifest file starting with the current local version.
getUnzipFolderFromUID()
getZipFileFromUID()
isManifestLineAFolder()
isManifestMigrationLine() Return true if line is a manifest migration line.
isManifestVersionInfoLine()
rollBackDatabaseChanges() Rolls back any changes made to the DB during the update process.
rollBackFileChanges()

# cleanManifestFolderLine()

Signature

public static string cleanManifestFolderLine ( $line )

# doFileUpdate()

View source (opens new window)

Arguments

  • $manifestData
  • $sourceTempFolder
  • $handle

Returns

boolean (opens new window)

Signature

public static boolean doFileUpdate ( $manifestData, $sourceTempFolder, $handle )

# getLocalVersionFromManifest()

Returns the local version number from the given manifest file.

View source (opens new window)

Arguments

  • $manifestData

Returns

boolean (opens new window), string (opens new window)

Signature

public static boolean, string getLocalVersionFromManifest ( $manifestData )

# getManifestData()

Returns the relevant lines from the update manifest file starting with the current local version.

View source (opens new window)

Arguments

  • $manifestDataPath
  • $handle

Returns

array (opens new window)

Throws

Signature

public static array getManifestData ( $manifestDataPath, $handle )

# getUnzipFolderFromUID()

Signature

public static string getUnzipFolderFromUID ( $uid )

# getZipFileFromUID()

Signature

public static string getZipFileFromUID ( $uid )

# isManifestLineAFolder()

Signature

public static boolean isManifestLineAFolder ( $line )

# isManifestMigrationLine()

Return true if line is a manifest migration line.

View source (opens new window)

Arguments

  • $line

Returns

boolean (opens new window)

Signature

public static boolean isManifestMigrationLine ( $line )

# isManifestVersionInfoLine()

Signature

public static boolean isManifestVersionInfoLine ( $line )

# rollBackDatabaseChanges()

Rolls back any changes made to the DB during the update process.

View source (opens new window)

Arguments

  • $backupPath

Returns

null (opens new window)

Signature

public static null rollBackDatabaseChanges ( $backupPath )

# rollBackFileChanges()

View source (opens new window)

Arguments

  • $manifestData
  • $handle

Returns

null (opens new window)

Signature

public static null rollBackFileChanges ( $manifestData, $handle )