Skip to content

Commit

Permalink
[cleanup] add plugin interface
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelfolaron committed May 25, 2024
1 parent c596342 commit aa1726e
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions app/Domain/Plugins/Contracts/PluginInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace Leantime\Domain\Plugins\Contracts;

/**
* Interface PluginInterface
*
* This interface represents a plugin that can be installed, uninstalled, enabled, and disabled.
*/
interface PluginInterface
{

/**
* Installs the plugin.
*
* @return bool True if the installation is successful, false otherwise.
*/
public function install(): bool;

/**
* Uninstalls the plugin.
*
* This method performs the necessary actions to uninstall the application and remove all associated files and data.
*
* @return bool Returns true if the uninstallation is successful, false otherwise.
*/
public function uninstall(): bool;

/**
* Enables the plugin.
*
* This method performs the necessary actions to enable the specified functionality. It may update configuration settings, start background processes, or perform any other actions required
* to enable the functionality.
*
* @return bool Returns true if the enable operation is successful, false otherwise.
*/
public function enable(): bool;

/**
* Disable the plugin.
*
* This method disables the functionality and returns a boolean value indicating whether the functionality is successfully disabled or not.
*
* @return bool True if the functionality is successfully disabled, false otherwise.
*/
public function disable(): bool;


}

0 comments on commit aa1726e

Please sign in to comment.