Elgg  Version 4.3
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)
 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...
 
 getUpgradeByClass (string $class_name)
 Check if there already is an ElggUpgrade for this upgrade class. More...
 

Detailed Description

Locates and registers both core and plugin upgrades.

Since
3.0.0

Definition at line 16 of file Locator.php.

Constructor & Destructor Documentation

Elgg\Upgrade\Locator::__construct ( Plugins  $plugins)

Constructor.

Parameters
Plugins$pluginsPlugins

Definition at line 28 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
Exceptions
InvalidArgumentException

Definition at line 121 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

Definition at line 81 of file Locator.php.

Elgg\Upgrade\Locator::getUpgradeByClass ( string  $class_name)

Check if there already is an ElggUpgrade for this upgrade class.

Parameters
string$class_namename of the class used for the upgrade
Returns
|false
Since
3.3

Definition at line 166 of file Locator.php.

Elgg\Upgrade\Locator::locate ( )

Looks for upgrades and saves them as ElggUpgrade entities.

Returns
[]

Definition at line 37 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
|false

Definition at line 140 of file Locator.php.


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