ThemeUpdater

Extends\LimeSurvey\ExtensionInstaller\ExtensionUpdater

todo

Survey theme, question theme, admin theme...?

since 2018-10-09
author

LimeSurvey GmbH

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

Returns currently installed version of this extension

getCurrentVersion(): string
inheritedabstract

Response

string

Get extension config object for this extension.

getExtensionConfig(): \ExtensionConfig
inheritedabstract

Response

\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|null
inherited

Arguments

$versions

array

Response

array|null

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 $newVersion is strictly higher than currently installed version

versionHigherThan(string $newVersion): boolean
inherited

Arguments

$newVersion

string

Response

boolean

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 interface ExtensionModelInterface that all extension model classes implement

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