Elgg  Version 3.0
Public Member Functions | List of all members
Elgg\Upgrade\Locator Class Reference

Locates and registers both core and plugin upgrades. More...

Public Member Functions

 __construct (Plugins $plugins, LoggerInterface $logger)
 Constructor. More...
 
 locate ()
 Looks for upgrades and saves them as ElggUpgrade entities. More...
 
 getUpgrade ($class, $component_id)
 Gets intance of an ElggUpgrade based on the given class and id. More...
 
 getBatch ($class)
 Validates class and returns an instance of batch. More...
 
 upgradeExists ($upgrade_id)
 Check if there already is an ElggUpgrade for this upgrade. More...
 

Detailed Description

Locates and registers both core and plugin upgrades.

WARNING: API IN FLUX. DO NOT USE DIRECTLY.

Since
3.0.0

Definition at line 20 of file Locator.php.

Constructor & Destructor Documentation

Elgg\Upgrade\Locator::__construct ( Plugins  $plugins,
LoggerInterface  $logger 
)

Constructor.

Parameters
Plugins$pluginsPlugins
LoggerInterface$loggerLogger

Definition at line 40 of file Locator.php.

Member Function Documentation

Elgg\Upgrade\Locator::getBatch (   $class)

Validates class and returns an instance of batch.

Parameters
string$classThe fully qualified class name
Returns
Batch

Definition at line 133 of file Locator.php.

Elgg\Upgrade\Locator::getUpgrade (   $class,
  $component_id 
)

Gets intance of an ElggUpgrade based on the given class and id.

Parameters
string$classClass implementing Elgg
string$component_idEither plugin_id or "core"
Returns
ElggUpgrade

Definition at line 94 of file Locator.php.

Elgg\Upgrade\Locator::locate ( )

Looks for upgrades and saves them as ElggUpgrade entities.

Returns
ElggUpgrade[]

Definition at line 50 of file Locator.php.

Elgg\Upgrade\Locator::upgradeExists (   $upgrade_id)

Check if there already is an ElggUpgrade for this upgrade.

Parameters
string$upgrade_idId in format <plugin_id>:<yyymmddnn>
Returns
ElggUpgrade|false

Definition at line 152 of file Locator.php.


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