Elgg  Version 6.1
Public Member Functions | Protected Member Functions | List of all members
Elgg\UpgradeService Class Reference

Upgrade service for Elgg. More...

Public Member Functions

 __construct (protected Locator $locator, protected Translator $translator, protected EventsService $events, protected Config $config, protected Mutex $mutex, protected SystemMessagesService $system_messages, protected Progress $progress)
 Constructor. More...
 
 run ($upgrades=null)
 Run the upgrade process. More...
 
 getPendingUpgrades (bool $async=true)
 Get pending async upgrades. More...
 
 getCompletedUpgrades (bool $async=true)
 Get completed (async) upgrades ordered by recently completed first. More...
 
 executeUpgrade (\ElggUpgrade $upgrade, int $max_duration=null)
 Call the upgrade's run() for a specified period of time, or until it completes. More...
 

Protected Member Functions

 up ()
 Start an upgrade process. More...
 
 down ()
 Finish an upgrade process. More...
 
 runUpgrades ($upgrades)
 Run system and async upgrades. More...
 

Detailed Description

Upgrade service for Elgg.

Definition at line 22 of file UpgradeService.php.

Constructor & Destructor Documentation

Elgg\UpgradeService::__construct ( protected Locator  $locator,
protected Translator  $translator,
protected EventsService  $events,
protected Config  $config,
protected Mutex  $mutex,
protected SystemMessagesService  $system_messages,
protected Progress  $progress 
)

Constructor.

Parameters
Locator$locatorUpgrade locator
Translator$translatorTranslation service
EventsService$eventsEvents service
Config$configConfig
Mutex$mutexDatabase mutex service
SystemMessagesService$system_messagesSystem messages
Progress$progressProgress

Definition at line 37 of file UpgradeService.php.

Member Function Documentation

Elgg\UpgradeService::down ( )
protected

Finish an upgrade process.

Returns
Promise

Definition at line 79 of file UpgradeService.php.

Elgg\UpgradeService::executeUpgrade ( \ElggUpgrade  $upgrade,
int  $max_duration = null 
)

Call the upgrade's run() for a specified period of time, or until it completes.

Parameters
\ElggUpgrade$upgradeUpgrade to run
int | null$max_durationMaximum duration in seconds Set to 0 to execute an entire upgrade
Returns
Result

Definition at line 275 of file UpgradeService.php.

Elgg\UpgradeService::getCompletedUpgrades ( bool  $async = true)

Get completed (async) upgrades ordered by recently completed first.

Parameters
bool$asyncInclude async upgrades
Returns
[]

Definition at line 222 of file UpgradeService.php.

Elgg\UpgradeService::getPendingUpgrades ( bool  $async = true)

Get pending async upgrades.

Parameters
bool$asyncInclude async upgrades
Returns
[]

Definition at line 188 of file UpgradeService.php.

Elgg\UpgradeService::run (   $upgrades = null)

Run the upgrade process.

Parameters

Definition at line 139 of file UpgradeService.php.

Elgg\UpgradeService::runUpgrades (   $upgrades)
protected

Run system and async upgrades.

Parameters

Definition at line 102 of file UpgradeService.php.

Elgg\UpgradeService::up ( )
protected

Start an upgrade process.

Returns
Promise

Definition at line 53 of file UpgradeService.php.


The documentation for this class was generated from the following file: