Documentation

Install
in package

FinalYes

Grav installer.

NOTE: This class can be initialized during upgrade from an older version of Grav. Make sure it runs there!

Table of Contents

Properties

$ignores  : array<string|int, mixed>
$requires  : array<string|int, mixed>
$version  : int
$classMap  : array<string|int, mixed>
$instance  : static
$location  : string|null
$updater  : VersionUpdater|null
$zip  : string|null

Methods

__invoke()  : void
checkRequirements()  : array<string|int, mixed>
NOTE: This method can only be called after $grav['plugins']->init().
finalize()  : void
install()  : void
instance()  : static
prepare()  : void
setZip()  : $this
checkPlugins()  : void
checkVersion()  : void
getVersion()  : string
legacySupport()  : void
__construct()  : mixed

Properties

$ignores

public array<string|int, mixed> $ignores = ['backup', 'cache', 'images', 'logs', 'tmp', 'user', '.htaccess', 'robots.txt']

$requires

public array<string|int, mixed> $requires = ['php' => ['name' => 'PHP', 'versions' => ['8.1' => '8.1.0', '8.0' => '8.0.0', '7.4' => '7.4.1', '7.3' => '7.3.6', '' => '8.0.13']], 'grav' => ['name' => 'Grav', 'versions' => ['1.6' => '1.6.0', '' => '1.6.28']], 'plugins' => ['admin' => ['name' => 'Admin', 'optional' => true, 'versions' => ['1.9' => '1.9.0', '' => '1.9.13']], 'email' => ['name' => 'Email', 'optional' => true, 'versions' => ['3.0' => '3.0.0', '' => '3.0.10']], 'form' => ['name' => 'Form', 'optional' => true, 'versions' => ['4.1' => '4.1.0', '4.0' => '4.0.0', '3.0' => '3.0.0', '' => '4.1.2']], 'login' => ['name' => 'Login', 'optional' => true, 'versions' => ['3.3' => '3.3.0', '3.0' => '3.0.0', '' => '3.3.6']]]]

$version

public int $version = 1

Installer version.

$classMap

private array<string|int, mixed> $classMap = [\Grav\Installer\InstallException::class => __DIR__ . '/InstallException.php', \Grav\Installer\Versions::class => __DIR__ . '/Versions.php', \Grav\Installer\VersionUpdate::class => __DIR__ . '/VersionUpdate.php', \Grav\Installer\VersionUpdater::class => __DIR__ . '/VersionUpdater.php', \Grav\Installer\YamlUpdater::class => __DIR__ . '/YamlUpdater.php']

$instance

private static static $instance

$location

private string|null $location

Methods

__invoke()

public __invoke(string|null $zip) : void
Parameters
$zip : string|null
Attributes
#[ReturnTypeWillChange]

checkRequirements()

NOTE: This method can only be called after $grav['plugins']->init().

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

List of failed requirements. If the list is empty, installation can go on.

finalize()

public finalize() : void
Tags
throws
RuntimeException

install()

public install() : void
Tags
throws
RuntimeException

instance()

public static instance() : static
Return values
static

prepare()

public prepare() : void
Tags
throws
RuntimeException

setZip()

public setZip(string|null $zip) : $this
Parameters
$zip : string|null
Return values
$this

checkPlugins()

protected checkPlugins(array<string|int, mixed> &$results, array<string|int, mixed> $plugins) : void
Parameters
$results : array<string|int, mixed>
$plugins : array<string|int, mixed>

checkVersion()

protected checkVersion(array<string|int, mixed> &$results, string $type, string $name, array<string|int, mixed> $check, string|null $version) : void
Parameters
$results : array<string|int, mixed>
$type : string
$name : string
$check : array<string|int, mixed>
$version : string|null

getVersion()

protected getVersion() : string
Return values
string

legacySupport()

protected legacySupport() : void

__construct()

private __construct() : mixed

        
On this page

Search results