ThemeUpdater

Extends\LimeSurvey\ExtensionInstaller\ExtensionUpdater

since 2018-10-09
author

Olle Haerstedt

package

Default

Methods

__construct

__construct(mixed $model)
inherited

Arguments

$model

mixed

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

Convert from single char $type to fullword.

convertExtensionType(string $type): string
inherited

Arguments

$type

string

Response

string

Create an updater object for every extension of corresponding type.

createUpdaters(): array
inheritedstaticabstract

Response

array

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

Fetch all new available version from each version fetcher.

fetchVersions(): array
inherited
todo

Move to parent class?

Response

array

$versions

Returns true if $versions contain a security version.

foundSecurityVersion(array $versions): boolean
inherited

Arguments

$versions

array

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

Response

boolean

Get extension config object for this extension.

getExtensionConfig(): \LimeSurvey\ExtensionInstaller\ExtensionConfig
inheritedabstract

Response

\LimeSurvey\ExtensionInstaller\ExtensionConfig

Fetch extension name from extension model.

getExtensionName(): string
inheritedabstract

Extension type specific implementation.

Response

string

Fetch extension type from extension model.

getExtensionType(): string
inheritedabstract

Extension type specific implementation.

Response

string

getLatestVersion

getLatestVersion(array $versions): array
inherited

Arguments

$versions

array

Response

array

Compose version message to display of $versions.

getVersionMessage(array $versions): string
inherited

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
inherited

Arguments

$versions

array

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

Response

string

setUseUnstable

setUseUnstable(): void
inherited

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

versionHigherThan(string $currentVersion): integer
inherited

Arguments

$currentVersion

string

Response

integer

Returns true if $version is stable.

versionIsStable(string $version): boolean
inherited

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
inherited
todo

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

var

Type(s)

mixed

If true, fetch stable version info.

useStable :boolean
inherited
var

Type(s)

boolean

If true, fetch unstable version info.

useUnstable :boolean
inherited
var

Type(s)

boolean