Documentation

Upgrader
in package

Class Upgrader

Table of Contents

Properties

$min_php  : string|null
$remote  : GravCore

Methods

__construct()  : mixed
Creates a new GPM instance with Local and Remote packages available
getAssets()  : array<string|int, mixed>
Returns an array of assets available to download remotely
getChangelog()  : array<string|int, mixed>
Returns the changelog list for each version of Grav
getLocalVersion()  : string
Returns the version of the installed Grav
getReleaseDate()  : string
Returns the release date of the latest version of Grav
getRemoteVersion()  : string
Returns the version of the remotely available Grav
isSymlink()  : bool
Checks if Grav is currently symbolically linked
isUpgradable()  : bool
Checks if the currently installed Grav is upgradable to a newer version
meetsRequirements()  : bool
Make sure this meets minimum PHP requirements
minPHPVersion()  : string
Get minimum PHP version from remote

Properties

Methods

__construct()

Creates a new GPM instance with Local and Remote packages available

public __construct([bool $refresh = false ][, callable|null $callback = null ]) : mixed
Parameters
$refresh : bool = false

Applies to Remote Packages only and forces a refetch of data

$callback : callable|null = null

Either a function or callback in array notation

Tags
throws
InvalidArgumentException

getAssets()

Returns an array of assets available to download remotely

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

getChangelog()

Returns the changelog list for each version of Grav

public getChangelog([string|null $diff = null ]) : array<string|int, mixed>
Parameters
$diff : string|null = null

the version number to start the diff from

Return values
array<string|int, mixed>

return the changelog list for each version

getLocalVersion()

Returns the version of the installed Grav

public getLocalVersion() : string
Return values
string

getReleaseDate()

Returns the release date of the latest version of Grav

public getReleaseDate() : string
Return values
string

getRemoteVersion()

Returns the version of the remotely available Grav

public getRemoteVersion() : string
Return values
string

Checks if Grav is currently symbolically linked

public isSymlink() : bool
Return values
bool

True if Grav is symlinked, False otherwise.

isUpgradable()

Checks if the currently installed Grav is upgradable to a newer version

public isUpgradable() : bool
Return values
bool

True if it's upgradable, False otherwise.

meetsRequirements()

Make sure this meets minimum PHP requirements

public meetsRequirements() : bool
Return values
bool

minPHPVersion()

Get minimum PHP version from remote

public minPHPVersion() : string
Return values
string

        
On this page

Search results