Defines an interface for a class which can update a Drupal project.
An Updater currently serves the following purposes:
Expanded class hierarchy of UpdaterInterface
All classes that implement UpdaterInterface
interface UpdaterInterface {
/**
* Checks if the project is installed.
*
* @return bool
*/
public function isInstalled();
/**
* Returns the system name of the project.
*
* @param string $directory
* A directory containing a project.
*/
public static function getProjectName($directory);
/**
* Returns the path to the default install location.
*
* @return string
* An absolute path to the default install location.
*/
public function getInstallDirectory();
/**
* Determines if the Updater can handle the project provided in $directory.
*
* @todo Provide something more rational here, like a project spec file.
*
* @param string $directory
*
* @return bool
* TRUE if the project is installed, FALSE if not.
*/
public static function canUpdateDirectory($directory);
/**
* Actions to run after an install has occurred.
*/
public function postInstall();
/**
* Actions to run after an update has occurred.
*/
public function postUpdate();
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UpdaterInterface:: |
public static | function | Determines if the Updater can handle the project provided in $directory. | 2 |
UpdaterInterface:: |
public | function | Returns the path to the default install location. | 2 |
UpdaterInterface:: |
public static | function | Returns the system name of the project. | |
UpdaterInterface:: |
public | function | Checks if the project is installed. | 2 |
UpdaterInterface:: |
public | function | Actions to run after an install has occurred. | |
UpdaterInterface:: |
public | function | Actions to run after an update has occurred. |