UpdateHelper

Type
Class
Namespace
Craft
Inherits
Craft\UpdateHelper
Since
1.0

Helper class for updating.

See also http://craftcms.com

View source

Public Methods

MethodDescription
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()

View source

Arguments

  • $line

Returns

string

Signature

public static string cleanManifestFolderLine ( $line )

doFileUpdate()

View source

Arguments

  • $manifestData
  • $sourceTempFolder
  • $handle

Returns

boolean

Signature

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

getLocalVersionFromManifest()

Returns the local version number from the given manifest file.

View source

Arguments

  • $manifestData

Returns

boolean, string

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

Arguments

  • $manifestDataPath
  • $handle

Returns

array

Throws

Signature

public static array getManifestData ( $manifestDataPath, $handle )

getUnzipFolderFromUID()

View source

Arguments

  • $uid

Returns

string

Signature

public static string getUnzipFolderFromUID ( $uid )

getZipFileFromUID()

View source

Arguments

  • $uid

Returns

string

Signature

public static string getZipFileFromUID ( $uid )

isManifestLineAFolder()

View source

Arguments

  • $line

Returns

boolean

Signature

public static boolean isManifestLineAFolder ( $line )

isManifestMigrationLine()

Return true if line is a manifest migration line.

View source

Arguments

  • $line

Returns

boolean

Signature

public static boolean isManifestMigrationLine ( $line )

isManifestVersionInfoLine()

View source

Arguments

  • $line

Returns

boolean

Signature

public static boolean isManifestVersionInfoLine ( $line )

rollBackDatabaseChanges()

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

View source

Arguments

  • $backupPath

Returns

null

Signature

public static null rollBackDatabaseChanges ( $backupPath )

rollBackFileChanges()

View source

Arguments

  • $manifestData
  • $handle

Returns

null

Signature

public static null rollBackFileChanges ( $manifestData, $handle )