ExtensionUpdater

since 2018-09-26
author

Olle Haerstedt

package

Default

Methods

__construct

__construct(mixed $model) 

Arguments

$model

mixed

Plugin model, theme model, etc, depending on extension type.

Convert from single char $type to fullword.

convertExtensionType(string $type) : string

Arguments

$type

string

Response

string

Create an updater object for every extension of corresponding type.

createUpdaters() : array
static abstract

Response

array

[ExtensionUpdater[] $updaters, string[] $errorMessages]

Fetch all new available version from each version fetcher.

fetchVersions() : array
todo

Move to parent class?

Response

array

$versions

Returns true if $versions contain a security version.

foundSecurityVersion(array $versions) : boolean

Arguments

$versions

array

Each version has keys 'version' and 'isSecurityVersion'.

Response

boolean

Get extension config object for this extension.

getExtensionConfig() : \LimeSurvey\ExtensionInstaller\ExtensionConfig
abstract

Response

\LimeSurvey\ExtensionInstaller\ExtensionConfig

Fetch extension name from extension model.

getExtensionName() : string
abstract

Extension type specific implementation.

Response

string

Fetch extension type from extension model.

getExtensionType() : string
abstract

Extension type specific implementation.

Response

string

getLatestVersion

getLatestVersion(array $versions) : array

Arguments

$versions

array

Response

array

Compose version message to display of $versions.

getVersionMessage(array $versions) : string

Arguments

$versions

array

Each version has keys 'version' and 'isSecurityVersion', etc.

Response

string

Implode $versions into string, stripping security version field.

implodeVersions(array $versions) : string

Arguments

$versions

array

Each version has keys 'version' and 'isSecurityVersion'.

Response

string

setUseUnstable

setUseUnstable() : void

Returns true if this extension update version is higher than $currentVersion.

versionHigherThan(string $currentVersion) : integer

Arguments

$currentVersion

string

Response

integer

Returns true if $version is stable.

versionIsStable(string $version) : boolean

The version is stable IF it does not contain alpha, beta or rc suffixes.

Arguments

$version

string

Response

boolean

Properties

Extension model, e.g. Theme or Plugin class.

model : mixed
todo

Create super class ExtensionModel that all extension model classes inherit from.

var

Type(s)

mixed

If true, fetch stable version info.

useStable : boolean
var

Type(s)

boolean

If true, fetch unstable version info.

useUnstable : boolean
var

Type(s)

boolean