From 0270da2450471007ff87c29a1b6f98bec0b73a16 Mon Sep 17 00:00:00 2001 From: ryuring Date: Sun, 14 Apr 2024 11:10:47 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=AB=E3=82=B9=E3=82=BF=E3=83=A0=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=83=86=E3=83=B3=E3=83=84=E5=86=85=E3=81=AE=E3=83=97?= =?UTF-8?q?=E3=83=A9=E3=82=B0=E3=82=A4=E3=83=B3=E3=81=AEPlugin=E3=82=AF?= =?UTF-8?q?=E3=83=A9=E3=82=B9=E3=82=92=E6=96=B0=E5=90=8D=E7=A7=B0=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/baser-core/src/Utility/BcUtil.php | 1 + .../tests/TestCase/View/Helper/BcCkeditorHelperTest.php | 2 +- plugins/bc-content-link/tests/TestCase/PluginTest.php | 6 +++--- .../BcCcAutoZip/src/{Plugin.php => BcCcAutoZipPlugin.php} | 2 +- .../BcCcCheckbox/src/{Plugin.php => BcCcCheckboxPlugin.php} | 2 +- .../plugins/BcCcDate/src/{Plugin.php => BcCcDatePlugin.php} | 2 +- .../BcCcDateTime/src/{Plugin.php => BcCcDateTimePlugin.php} | 2 +- .../BcCcEmail/src/{Plugin.php => BcCcEmailPlugin.php} | 2 +- .../plugins/BcCcFile/src/{Plugin.php => BcCcFilePlugin.php} | 2 +- .../BcCcHidden/src/{Plugin.php => BcCcHiddenPlugin.php} | 2 +- .../BcCcMultiple/src/{Plugin.php => BcCcMultiplePlugin.php} | 2 +- .../BcCcPassword/src/{Plugin.php => BcCcPasswordPlugin.php} | 2 +- .../plugins/BcCcPref/src/{Plugin.php => BcCcPrefPlugin.php} | 2 +- .../BcCcRadio/src/{Plugin.php => BcCcRadioPlugin.php} | 2 +- .../BcCcRelated/src/{Plugin.php => BcCcRelatedPlugin.php} | 2 +- .../BcCcSelect/src/{Plugin.php => BcCcSelectPlugin.php} | 2 +- .../plugins/BcCcTel/src/{Plugin.php => BcCcTelPlugin.php} | 2 +- .../plugins/BcCcText/src/{Plugin.php => BcCcTextPlugin.php} | 2 +- .../BcCcTextarea/src/{Plugin.php => BcCcTextareaPlugin.php} | 2 +- .../BcCcWysiwyg/src/{Plugin.php => BcCcWysiwygPlugin.php} | 2 +- plugins/bc-search-index/tests/TestCase/PluginTest.php | 6 +++--- 21 files changed, 25 insertions(+), 24 deletions(-) rename plugins/bc-custom-content/plugins/BcCcAutoZip/src/{Plugin.php => BcCcAutoZipPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcCheckbox/src/{Plugin.php => BcCcCheckboxPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcDate/src/{Plugin.php => BcCcDatePlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcDateTime/src/{Plugin.php => BcCcDateTimePlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcEmail/src/{Plugin.php => BcCcEmailPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcFile/src/{Plugin.php => BcCcFilePlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcHidden/src/{Plugin.php => BcCcHiddenPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcMultiple/src/{Plugin.php => BcCcMultiplePlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcPassword/src/{Plugin.php => BcCcPasswordPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcPref/src/{Plugin.php => BcCcPrefPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcRadio/src/{Plugin.php => BcCcRadioPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcRelated/src/{Plugin.php => BcCcRelatedPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcSelect/src/{Plugin.php => BcCcSelectPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcTel/src/{Plugin.php => BcCcTelPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcText/src/{Plugin.php => BcCcTextPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcTextarea/src/{Plugin.php => BcCcTextareaPlugin.php} (95%) rename plugins/bc-custom-content/plugins/BcCcWysiwyg/src/{Plugin.php => BcCcWysiwygPlugin.php} (95%) diff --git a/plugins/baser-core/src/Utility/BcUtil.php b/plugins/baser-core/src/Utility/BcUtil.php index fa920274bc..d769914fa2 100644 --- a/plugins/baser-core/src/Utility/BcUtil.php +++ b/plugins/baser-core/src/Utility/BcUtil.php @@ -483,6 +483,7 @@ static public function includePluginClass($pluginName) if (!$pluginPath) { return false; } + $name = Inflector::camelize($name, '-'); if(file_exists($pluginPath . 'src' . DS . 'Plugin.php')) { $pluginClassPath = $pluginPath . 'src' . DS . 'Plugin.php'; } elseif(file_exists($pluginPath . 'src' . DS . $name . 'Plugin.php')) { diff --git a/plugins/baser-core/tests/TestCase/View/Helper/BcCkeditorHelperTest.php b/plugins/baser-core/tests/TestCase/View/Helper/BcCkeditorHelperTest.php index e79d629d07..cb9a9d2343 100644 --- a/plugins/baser-core/tests/TestCase/View/Helper/BcCkeditorHelperTest.php +++ b/plugins/baser-core/tests/TestCase/View/Helper/BcCkeditorHelperTest.php @@ -136,7 +136,7 @@ public function testSetEditorToolbar() 'editorToolType' => 'simple' ]); $this->assertIsArray($options['editorToolbar']); - (new \BcEditorTemplate\Plugin())->install(['connection' => 'test']); + (new \BcEditorTemplate\BcEditorTemplatePlugin())->install(['connection' => 'test']); $options = $this->BcCkeditor->setEditorToolbar([ 'editorToolbar' => [], 'editorUseTemplates' => true, diff --git a/plugins/bc-content-link/tests/TestCase/PluginTest.php b/plugins/bc-content-link/tests/TestCase/PluginTest.php index 8b43b00278..8fc241e989 100644 --- a/plugins/bc-content-link/tests/TestCase/PluginTest.php +++ b/plugins/bc-content-link/tests/TestCase/PluginTest.php @@ -11,14 +11,14 @@ namespace BcContentLink\Test\TestCase; -use BcContentLink\Plugin; +use BcContentLink\BcContentLinkPlugin; use BcContentLink\Service\ContentLinksServiceInterface; use Cake\Core\Container; use BaserCore\TestSuite\BcTestCase; /** * Class PluginTest - * @property Plugin $Plugin + * @property BcContentLinkPlugin $Plugin */ class PluginTest extends BcTestCase { @@ -31,7 +31,7 @@ class PluginTest extends BcTestCase public function setUp(): void { parent::setUp(); - $this->Plugin = new Plugin(['name' => 'BcContentLink']); + $this->Plugin = new BcContentLinkPlugin(['name' => 'BcContentLink']); } /** diff --git a/plugins/bc-custom-content/plugins/BcCcAutoZip/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcAutoZip/src/BcCcAutoZipPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcAutoZip/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcAutoZip/src/BcCcAutoZipPlugin.php index e5c79355c6..2f1db60f4e 100644 --- a/plugins/bc-custom-content/plugins/BcCcAutoZip/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcAutoZip/src/BcCcAutoZipPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcAutoZipPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcCheckbox/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcCheckbox/src/BcCcCheckboxPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcCheckbox/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcCheckbox/src/BcCcCheckboxPlugin.php index 97b10b5b34..e89eb537fb 100644 --- a/plugins/bc-custom-content/plugins/BcCcCheckbox/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcCheckbox/src/BcCcCheckboxPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcCheckboxPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcDate/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcDate/src/BcCcDatePlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcDate/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcDate/src/BcCcDatePlugin.php index 3d4e4e6eb7..010fbb9830 100644 --- a/plugins/bc-custom-content/plugins/BcCcDate/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcDate/src/BcCcDatePlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcDatePlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcDateTime/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcDateTime/src/BcCcDateTimePlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcDateTime/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcDateTime/src/BcCcDateTimePlugin.php index 67f7bb4a80..dd0636eceb 100644 --- a/plugins/bc-custom-content/plugins/BcCcDateTime/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcDateTime/src/BcCcDateTimePlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcDateTimePlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcEmail/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcEmail/src/BcCcEmailPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcEmail/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcEmail/src/BcCcEmailPlugin.php index 5e8b350ec4..836521f999 100644 --- a/plugins/bc-custom-content/plugins/BcCcEmail/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcEmail/src/BcCcEmailPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcEmailPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcFile/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcFile/src/BcCcFilePlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcFile/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcFile/src/BcCcFilePlugin.php index 46a8d4364a..0559ee6404 100644 --- a/plugins/bc-custom-content/plugins/BcCcFile/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcFile/src/BcCcFilePlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcFilePlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcHidden/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcHidden/src/BcCcHiddenPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcHidden/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcHidden/src/BcCcHiddenPlugin.php index 167b7f2de5..0e5115702c 100644 --- a/plugins/bc-custom-content/plugins/BcCcHidden/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcHidden/src/BcCcHiddenPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcHiddenPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcMultiple/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcMultiple/src/BcCcMultiplePlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcMultiple/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcMultiple/src/BcCcMultiplePlugin.php index fe7cc6b28f..1e009f5f70 100644 --- a/plugins/bc-custom-content/plugins/BcCcMultiple/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcMultiple/src/BcCcMultiplePlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcMultiplePlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcPassword/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcPassword/src/BcCcPasswordPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcPassword/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcPassword/src/BcCcPasswordPlugin.php index 25fc120ebc..cae65099b9 100644 --- a/plugins/bc-custom-content/plugins/BcCcPassword/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcPassword/src/BcCcPasswordPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcPasswordPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcPref/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcPref/src/BcCcPrefPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcPref/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcPref/src/BcCcPrefPlugin.php index 25ed4649e6..46c63ab8c4 100644 --- a/plugins/bc-custom-content/plugins/BcCcPref/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcPref/src/BcCcPrefPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcPrefPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcRadio/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcRadio/src/BcCcRadioPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcRadio/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcRadio/src/BcCcRadioPlugin.php index 62eae6a065..c447af9a70 100644 --- a/plugins/bc-custom-content/plugins/BcCcRadio/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcRadio/src/BcCcRadioPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcRadioPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcRelated/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcRelated/src/BcCcRelatedPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcRelated/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcRelated/src/BcCcRelatedPlugin.php index ed57dda5ba..0a02c9602f 100644 --- a/plugins/bc-custom-content/plugins/BcCcRelated/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcRelated/src/BcCcRelatedPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcRelatedPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcSelect/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcSelect/src/BcCcSelectPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcSelect/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcSelect/src/BcCcSelectPlugin.php index da1c3f1011..d78828fedb 100644 --- a/plugins/bc-custom-content/plugins/BcCcSelect/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcSelect/src/BcCcSelectPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcSelectPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcTel/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcTel/src/BcCcTelPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcTel/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcTel/src/BcCcTelPlugin.php index 9e7630b4cc..890fc7990d 100644 --- a/plugins/bc-custom-content/plugins/BcCcTel/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcTel/src/BcCcTelPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcTelPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcText/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcText/src/BcCcTextPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcText/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcText/src/BcCcTextPlugin.php index ce3a137d4a..ee5afd4f9b 100644 --- a/plugins/bc-custom-content/plugins/BcCcText/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcText/src/BcCcTextPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcTextPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcTextarea/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcTextarea/src/BcCcTextareaPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcTextarea/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcTextarea/src/BcCcTextareaPlugin.php index fe337608d8..08fa87c4b7 100644 --- a/plugins/bc-custom-content/plugins/BcCcTextarea/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcTextarea/src/BcCcTextareaPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcTextareaPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcWysiwyg/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcWysiwyg/src/BcCcWysiwygPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcWysiwyg/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcWysiwyg/src/BcCcWysiwygPlugin.php index 3746e9b5a5..1c28ab8ed4 100644 --- a/plugins/bc-custom-content/plugins/BcCcWysiwyg/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcWysiwyg/src/BcCcWysiwygPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcWysiwygPlugin extends BcPlugin { /** diff --git a/plugins/bc-search-index/tests/TestCase/PluginTest.php b/plugins/bc-search-index/tests/TestCase/PluginTest.php index 7859a87b7b..c15d52cd9b 100644 --- a/plugins/bc-search-index/tests/TestCase/PluginTest.php +++ b/plugins/bc-search-index/tests/TestCase/PluginTest.php @@ -11,7 +11,7 @@ namespace BcSearchIndex\Test\TestCase; -use BcSearchIndex\Plugin; +use BcSearchIndex\BcSearchIndexPlugin; use BcSearchIndex\Service\Admin\SearchIndexesAdminServiceInterface; use BcSearchIndex\Service\SearchIndexesServiceInterface; use Cake\Core\Container; @@ -19,7 +19,7 @@ /** * Class PluginTest - * @property Plugin $Plugin + * @property BcSearchIndexPlugin $Plugin */ class PluginTest extends BcTestCase { @@ -32,7 +32,7 @@ class PluginTest extends BcTestCase public function setUp(): void { parent::setUp(); - $this->Plugin = new Plugin(['name' => 'BcSearchIndex']); + $this->Plugin = new BcSearchIndexPlugin(['name' => 'BcSearchIndex']); } /**