From b22d11baf9d990ee0e607b03c1df8ec88f557d12 Mon Sep 17 00:00:00 2001 From: Jack Wilkinson Date: Fri, 6 Dec 2024 18:56:32 +0000 Subject: [PATCH] Added objects for source types --- modules/cms/classes/ThemeManager.php | 3 +-- .../classes/extensions/ExtensionManager.php | 1 + .../classes/extensions/PluginManager.php | 1 + .../extensions/source/ComposerSource.php | 20 +++++++++++++++++++ .../{ => source}/ExtensionSource.php | 4 +++- .../classes/extensions/source/LocalSource.php | 20 +++++++++++++++++++ .../extensions/source/MarketSource.php | 20 +++++++++++++++++++ 7 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 modules/system/classes/extensions/source/ComposerSource.php rename modules/system/classes/extensions/{ => source}/ExtensionSource.php (97%) create mode 100644 modules/system/classes/extensions/source/LocalSource.php create mode 100644 modules/system/classes/extensions/source/MarketSource.php diff --git a/modules/cms/classes/ThemeManager.php b/modules/cms/classes/ThemeManager.php index 8eb2abc1a..cda79214f 100644 --- a/modules/cms/classes/ThemeManager.php +++ b/modules/cms/classes/ThemeManager.php @@ -2,9 +2,8 @@ namespace Cms\Classes; -use Cms\Classes\Theme; use System\Classes\Extensions\ExtensionManager; -use System\Classes\Extensions\ExtensionSource; +use System\Classes\Extensions\Source\ExtensionSource; use System\Classes\Extensions\WinterExtension; use System\Models\Parameter; use Winter\Storm\Exception\ApplicationException; diff --git a/modules/system/classes/extensions/ExtensionManager.php b/modules/system/classes/extensions/ExtensionManager.php index 4814dc0bd..ef4dd43d5 100644 --- a/modules/system/classes/extensions/ExtensionManager.php +++ b/modules/system/classes/extensions/ExtensionManager.php @@ -2,6 +2,7 @@ namespace System\Classes\Extensions; +use System\Classes\Extensions\Source\ExtensionSource; use Winter\Storm\Exception\ApplicationException; interface ExtensionManager diff --git a/modules/system/classes/extensions/PluginManager.php b/modules/system/classes/extensions/PluginManager.php index c689cc74a..30ba82e8a 100644 --- a/modules/system/classes/extensions/PluginManager.php +++ b/modules/system/classes/extensions/PluginManager.php @@ -14,6 +14,7 @@ use RecursiveDirectoryIterator; use RecursiveIteratorIterator; use System\Classes\ComposerManager; +use System\Classes\Extensions\Source\ExtensionSource; use System\Classes\SettingsManager; use System\Classes\UpdateManager; use System\Classes\VersionManager; diff --git a/modules/system/classes/extensions/source/ComposerSource.php b/modules/system/classes/extensions/source/ComposerSource.php new file mode 100644 index 000000000..837da28e8 --- /dev/null +++ b/modules/system/classes/extensions/source/ComposerSource.php @@ -0,0 +1,20 @@ +