class ApplicationUpdate (View source)

Constants

E_UPDATE_WRITE_CONFIG

Code of the error that occurs when we weren't able to update the configuration file during the update process.

Properties

protected string $version

The version string.

protected string $identifier

The version identifier (equals to the name of the directory under the updates directory).

Methods

string
getUpdateVersion()

Returns the version string.

string
getUpdateIdentifier()

Returns the version identifier (equals to the name of the directory under the updates directory).

static ApplicationUpdate|null
getByVersionNumber(string $version)

Returns an ApplicationUpdate instance given its version string.

true|int
apply()

Writes the core pointer into config/update.php.

static ApplicationUpdate|null
get(string $dir)

Parse an update dir and returns an ApplicationUpdate instance.

getVersion()

No description

getIdentifier()

No description

getDiagnosticObject()

Given the current update object, sends information to concrete5.org to determine updatability.

Details

string getUpdateVersion()

Returns the version string.

Return Value

string

string getUpdateIdentifier()

Returns the version identifier (equals to the name of the directory under the updates directory).

Return Value

string

static ApplicationUpdate|null getByVersionNumber(string $version)

Returns an ApplicationUpdate instance given its version string.

Parameters

string $version

Return Value

ApplicationUpdate|null

Returns null if there's no update with $version, or an ApplicationUpdate instance if $version is ok

true|int apply()

Writes the core pointer into config/update.php.

Return Value

true|int

Returns true if the configuration file was updated, otherwise it returns the error code (one of the ApplicationUpdate::E_... constants)

static ApplicationUpdate|null get(string $dir)

Parse an update dir and returns an ApplicationUpdate instance.

Parameters

string $dir

The base name of the directory under the updates directory

Return Value

ApplicationUpdate|null

Returns null if there's no update in the $dir directory, or an ApplicationUpdate instance if $dir is ok

getVersion()

No description

getIdentifier()

No description

Diagnostic getDiagnosticObject()

Given the current update object, sends information to concrete5.org to determine updatability.

Return Value

Diagnostic