PHP Class Elgg\Upgrade\Locator

WARNING: API IN FLUX. DO NOT USE DIRECTLY.
Since: 3.0.0
Show file Open project: elgg/elgg

Public Methods

Method Description
__construct ( Plugins $plugins, Logger $logger, PrivateSettingsTable $privateSettings ) Constructor
getBatch ( string $class ) : boolean Validates class and returns an instance of batch
getUpgrades ( ElggPlugin $plugin ) : ElggUpgrade[] Creates new ElggUpgrade instance from plugin's static config
run ( ) : boolean Looks for upgrades and saves them as ElggUpgrade entities
upgradeExists ( string $upgrade_id ) : boolean Check if there already is an ElggUpgrade for this upgrade

Method Details

__construct() public method

Constructor
public __construct ( Plugins $plugins, Logger $logger, PrivateSettingsTable $privateSettings )
$plugins Elgg\Database\Plugins Plugins
$logger Elgg\Logger Logger
$privateSettings Elgg\Database\PrivateSettingsTable PrivateSettingsTable

getBatch() public method

Validates class and returns an instance of batch
public getBatch ( string $class ) : boolean
$class string The fully qualified class name
return boolean True if valid upgrade

getUpgrades() public method

Creates new ElggUpgrade instance from plugin's static config
public getUpgrades ( ElggPlugin $plugin ) : ElggUpgrade[]
$plugin ElggPlugin Plugin
return ElggUpgrade[]

run() public method

Looks for upgrades and saves them as ElggUpgrade entities
public run ( ) : boolean
return boolean $pending_upgrades Are there pending upgrades

upgradeExists() public method

Check if there already is an ElggUpgrade for this upgrade
public upgradeExists ( string $upgrade_id ) : boolean
$upgrade_id string Id in format :
return boolean