-
-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
540 additions
and
417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
modules/system/classes/extensions/ExtensionManagerInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace System\Classes\Extensions; | ||
|
||
use System\Classes\Extensions\Source\ExtensionSource; | ||
use Winter\Storm\Exception\ApplicationException; | ||
|
||
interface ExtensionManagerInterface | ||
{ | ||
public const EXTENSION_NAME = ''; | ||
|
||
// | ||
// Disabled by system | ||
// | ||
|
||
public const DISABLED_MISSING = 'disabled-missing'; | ||
public const DISABLED_REPLACED = 'disabled-replaced'; | ||
public const DISABLED_REPLACEMENT_FAILED = 'disabled-replacement-failed'; | ||
public const DISABLED_MISSING_DEPENDENCIES = 'disabled-dependencies'; | ||
|
||
// | ||
// Explicitly disabled for a reason | ||
// | ||
|
||
public const DISABLED_REQUEST = 'disabled-request'; | ||
public const DISABLED_BY_USER = 'disabled-user'; | ||
public const DISABLED_BY_CONFIG = 'disabled-config'; | ||
|
||
public function list(): array; | ||
|
||
public function create(string $extension): WinterExtension; | ||
|
||
/** | ||
* @throws ApplicationException If the installation fails | ||
*/ | ||
public function install(ExtensionSource|WinterExtension|string $extension): WinterExtension; | ||
|
||
public function isInstalled(ExtensionSource|WinterExtension|string $extension): bool; | ||
|
||
public function get(ExtensionSource|WinterExtension|string $extension): ?WinterExtension; | ||
|
||
public function enable(WinterExtension|string $extension, string|bool $flag = self::DISABLED_BY_USER): mixed; | ||
|
||
public function disable(WinterExtension|string $extension, string|bool $flag = self::DISABLED_BY_USER): mixed; | ||
|
||
public function update(WinterExtension|string $extension): mixed; | ||
|
||
public function refresh(WinterExtension|string $extension): mixed; | ||
|
||
public function rollback(WinterExtension|string $extension, string $targetVersion): mixed; | ||
|
||
public function uninstall(WinterExtension|string $extension): mixed; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.