LimeSurvey API - Master branch

ThemeUpdater extends ExtensionUpdater
in package

Tags
todo

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

since
2018-10-09
author

LimeSurvey GmbH

Table of Contents

Properties

$model  : mixed
Extension model, e.g. Theme or Plugin class.
$useStable  : bool
If true, fetch stable version info.
$useUnstable  : bool
If true, fetch unstable version info.

Methods

__construct()  : mixed
convertExtensionType()  : string
Convert from single char $type to fullword.
createUpdaters()  : array<string|int, mixed>
Create a PluginUpdater for every plugin installed.
fetchVersions()  : array<string|int, mixed>
Fetch all new available version from each version fetcher.
foundSecurityVersion()  : bool
Returns true if $versions contain a security version.
getCurrentVersion()  : string
Returns currently installed version of this extension
getExtensionConfig()  : ExtensionConfig
Get extension config object for this extension.
getExtensionName()  : string
Fetch extension name from extension model.
getExtensionType()  : string
Fetch extension type from extension model.
getLatestVersion()  : array<string|int, mixed>|null
getVersionMessage()  : string
Compose version message to display of $versions.
implodeVersions()  : string
Implode $versions into string, stripping security version field.
setUseUnstable()  : void
versionHigherThan()  : bool
Returns true if $newVersion is strictly higher than currently installed version
versionIsStable()  : bool
Returns true if $version is stable.

Properties

$model

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

protected mixed $model = null
Tags
todo

Create interface ExtensionModelInterface that all extension model classes implement

$useStable

If true, fetch stable version info.

protected bool $useStable = true

$useUnstable

If true, fetch unstable version info.

protected bool $useUnstable = false

Methods

__construct()

public __construct(mixed $model) : mixed
Parameters
$model : mixed

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

convertExtensionType()

Convert from single char $type to fullword.

public convertExtensionType(string $type) : string
Parameters
$type : string
Return values
string

createUpdaters()

Create a PluginUpdater for every plugin installed.

public static createUpdaters() : array<string|int, mixed>
Return values
array<string|int, mixed>

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

fetchVersions()

Fetch all new available version from each version fetcher.

public fetchVersions() : array<string|int, mixed>
Tags
todo

Move to parent class?

Return values
array<string|int, mixed>

$versions

foundSecurityVersion()

Returns true if $versions contain a security version.

public foundSecurityVersion(array<string|int, mixed> $versions) : bool
Parameters
$versions : array<string|int, mixed>

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

Return values
bool

getCurrentVersion()

Returns currently installed version of this extension

public getCurrentVersion() : string
Return values
string

getExtensionName()

Fetch extension name from extension model.

public getExtensionName() : string
Return values
string

getExtensionType()

Fetch extension type from extension model.

public getExtensionType() : string
Return values
string

getLatestVersion()

public getLatestVersion(array<string|int, mixed> $versions) : array<string|int, mixed>|null
Parameters
$versions : array<string|int, mixed>
Return values
array<string|int, mixed>|null

getVersionMessage()

Compose version message to display of $versions.

public getVersionMessage(array<string|int, mixed> $versions) : string
Parameters
$versions : array<string|int, mixed>

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

Return values
string

implodeVersions()

Implode $versions into string, stripping security version field.

public implodeVersions(array<string|int, mixed> $versions) : string
Parameters
$versions : array<string|int, mixed>

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

Return values
string

versionHigherThan()

Returns true if $newVersion is strictly higher than currently installed version

public versionHigherThan(string $newVersion) : bool
Parameters
$newVersion : string
Return values
bool

versionIsStable()

Returns true if $version is stable.

public versionIsStable(string $version) : bool

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

Parameters
$version : string
Return values
bool

        
On this page

Search results