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

Upgrade service for Elgg. More...

Public Member Functions

 __construct (Locator $locator, Translator $translator, EventsService $events, Config $config, Mutex $mutex, SystemMessagesService $system_messages, Progress $progress)
 Constructor. More...
 
 run ($upgrades=null)
 Run the upgrade process. More...
 
 getPendingUpgrades ($async=true)
 Get pending async upgrades. More...
 
 getCompletedUpgrades ($async=true)
 Get completed (async) upgrades ordered by recently completed first. More...
 
 executeUpgrade (\ElggUpgrade $upgrade, $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...
 

Protected Attributes

 $locator
 
 $progress
 

Detailed Description

Upgrade service for Elgg.

Definition at line 22 of file UpgradeService.php.

Constructor & Destructor Documentation

Elgg\UpgradeService::__construct ( Locator  $locator,
Translator  $translator,
EventsService  $events,
Config  $config,
Mutex  $mutex,
SystemMessagesService  $system_messages,
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 72 of file UpgradeService.php.

Member Function Documentation

Elgg\UpgradeService::down ( )
protected

Finish an upgrade process.

Returns
Promise

Definition at line 119 of file UpgradeService.php.

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

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

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

Definition at line 314 of file UpgradeService.php.

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

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

Parameters
bool$asyncInclude async upgrades
Returns
[]

Definition at line 261 of file UpgradeService.php.

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

Get pending async upgrades.

Parameters
bool$asyncInclude async upgrades
Returns
[]

Definition at line 227 of file UpgradeService.php.

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

Run the upgrade process.

Parameters

Definition at line 178 of file UpgradeService.php.

Elgg\UpgradeService::runUpgrades (   $upgrades)
protected

Run system and async upgrades.

Parameters

Definition at line 142 of file UpgradeService.php.

Elgg\UpgradeService::up ( )
protected

Start an upgrade process.

Returns
Promise

Definition at line 94 of file UpgradeService.php.

Member Data Documentation

Elgg\UpgradeService::$locator
protected

Definition at line 29 of file UpgradeService.php.

Elgg\UpgradeService::$progress
protected

Definition at line 59 of file UpgradeService.php.


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