From 7edbe20c33fcc5016759c297e1503d0cb457df82 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 29 Jan 2023 22:12:42 +0200 Subject: [PATCH] Move the Power, Plugin and Module builders into the container. Many more PHP 8 improvments. --- README.md | 6 +- admin/README.txt | 6 +- admin/assets/js/search.js | 14 +- admin/helpers/compiler.php | 105 +- admin/helpers/compiler/a_Get.php | 74 +- admin/helpers/compiler/b_Structure.php | 1420 +---------------- admin/helpers/compiler/c_Fields.php | 62 +- admin/helpers/compiler/e_Interpretation.php | 38 +- admin/helpers/compiler/f_Infusion.php | 18 +- .../en-GB/en-GB.com_componentbuilder.ini | 3 + admin/sql/install.mysql.utf8.sql | 16 +- admin/views/search/view.html.php | 3 +- componentbuilder.xml | 2 +- .../VDM.Gitea/src/AbstractGiteaObject.php | 2 +- .../VDM.Gitea/src/Package/Repo/Wiki.php | 2 +- .../Abstraction/MapperSingle.php | 122 ++ .../Compiler/Component/Data.php | 34 +- .../Compiler/Component/Placeholder.php | 2 +- .../src/Componentbuilder/Compiler/Config.php | 15 + .../Componentbuilder/Compiler/Customcode.php | 10 +- .../Compiler/Customcode/Dispenser.php | 6 +- .../Compiler/Customcode/External.php | 14 +- .../Compiler/Customcode/Extractor.php | 10 +- .../Compiler/Customcode/Extractor/Paths.php | 13 +- .../Compiler/Customcode/Gui.php | 2 +- .../Compiler/Customcode/Hash.php | 4 +- .../Compiler/Customcode/LockBase.php | 2 +- .../Compiler/Customview/Data.php | 10 +- .../src/Componentbuilder/Compiler/Factory.php | 4 +- .../Customcode/DispenserInterface.php | 2 +- .../Compiler/JoomlaThree/History.php | 2 +- .../Compiler/Joomlamodule/Builder.php | 883 ++++++++++ .../Compiler/Joomlamodule/Data.php | 10 +- .../Compiler/Joomlaplugin/Builder.php | 626 ++++++++ .../Compiler/Joomlaplugin/Data.php | 10 +- .../Compiler/Language/Extractor.php | 10 +- .../Compiler/Library/Builder.php | 318 ++++ .../Compiler/Model/Dynamicget.php | 6 +- .../Compiler/Model/Fields.php | 2 +- .../Compiler/Model/Sqldump.php | 8 +- .../Compiler/Model/Sqltweaking.php | 4 +- .../Compiler/Placeholder/Reverse.php | 2 +- .../src/Componentbuilder/Compiler/Power.php | 12 +- .../Compiler/Power/Builder.php | 339 ++++ .../Compiler/Power/Infusion.php | 81 +- .../Compiler/Service/Compiler.php | 17 - .../Compiler/Service/Joomlamodule.php | 28 + .../Compiler/Service/Joomlaplugin.php | 28 + .../Compiler/Service/Library.php | 39 +- .../Compiler/Service/Power.php | 27 + .../Compiler/Service/Utilities.php | 134 ++ .../Compiler/{ => Utilities}/Counter.php | 7 +- .../Compiler/Utilities/File.php | 109 ++ .../Compiler/Utilities/Files.php | 26 + .../Compiler/Utilities/Folder.php | 172 ++ .../Compiler/Utilities/Path.php | 2 +- .../Compiler/Utilities/Paths.php | 132 ++ .../Compiler/Utilities/Unique.php | 4 +- .../src/Componentbuilder/Server/Ftp.php | 2 +- .../VDM.Joomla/src/Utilities/ArrayHelper.php | 4 +- .../VDM.Joomla/src/Utilities/FileHelper.php | 17 +- .../VDM.Joomla/src/Utilities/JsonHelper.php | 2 +- .../Utilities/String/ClassfunctionHelper.php | 2 +- .../VDM.Joomla/src/Utilities/StringHelper.php | 2 +- .../VDM.Minify/src/Abstraction/Minify.php | 10 +- libraries/jcb_powers/VDM.Minify/src/Css.php | 18 +- .../VDM.Minify/src/Path/Converter.php | 6 +- .../en-GB/en-GB.com_componentbuilder.ini | 2 + 68 files changed, 3443 insertions(+), 1681 deletions(-) create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/MapperSingle.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Builder.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Builder.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Library/Builder.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power/Builder.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php rename libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/{ => Utilities}/Counter.php (93%) create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/File.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Files.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Folder.php create mode 100644 libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Paths.php diff --git a/README.md b/README.md index 646e98b9c..a2cbe914b 100644 --- a/README.md +++ b/README.md @@ -140,13 +140,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 22nd January, 2023 ++ *Last Build*: 29th January, 2023 + *Version*: 3.1.13 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **357633** ++ *Line count*: **360674** + *Field count*: **2009** -+ *File count*: **2304** ++ *File count*: **2314** + *Folder count*: **408** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 646e98b9c..a2cbe914b 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -140,13 +140,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 22nd January, 2023 ++ *Last Build*: 29th January, 2023 + *Version*: 3.1.13 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **357633** ++ *Line count*: **360674** + *Field count*: **2009** -+ *File count*: **2304** ++ *File count*: **2314** + *Folder count*: **408** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/assets/js/search.js b/admin/assets/js/search.js index 2ee64d300..1433d72ed 100644 --- a/admin/assets/js/search.js +++ b/admin/assets/js/search.js @@ -191,14 +191,14 @@ const getSelectedItem = async (table, row, field, line) => { formData.append('regex_search', regexObject.checked ? 1 : 0); // get search value - if (mode == 1) { - // calling URL - postURL = UrlAjax + 'getSearchValue'; - } else { + if (mode == 2) { // add the line value formData.append('line_nr', line); // calling URL postURL = UrlAjax + 'getReplaceValue'; + } else { + // calling URL + postURL = UrlAjax + 'getSearchValue'; } let options = { @@ -613,6 +613,12 @@ const buttonUpdateAllStyleDisplay = async (value) => { * JS Function to execute (A) on search/replace text change , (B) on search options changes */ const startSearch = (field, forced = false) => { + // check mode + let mode = modeObject.querySelector('input[type=\'radio\']:checked').value; + if (mode == 0) { + // reset the search area + window.location.href = UrlSearch; + } // check if we have an Enter click if (field && typeof field.code !== 'undefined' && field.code === "Enter") { forced = true; diff --git a/admin/helpers/compiler.php b/admin/helpers/compiler.php index 598318ded..2de5cedac 100644 --- a/admin/helpers/compiler.php +++ b/admin/helpers/compiler.php @@ -80,7 +80,7 @@ class Compiler extends Infusion { // to check the compiler speed $this->time_start = microtime(true); - CFactory::_('Counter')->start(); + CFactory::_('Utilities.Counter')->start(); // first we run the parent constructors if (parent::__construct()) { @@ -104,9 +104,9 @@ class Compiler extends Infusion if (CFactory::_('Config')->remove_site_folder && CFactory::_('Config')->remove_site_edit_folder) { // first remove the files and folders - $this->removeFolder($this->componentPath . '/site'); + CFactory::_('Utilities.Folder')->remove(CFactory::_('Utilities.Paths')->component_path . '/site'); // clear form component xml - $xmlPath = $this->componentPath . '/' + $xmlPath = CFactory::_('Utilities.Paths')->component_path . '/' . CFactory::_('Content')->get('component') . '.xml'; $componentXML = FileHelper::getContent($xmlPath); $textToSite = GetHelper::between( @@ -120,7 +120,7 @@ class Compiler extends Infusion '' . $textToSiteLang . ""), array('', ''), (string) $componentXML ); - $this->writeFile($xmlPath, $componentXML); + CFactory::_('Utilities.File')->write($xmlPath, $componentXML); } // for plugin event TODO change event api signatures $component_context = CFactory::_('Config')->component_context; @@ -363,7 +363,7 @@ class Compiler extends Infusion // end the timer here $this->time_end = microtime(true); $this->secondsCompiled = $this->time_end - $this->time_start; - CFactory::_('Counter')->end(); + CFactory::_('Utilities.Counter')->end(); // completed the compilation return true; @@ -380,15 +380,13 @@ class Compiler extends Infusion */ protected function updateFiles() { - if (isset($this->newFiles['static']) - && ArrayHelper::check($this->newFiles['static']) - && isset($this->newFiles['dynamic']) - && ArrayHelper::check($this->newFiles['dynamic'])) + if (CFactory::_('Utilities.Files')->exists('static') + && CFactory::_('Utilities.Files')->exists('dynamic')) { // get the bom file $bom = FileHelper::getContent(CFactory::_('Config')->bom_path); // first we do the static files - foreach ($this->newFiles['static'] as $static) + foreach (CFactory::_('Utilities.Files')->get('static') as $static) { if (File::exists($static['path'])) { @@ -398,7 +396,7 @@ class Compiler extends Infusion } } // now we do the dynamic files - foreach ($this->newFiles['dynamic'] as $view => $files) + foreach (CFactory::_('Utilities.Files')->get('dynamic') as $view => $files) { if (CFactory::_('Content')->exist_($view) && ArrayHelper::check( @@ -423,17 +421,14 @@ class Compiler extends Infusion CFactory::_('Content')->remove_($view); } // free up some memory - unset($this->newFiles['dynamic']); + CFactory::_('Utilities.Files')->remove('dynamic'); // do modules if found if (CFactory::_('Joomlamodule.Data')->exists()) { foreach (CFactory::_('Joomlamodule.Data')->get() as $module) { if (ObjectHelper::check($module) - && isset($this->newFiles[$module->key]) - && ArrayHelper::check( - $this->newFiles[$module->key] - )) + && CFactory::_('Utilities.Files')->exists($module->key)) { // move field or rule if needed if (isset($module->fields_rules_paths) @@ -489,7 +484,7 @@ class Compiler extends Infusion } } // update the module files - foreach ($this->newFiles[$module->key] as $module_file) + foreach (CFactory::_('Utilities.Files')->get($module->key) as $module_file) { if (File::exists($module_file['path'])) { @@ -500,7 +495,7 @@ class Compiler extends Infusion } } // free up some memory - unset($this->newFiles[$module->key]); + CFactory::_('Utilities.Files')->remove($module->key); CFactory::_('Content')->remove_($module->key); } } @@ -511,10 +506,7 @@ class Compiler extends Infusion foreach (CFactory::_('Joomlaplugin.Data')->get() as $plugin) { if (ObjectHelper::check($plugin) - && isset($this->newFiles[$plugin->key]) - && ArrayHelper::check( - $this->newFiles[$plugin->key] - )) + && CFactory::_('Utilities.Files')->exists($plugin->key)) { // move field or rule if needed if (isset($plugin->fields_rules_paths) @@ -570,7 +562,7 @@ class Compiler extends Infusion } } // update the plugin files - foreach ($this->newFiles[$plugin->key] as $plugin_file) + foreach (CFactory::_('Utilities.Files')->get($plugin->key) as $plugin_file) { if (File::exists($plugin_file['path'])) { @@ -581,7 +573,7 @@ class Compiler extends Infusion } } // free up some memory - unset($this->newFiles[$plugin->key]); + CFactory::_('Utilities.Files')->remove($plugin->key); CFactory::_('Content')->remove_($plugin->key); } } @@ -592,13 +584,10 @@ class Compiler extends Infusion foreach (CFactory::_('Power')->active as $power) { if (ObjectHelper::check($power) - && isset($this->newFiles[$power->key]) - && ArrayHelper::check( - $this->newFiles[$power->key] - )) + && CFactory::_('Utilities.Files')->exists($power->key)) { // update the power files - foreach ($this->newFiles[$power->key] as $power_file) + foreach (CFactory::_('Utilities.Files')->get($power->key) as $power_file) { if (File::exists($power_file['path'])) { @@ -609,7 +598,7 @@ class Compiler extends Infusion } } // free up some memory - unset($this->newFiles[$power->key]); + CFactory::_('Utilities.Files')->remove($power->key); CFactory::_('Content')->remove_($power->key); } } @@ -681,9 +670,9 @@ class Compiler extends Infusion &$view) ); // add answer back to file - $this->writeFile($path, $answer); + CFactory::_('Utilities.File')->write($path, $answer); // count the file lines - CFactory::_('Counter')->line += substr_count((string) $answer, PHP_EOL); + CFactory::_('Utilities.Counter')->line += substr_count((string) $answer, PHP_EOL); } /** @@ -699,7 +688,7 @@ class Compiler extends Infusion && isset($this->updateServerFileName) && $this->dynamicIntegration) { - $update_server_xml_path = $this->componentPath . '/' + $update_server_xml_path = CFactory::_('Utilities.Paths')->component_path . '/' . $this->updateServerFileName . '.xml'; // make sure we have the correct file if (File::exists($update_server_xml_path) @@ -843,7 +832,7 @@ class Compiler extends Infusion { // do a final run to update the readme file $two = 0; - foreach ($this->newFiles['static'] as $static) + foreach (CFactory::_('Utilities.Files')->get('static') as $static) { if (('README.md' === $static['name'] || 'README.txt' === $static['name']) @@ -858,23 +847,23 @@ class Compiler extends Infusion break; } } - unset($this->newFiles['static']); + CFactory::_('Utilities.Files')->remove('static'); } private function setReadMe($path) { // set readme data if not set already if (!CFactory::_('Content')->exist('LINE_COUNT') - || CFactory::_('Content')->get('LINE_COUNT') != CFactory::_('Counter')->line) + || CFactory::_('Content')->get('LINE_COUNT') != CFactory::_('Utilities.Counter')->line) { - CFactory::_('Counter')->set(); + CFactory::_('Utilities.Counter')->set(); } // get the file $string = FileHelper::getContent($path); // update the file $answer = CFactory::_('Placeholder')->update($string, CFactory::_('Content')->active); // add to zip array - $this->writeFile($path, $answer); + CFactory::_('Utilities.File')->write($path, $answer); } /** @@ -910,20 +899,21 @@ class Compiler extends Infusion . CFactory::_('Config')->get('version', 3); // for plugin event TODO change event api signatures $component_context = CFactory::_('Config')->component_context; + $component_path = CFactory::_('Utilities.Paths')->component_path; // Trigger Event: jcb_ce_onBeforeUpdateRepo CFactory::_('Event')->trigger( 'jcb_ce_onBeforeUpdateRepo', - array(&$component_context, &$this->componentPath, + array(&$component_context, &$component_path, &$repoFullPath, &$this->componentData) ); // remove old data - $this->removeFolder($repoFullPath, CFactory::_('Component')->get('toignore')); + CFactory::_('Utilities.Folder')->remove($repoFullPath, CFactory::_('Component')->get('toignore')); // set the new data - Folder::copy($this->componentPath, $repoFullPath, '', true); + Folder::copy(CFactory::_('Utilities.Paths')->component_path, $repoFullPath, '', true); // Trigger Event: jcb_ce_onAfterUpdateRepo CFactory::_('Event')->trigger( 'jcb_ce_onAfterUpdateRepo', - array(&$component_context, &$this->componentPath, + array(&$component_context, &$component_path, &$repoFullPath, &$this->componentData) ); @@ -948,7 +938,7 @@ class Compiler extends Infusion &$repoFullPath, &$module) ); // remove old data - $this->removeFolder( + CFactory::_('Utilities.Folder')->remove( $repoFullPath, CFactory::_('Component')->get('toignore') ); // set the new data @@ -985,7 +975,7 @@ class Compiler extends Infusion &$repoFullPath, &$plugin) ); // remove old data - $this->removeFolder( + CFactory::_('Utilities.Folder')->remove( $repoFullPath, CFactory::_('Component')->get('toignore') ); // set the new data @@ -1007,22 +997,25 @@ class Compiler extends Infusion private function zipComponent() { // Component Folder Name - $this->filepath['component-folder'] = $this->componentFolderName; + $this->filepath['component-folder'] = CFactory::_('Utilities.Paths')->component_folder_name; // the name of the zip file to create $this->filepath['component'] = $this->tempPath . '/' . $this->filepath['component-folder'] . '.zip'; // for plugin event TODO change event api signatures $component_context = CFactory::_('Config')->component_context; + $component_path = CFactory::_('Utilities.Paths')->component_path; + $component_sales_name = CFactory::_('Utilities.Paths')->component_sales_name; + $component_folder_name = CFactory::_('Utilities.Paths')->component_folder_name; // Trigger Event: jcb_ce_onBeforeZipComponent CFactory::_('Event')->trigger( 'jcb_ce_onBeforeZipComponent', - array(&$component_context, &$this->componentPath, + array(&$component_context, &$component_path, &$this->filepath['component'], &$this->tempPath, - &$this->componentFolderName, &$this->componentData) + &$component_folder_name, &$this->componentData) ); //create the zip file if (FileHelper::zip( - $this->componentPath, $this->filepath['component'] + CFactory::_('Utilities.Paths')->component_path, $this->filepath['component'] )) { // now move to backup if zip was made and backup is required @@ -1039,7 +1032,7 @@ class Compiler extends Infusion // copy the zip to backup path File::copy( $this->filepath['component'], - $this->backupPath . '/' . $this->componentBackupName + $this->backupPath . '/' . CFactory::_('Utilities.Paths')->component_backup_name . '.zip' ); } @@ -1055,12 +1048,12 @@ class Compiler extends Infusion 'jcb_ce_onBeforeMoveToServer', array(&$component_context, &$this->filepath['component'], &$this->tempPath, - &$this->componentSalesName, &$this->componentData) + &$component_sales_name, &$this->componentData) ); // move to server ComponentbuilderHelper::moveToServer( $this->filepath['component'], - $this->componentSalesName . '.zip', + $component_sales_name . '.zip', (int) CFactory::_('Component')->get('sales_server'), CFactory::_('Component')->get('sales_server_protocol') ); @@ -1070,11 +1063,11 @@ class Compiler extends Infusion CFactory::_('Event')->trigger( 'jcb_ce_onAfterZipComponent', array(&$component_context, &$this->filepath['component'], - &$this->tempPath, &$this->componentFolderName, + &$this->tempPath, &$component_folder_name, &$this->componentData) ); // remove the component folder since we are done - if ($this->removeFolder($this->componentPath)) + if (CFactory::_('Utilities.Folder')->remove(CFactory::_('Utilities.Paths')->component_path)) { return true; } @@ -1170,7 +1163,7 @@ class Compiler extends Infusion &$module) ); // remove the module folder since we are done - $this->removeFolder($module->folder_path); + CFactory::_('Utilities.Folder')->remove($module->folder_path); } } } @@ -1264,7 +1257,7 @@ class Compiler extends Infusion &$plugin) ); // remove the plugin folder since we are done - $this->removeFolder($plugin->folder_path); + CFactory::_('Utilities.Folder')->remove($plugin->folder_path); } } } @@ -1288,7 +1281,7 @@ class Compiler extends Infusion $target['hashtarget'][1] )) { - $file = $this->componentPath . '/' . $target['path']; + $file = CFactory::_('Utilities.Paths')->component_path . '/' . $target['path']; $size = (int) $target['hashtarget'][0]; $hash = $target['hashtarget'][1]; $cut = $size - 1; diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index d6ed9f0bd..99abf9918 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -2681,70 +2681,38 @@ class Get * get the module xml template * * @return string - * + * @deprecated 3.3 */ public function getModuleXMLTemplate(&$module) { - $xml = ''; - $xml .= PHP_EOL . ''; - $xml .= PHP_EOL . Indent::_(1) . '' . $module->lang_prefix - . ''; - $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('BUILDDATE') . ''; - $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOR') . ''; - $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOREMAIL') . ''; - $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHORWEBSITE') . ''; - $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('COPYRIGHT') . ''; - $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('LICENSE') . ''; - $xml .= PHP_EOL . Indent::_(1) . '' . $module->module_version - . ''; - $xml .= PHP_EOL . Indent::_(1) . '' . $module->lang_prefix - . '_XML_DESCRIPTION'; - $xml .= Placefix::_h('MAINXML'); - $xml .= PHP_EOL . ''; - - return $xml; + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); } /** * get the module admin custom script field * * @return string - * + * @deprecated 3.3 */ public function getModAdminVvvvvvvdm($fieldScriptBucket) { - $form_field_class = array(); - $form_field_class[] = Placefix::_h('BOM') . PHP_EOL; - $form_field_class[] = "//" . Line::_(__Line__, __Class__) - . " No direct access to this file"; - $form_field_class[] = "defined('_JEXEC') or die('Restricted access');"; - $form_field_class[] = PHP_EOL . "use Joomla\CMS\Form\FormField;"; - $form_field_class[] = "use Joomla\CMS\Factory;"; - $form_field_class[] = PHP_EOL - . "class JFormFieldModadminvvvvvvvdm extends FormField"; - $form_field_class[] = "{"; - $form_field_class[] = Indent::_(1) - . "protected \$type = 'modadminvvvvvvvdm';"; - $form_field_class[] = PHP_EOL . Indent::_(1) - . "protected function getLabel()"; - $form_field_class[] = Indent::_(1) . "{"; - $form_field_class[] = Indent::_(2) . "return;"; - $form_field_class[] = Indent::_(1) . "}"; - $form_field_class[] = PHP_EOL . Indent::_(1) - . "protected function getInput()"; - $form_field_class[] = Indent::_(1) . "{"; - $form_field_class[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) - . " Get the document"; - $form_field_class[] = Indent::_(2) - . "\$document = Factory::getDocument();"; - $form_field_class[] = implode(PHP_EOL, $fieldScriptBucket); - $form_field_class[] = Indent::_(2) . "return; // noting for now :)"; - $form_field_class[] = Indent::_(1) . "}"; - $form_field_class[] = "}"; - - return implode(PHP_EOL, $form_field_class); + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + JText::sprintf('

%s Warning

', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + JText::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); } /** @@ -2810,7 +2778,7 @@ class Get { $xml = ''; $xml .= PHP_EOL . ''; $xml .= PHP_EOL . Indent::_(1) . '' . $plugin->lang_prefix . ''; diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 4970a6fb7..033aa2ae3 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -37,7 +37,7 @@ class Structure extends Get * The folder counter * * @var int - * @deprecated 3.3 Use CFactory::_('Counter')->folder; + * @deprecated 3.3 Use CFactory::_('Utilities.Counter')->folder; */ public $folderCount = 0; @@ -45,7 +45,7 @@ class Structure extends Get * The file counter * * @var int - * @deprecated 3.3 Use CFactory::_('Counter')->file; + * @deprecated 3.3 Use CFactory::_('Utilities.Counter')->file; */ public $fileCount = 0; @@ -62,7 +62,7 @@ class Structure extends Get * * @var int * @deprecated 3.3 - * @deprecated 3.3 Use CFactory::_('Counter')->line; + * @deprecated 3.3 Use CFactory::_('Utilities.Counter')->line; */ public $lineCount = 0; @@ -246,6 +246,7 @@ class Structure extends Get * The template path * * @var string + * @deprecated 3.3 Use CFactory::_('Utilities.Paths')->template_path; */ public $templatePath; @@ -253,6 +254,7 @@ class Structure extends Get * The custom template path * * @var string + * @deprecated 3.3 Use CFactory::_('Utilities.Paths')->template_path_custom; */ public $templatePathCustom; @@ -313,6 +315,7 @@ class Structure extends Get * The Component Sales name * * @var string + * @deprecated 3.3 Use CFactory::_('Utilities.Paths')->component_sales_name; */ public $componentSalesName; @@ -320,6 +323,7 @@ class Structure extends Get * The Component Backup name * * @var string + * @deprecated 3.3 Use CFactory::_('Utilities.Paths')->component_backup_name; */ public $componentBackupName; @@ -327,6 +331,7 @@ class Structure extends Get * The Component Folder name * * @var string + * @deprecated 3.3 Use CFactory::_('Utilities.Paths')->component_folder_name; */ public $componentFolderName; @@ -334,6 +339,7 @@ class Structure extends Get * The Component path * * @var string + * @deprecated 3.3 Use CFactory::_('Utilities.Paths')->component_path; */ public $componentPath; @@ -341,6 +347,7 @@ class Structure extends Get * The Dynamic paths * * @var array + * @deprecated 3.3 Use CFactory::_('Registry')->get('dynamic_paths'); */ public $dynamicPaths = array(); @@ -362,6 +369,7 @@ class Structure extends Get * The new files * * @var array + * @deprecated 3.3 Use CFactory::_('Utilities.Files'); */ public $newFiles = array(); @@ -422,38 +430,16 @@ class Structure extends Get CFactory::_('Content')->set('EXSTRA_SITE_FILES', ''); // set incase no extra media files are loaded CFactory::_('Content')->set('EXSTRA_MEDIA_FILES', ''); - // set the template path - $this->templatePath = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/joomla_' - . CFactory::_('Config')->joomla_versions[CFactory::_('Config')->joomla_version]['folder_key']; - // set some default names - $this->componentSalesName = 'com_' - . CFactory::_('Component')->get('sales_name') . '__J' - . CFactory::_('Config')->joomla_version; - $this->componentBackupName = 'com_' - . CFactory::_('Component')->get('sales_name') . '_v' . str_replace( - '.', '_', (string) CFactory::_('Component')->get('component_version') - ) . '__J' . CFactory::_('Config')->joomla_version; - $this->componentFolderName = 'com_' - . CFactory::_('Component')->get('name_code') . '_v' . str_replace( - '.', '_', (string) CFactory::_('Component')->get('component_version') - ) . '__J' . CFactory::_('Config')->joomla_version; - // set component folder path - $this->componentPath = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/' - . $this->componentFolderName; - // set the template path for custom - $this->templatePathCustom = $this->params->get( - 'custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/custom' - ); // make sure there is no old build - $this->removeFolder($this->componentPath); + CFactory::_('Utilities.Folder')->remove(CFactory::_('Utilities.Paths')->component_path); // load the libraries files/folders and url's - $this->setLibraries(); + CFactory::_('Library.Builder')->run(); // load the powers files/folders - $this->buildPowers(); + CFactory::_('Power.Builder')->run(); // load the module files/folders and url's - $this->buildModules(); + CFactory::_('Joomlamodule.Builder')->run(); // load the plugin files/folders and url's - $this->buildPlugins(); + CFactory::_('Joomlaplugin.Builder')->run(); // set the Joomla Version Data $this->joomlaVersionData = $this->setJoomlaVersionData(); // for plugin event TODO change event api signatures @@ -491,1276 +477,55 @@ class Structure extends Get * Build the Powers files, folders * * @return void - * + * @deprecated 3.3 Use CFactory::_('Power.Builder')->run(); */ private function buildPowers() { - if (ArrayHelper::check(CFactory::_('Power')->active)) - { - // for plugin event TODO change event api signatures - $this->powers = CFactory::_('Power')->active; - $component_context = CFactory::_('Config')->component_context; - // Trigger Event: jcb_ce_onBeforeSetModules - CFactory::_('Event')->trigger( - 'jcb_ce_onBeforeBuildPowers', - array(&$component_context, &$this->powers) - ); - // for plugin event TODO change event api signatures - CFactory::_('Power')->active = $this->powers; - // we track the creation of htaccess files - $htaccess = array(); - foreach (CFactory::_('Power')->active as $power) - { - if (ObjectHelper::check($power) - && isset($power->path) - && StringHelper::check( - $power->path - )) - { - // activate dynamic folders - $this->setDynamicFolders(); - // power path - $power->full_path = $this->componentPath . '/' - . $power->path; - $power->full_path_jcb = $this->componentPath . '/' - . $power->path_jcb; - $power->full_path_parent = $this->componentPath . '/' - . $power->path_parent; - // set the power paths - $this->dynamicPaths[$power->key] = $power->full_path_parent; - // create the power folder if it does not exist - // we do it like this to add html files to each part - $this->createFolder($power->full_path_jcb); - $this->createFolder($power->full_path_parent); - $this->createFolder($power->full_path); - // set power file - $fileDetails = array('path' => $power->full_path . '/' - . $power->file_name . '.php', - 'name' => $power->file_name . '.php', - 'zip' => $power->file_name . '.php'); - $bom = 'add_licensing_template == 2) - { - $bom = 'licensing_template; - } - $this->writeFile( - $fileDetails['path'], - $bom . PHP_EOL . Placefix::_h('POWERCODE') - ); - $this->newFiles[$power->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - if (!isset($htaccess[$power->path_jcb])) - { - // set the htaccess data - $data = '# Apache 2.4+' . PHP_EOL . - '' . PHP_EOL . - ' Require all denied' . PHP_EOL . - '' . PHP_EOL . PHP_EOL . - '# Apache 2.0-2.2' . PHP_EOL . - '' . PHP_EOL . - ' Deny from all' . PHP_EOL . - '' . PHP_EOL; - // now we must add the .htaccess file - $fileDetails = array('path' => $power->full_path_jcb . '/.htaccess', - 'name' => '.htaccess', - 'zip' => '.htaccess'); - $this->writeFile( - $fileDetails['path'], $data - ); - $this->newFiles[$power->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - // now we must add the htaccess.txt file where the zip package my not get the [.] files - $fileDetails = array('path' => $power->full_path_jcb . '/htaccess.txt', - 'name' => 'htaccess.txt', - 'zip' => 'htaccess.txt'); - $this->writeFile( - $fileDetails['path'], $data - ); - $this->newFiles[$power->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - // now we must add the web.config file - $fileDetails = array('path' => $power->full_path_jcb . '/web.config', - 'name' => 'web.config', - 'zip' => 'web.config'); - $this->writeFile( - $fileDetails['path'], - '' . PHP_EOL . - ' ' . PHP_EOL . - ' ' . PHP_EOL . - ' ' . PHP_EOL . - ' ' . PHP_EOL . - ' ' . PHP_EOL . - '' . PHP_EOL - ); - $this->newFiles[$power->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - // we set these files only once - $htaccess[$power->path_jcb] = true; - } - } - } - } + CFactory::_('Power.Builder')->run(); } /** * Build the Modules files, folders, url's and config * * @return void - * + * @deprecated 3.3 Use CFactory::_('Joomlamodule.Builder')->run(); */ private function buildModules() { - if (CFactory::_('Joomlamodule.Data')->exists()) - { - // for plugin event TODO change event api signatures - $component_context = CFactory::_('Config')->component_context; - $modules = CFactory::_('Joomlamodule.Data')->get(); - // Trigger Event: jcb_ce_onBeforeSetModules - CFactory::_('Event')->trigger( - 'jcb_ce_onBeforeBuildModules', - array(&$component_context, &$modules) - ); - foreach ($modules as $module) - { - if (ObjectHelper::check($module) - && isset($module->folder_name) - && StringHelper::check( - $module->folder_name - )) - { - // module path - $module->folder_path = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/' - . $module->folder_name; - // set the module paths - $this->dynamicPaths[$module->key] = $module->folder_path; - // make sure there is no old build - $this->removeFolder($module->folder_path); - // creat the main module folder - $this->createFolder($module->folder_path); - // set main mod file - $fileDetails = array('path' => $module->folder_path . '/' - . $module->file_name . '.php', - 'name' => $module->file_name . '.php', - 'zip' => $module->file_name . '.php'); - $this->writeFile( - $fileDetails['path'], - 'newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - // set custom_get - if ($module->custom_get) - { - $fileDetails = array('path' => $module->folder_path - . '/data.php', - 'name' => 'data.php', - 'zip' => 'data.php'); - $this->writeFile( - $fileDetails['path'], - 'official_name . ' Data' - . PHP_EOL . - ' */' . PHP_EOL . - "class " . $module->class_data_name - . ' extends \JObject' . PHP_EOL . - "{" . Placefix::_h('DYNAMICGETS') . "}" - . PHP_EOL - ); - $this->newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - } - // set helper file - if ($module->add_class_helper >= 1) - { - $fileDetails = array('path' => $module->folder_path - . '/helper.php', - 'name' => 'helper.php', - 'zip' => 'helper.php'); - $this->writeFile( - $fileDetails['path'], - 'newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - } - // set main xml file - $fileDetails = array('path' => $module->folder_path . '/' - . $module->file_name . '.xml', - 'name' => $module->file_name . '.xml', - 'zip' => $module->file_name . '.xml'); - $this->writeFile( - $fileDetails['path'], - $this->getModuleXMLTemplate($module) - ); - $this->newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - // set tmpl folder - $this->createFolder($module->folder_path . '/tmpl'); - // set default file - $fileDetails = array('path' => $module->folder_path - . '/tmpl/default.php', - 'name' => 'default.php', - 'zip' => 'tmpl/default.php'); - $this->writeFile( - $fileDetails['path'], - 'newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - // set install script if needed - if ($module->add_install_script) - { - $fileDetails = array('path' => $module->folder_path - . '/script.php', - 'name' => 'script.php', - 'zip' => 'script.php'); - $this->writeFile( - $fileDetails['path'], - 'newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - } - // set readme if found - if ($module->addreadme) - { - $fileDetails = array('path' => $module->folder_path - . '/README.md', - 'name' => 'README.md', - 'zip' => 'README.md'); - $this->writeFile($fileDetails['path'], $module->readme); - $this->newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - } - // set the folders target path - $target_path = ''; - if ($module->target_client === 'administrator') - { - $target_path = '/administrator'; - } - // check if we have custom fields needed for scripts - $module->add_scripts_field = false; - $field_script_bucket = array(); - // add any css from the fields - if (($css = CFactory::_('Customcode.Dispenser')->get( - 'css_view', $module->key - )) !== null - && StringHelper::check($css)) - { - // make sure this script does not have PHP - if (strpos((string) $css, 'add_scripts_field = true; - // create the css folder - $this->createFolder($module->folder_path . '/css'); - // add the CSS file - $fileDetails = array('path' => $module->folder_path - . '/css/mod_admin.css', - 'name' => 'mod_admin.css', - 'zip' => 'mod_admin.css'); - $this->writeFile( - $fileDetails['path'], - Placefix::_h('BOM') . PHP_EOL - . PHP_EOL . $css - ); - $this->newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - // add the field script - $field_script_bucket[] = Indent::_(2) . "//" - . Line::_(__Line__, __Class__) . " Custom CSS"; - $field_script_bucket[] = Indent::_(2) - . "\$document->addStyleSheet('" . $target_path - . "/modules/" . $module->folder_name - . "/css/mod_admin.css', ['version' => 'auto', 'relative' => true]);"; - } - } - // add any JavaScript from the fields - if (($javascript = CFactory::_('Customcode.Dispenser')->get( - 'view_footer', $module->key - )) !== null - && StringHelper::check($javascript)) - { - // make sure this script does not have PHP - if (strpos((string) $javascript, 'add_scripts_field = true; - // add the JavaScript file - $this->createFolder($module->folder_path . '/js'); - // add the CSS file - $fileDetails = array('path' => $module->folder_path - . '/js/mod_admin.js', - 'name' => 'mod_admin.js', - 'zip' => 'mod_admin.js'); - $this->writeFile( - $fileDetails['path'], - Placefix::_h('BOM') . PHP_EOL - . PHP_EOL . $javascript - ); - $this->newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - // add the field script - $field_script_bucket[] = Indent::_(2) . "//" - . Line::_(__Line__, __Class__) . " Custom JS"; - $field_script_bucket[] = Indent::_(2) - . "\$document->addScript('" . $target_path - . "/modules/" . $module->folder_name - . "/js/mod_admin.js', ['version' => 'auto', 'relative' => true]);"; - } - } - // set fields folders if needed - if ($module->add_scripts_field - || (isset($module->fields_rules_paths) - && $module->fields_rules_paths == 2)) - { - // create fields folder - $this->createFolder($module->folder_path . '/fields'); - // add the custom script field - if ($module->add_scripts_field) - { - $fileDetails = array('path' => $module->folder_path - . '/fields/modadminvvvvvvvdm.php', - 'name' => 'modadminvvvvvvvdm.php', - 'zip' => 'modadminvvvvvvvdm.php'); - $this->writeFile( - $fileDetails['path'], - $this->getModAdminVvvvvvvdm( - $field_script_bucket - ) - ); - $this->newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - } - } - // set rules folders if needed - if (isset($module->fields_rules_paths) - && $module->fields_rules_paths == 2) - { - // create rules folder - $this->createFolder($module->folder_path . '/rules'); - } - // set forms folder if needed - if (isset($module->form_files) - && ArrayHelper::check( - $module->form_files - )) - { - // create forms folder - $this->createFolder($module->folder_path . '/forms'); - // set the template files - foreach ($module->form_files as $file => $fields) - { - // set file details - $fileDetails = array('path' => $module->folder_path - . '/forms/' . $file . '.xml', - 'name' => $file . '.xml', - 'zip' => 'forms/' . $file - . '.xml'); - // build basic XML - $xml = ''; - $xml .= PHP_EOL . ''; - // search if we must add the component path - $add_component_path = false; - foreach ($fields as $field_name => $fieldsets) - { - if (!$add_component_path) - { - foreach ($fieldsets as $fieldset => $field) - { - if (!$add_component_path - && isset( - $module->fieldsets_paths[$file - . $field_name . $fieldset] - ) - && $module->fieldsets_paths[$file - . $field_name . $fieldset] == 1) - { - $add_component_path = true; - } - } - } - } - // only add if part of the component field types path is required - if ($add_component_path) - { - $xml .= PHP_EOL . ''; - } - else - { - $xml .= PHP_EOL . '
'; - } - // add the fields - foreach ($fields as $field_name => $fieldsets) - { - // check if we have an double fields naming set - $field_name_inner = ''; - $field_name_outer = $field_name; - if (strpos((string) $field_name, '.') !== false) - { - $field_names = explode('.', (string) $field_name); - if (count((array) $field_names) == 2) - { - $field_name_outer = $field_names[0]; - $field_name_inner = $field_names[1]; - } - } - $xml .= PHP_EOL . Indent::_(1) - . ''; - foreach ($fieldsets as $fieldset => $field) - { - // default to the field set name - $label = $fieldset; - if (isset($module->fieldsets_label[$file . $field_name . $fieldset])) - { - $label = $module->fieldsets_label[$file . $field_name . $fieldset]; - } - // add path to module rules and custom fields - if (isset($module->fieldsets_paths[$file . $field_name . $fieldset]) - && ($module->fieldsets_paths[$file . $field_name . $fieldset] == 2 - || $module->fieldsets_paths[$file . $field_name . $fieldset] == 3)) - { - if ($module->target == 2) - { - if (!isset($module->add_rule_path[$file . $field_name . $fieldset])) - { - $module->add_rule_path[$file . $field_name . $fieldset] = - '/administrator/modules/' - . $module->file_name . '/rules'; - } - - if (!isset($module->add_field_path[$file . $field_name . $fieldset])) - { - $module->add_field_path[$file . $field_name . $fieldset] = - '/administrator/modules/' - . $module->file_name . '/fields'; - } - } - else - { - if (!isset($module->add_rule_path[$file . $field_name . $fieldset])) - { - $module->add_rule_path[$file . $field_name . $fieldset] = - '/modules/' . $module->file_name - . '/rules'; - } - - if (!isset($module->add_field_path[$file . $field_name . $fieldset])) - { - $module->add_field_path[$file . $field_name . $fieldset] = - '/modules/' . $module->file_name - . '/fields'; - } - } - } - // add path to module rules and custom fields - if (isset($module->add_rule_path[$file . $field_name . $fieldset]) - || isset($module->add_field_path[$file . $field_name . $fieldset])) - { - - $xml .= PHP_EOL . Indent::_(1) . ''; - - $xml .= PHP_EOL . Indent::_(1) . '
add_rule_path[$file . $field_name . $fieldset])) - { - $xml .= PHP_EOL . Indent::_(2) - . 'addrulepath="' . $module->add_rule_path[$file . $field_name . $fieldset] . '"'; - } - - if (isset($module->add_field_path[$file . $field_name . $fieldset])) - { - $xml .= PHP_EOL . Indent::_(2) - . 'addfieldpath="' . $module->add_field_path[$file . $field_name . $fieldset] . '"'; - } - - $xml .= PHP_EOL . Indent::_(1) . '>'; - } - else - { - $xml .= PHP_EOL . Indent::_(1) . '
'; - } - // check if we have an inner field set - if (StringHelper::check( - $field_name_inner - )) - { - $xml .= PHP_EOL . Indent::_(1) - . ''; - } - // add the placeholder of the fields - $xml .= Placefix::_h('FIELDSET_' . $file - . $field_name . $fieldset ); - // check if we have an inner field set - if (StringHelper::check( - $field_name_inner - )) - { - $xml .= PHP_EOL . Indent::_(1) - . ''; - } - $xml .= PHP_EOL . Indent::_(1) - . '
'; - } - $xml .= PHP_EOL . Indent::_(1) . ''; - } - $xml .= PHP_EOL . ''; - // add xml to file - $this->writeFile($fileDetails['path'], $xml); - $this->newFiles[$module->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - } - } - // set SQL stuff if needed - if ($module->add_sql || $module->add_sql_uninstall) - { - // create SQL folder - $this->createFolder($module->folder_path . '/sql'); - // create mysql folder - $this->createFolder( - $module->folder_path . '/sql/mysql' - ); - // now set the install file - if ($module->add_sql) - { - $this->writeFile( - $module->folder_path . '/sql/mysql/install.sql', - $module->sql - ); - // count the file created - CFactory::_('Counter')->file++; - } - // now set the uninstall file - if ($module->add_sql_uninstall) - { - $this->writeFile( - $module->folder_path - . '/sql/mysql/uninstall.sql', - $module->sql_uninstall - ); - // count the file created - CFactory::_('Counter')->file++; - } - } - // creat the language folder - $this->createFolder($module->folder_path . '/language'); - // also create the lang tag folder - $this->createFolder( - $module->folder_path . '/language/' . CFactory::_('Config')->get('lang_tag', 'en-GB') - ); - // check if this lib has files - if (isset($module->files) - && ArrayHelper::check($module->files)) - { - // add to component files - foreach ($module->files as $file) - { - // set the pathfinder - $file['target_type'] = $module->target_type; - $file['target_id'] = $module->id; - CFactory::_('Component')->appendArray('files', $file); - } - } - // check if this lib has folders - if (isset($module->folders) - && ArrayHelper::check($module->folders)) - { - // add to component folders - foreach ($module->folders as $folder) - { - // set the pathfinder - $folder['target_type'] = $module->target_type; - $folder['target_id'] = $module->id; - CFactory::_('Component')->appendArray('folders', $folder); - } - } - // check if this module has urls - if (isset($module->urls) - && ArrayHelper::check($module->urls)) - { - // add to component urls - foreach ($module->urls as $n => &$url) - { - // should we add the local folder - if (isset($url['type']) && $url['type'] > 1 - && isset($url['url']) - && StringHelper::check( - $url['url'] - )) - { - // set file name - $fileName = basename((string) $url['url']); - // get the file contents - $data = FileHelper::getContent( - $url['url'] - ); - // build sub path - if (strpos($fileName, '.js') !== false) - { - $path = '/js'; - } - elseif (strpos($fileName, '.css') !== false) - { - $path = '/css'; - } - else - { - $path = ''; - } - // create sub media path if not set - $this->createFolder( - $module->folder_path . $path - ); - // set the path to module file - $url['path'] = $module->folder_path . $path - . '/' . $fileName; // we need this for later - // write data to path - $this->writeFile($url['path'], $data); - // count the file created - CFactory::_('Counter')->file++; - } - } - } - } - } - } + CFactory::_('Joomlamodule.Builder')->run(); } /** * Build the Plugins files, folders, url's and config * * @return void - * + * @deprecated 3.3 Use CFactory::_('Joomlaplugin.Builder')->run(); */ private function buildPlugins() { - if (CFactory::_('Joomlaplugin.Data')->exists()) - { - // for plugin event TODO change event api signatures - $component_context = CFactory::_('Config')->component_context; - $plugins = CFactory::_('Joomlaplugin.Data')->get(); - // Trigger Event: jcb_ce_onBeforeSetPlugins - CFactory::_('Event')->trigger( - 'jcb_ce_onBeforeBuildPlugins', - array(&$component_context, &$plugins) - ); - foreach ($plugins as $plugin) - { - if (ObjectHelper::check($plugin) - && isset($plugin->folder_name) - && StringHelper::check( - $plugin->folder_name - )) - { - // plugin path - $plugin->folder_path = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/' - . $plugin->folder_name; - // set the plugin paths - $this->dynamicPaths[$plugin->key] = $plugin->folder_path; - // make sure there is no old build - $this->removeFolder($plugin->folder_path); - // creat the main component folder - $this->createFolder($plugin->folder_path); - // set main class file - $fileDetails = array('path' => $plugin->folder_path . '/' - . $plugin->file_name . '.php', - 'name' => $plugin->file_name . '.php', - 'zip' => $plugin->file_name . '.php'); - $this->writeFile( - $fileDetails['path'], - 'newFiles[$plugin->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - // set main xml file - $fileDetails = array('path' => $plugin->folder_path . '/' - . $plugin->file_name . '.xml', - 'name' => $plugin->file_name . '.xml', - 'zip' => $plugin->file_name . '.xml'); - $this->writeFile( - $fileDetails['path'], - $this->getPluginXMLTemplate($plugin) - ); - $this->newFiles[$plugin->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - // set install script if needed - if ($plugin->add_install_script) - { - $fileDetails = array('path' => $plugin->folder_path - . '/script.php', - 'name' => 'script.php', - 'zip' => 'script.php'); - $this->writeFile( - $fileDetails['path'], - 'newFiles[$plugin->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - } - // set readme if found - if ($plugin->addreadme) - { - $fileDetails = array('path' => $plugin->folder_path - . '/README.md', - 'name' => 'README.md', - 'zip' => 'README.md'); - $this->writeFile($fileDetails['path'], $plugin->readme); - $this->newFiles[$plugin->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - } - // set fields & rules folders if needed - if (isset($plugin->fields_rules_paths) - && $plugin->fields_rules_paths == 2) - { - // create fields folder - $this->createFolder($plugin->folder_path . '/fields'); - // create rules folder - $this->createFolder($plugin->folder_path . '/rules'); - } - // set forms folder if needed - if (isset($plugin->form_files) - && ArrayHelper::check( - $plugin->form_files - )) - { - // create forms folder - $this->createFolder($plugin->folder_path . '/forms'); - // set the template files - foreach ($plugin->form_files as $file => $fields) - { - // set file details - $fileDetails = array('path' => $plugin->folder_path - . '/forms/' . $file . '.xml', - 'name' => $file . '.xml', - 'zip' => 'forms/' . $file - . '.xml'); - // biuld basic XML - $xml = ''; - $xml .= PHP_EOL . ''; - // search if we must add the component path - $add_component_path = false; - foreach ($fields as $field_name => $fieldsets) - { - if (!$add_component_path) - { - foreach ($fieldsets as $fieldset => $field) - { - if (!$add_component_path - && isset( - $plugin->fieldsets_paths[$file - . $field_name . $fieldset] - ) - && $plugin->fieldsets_paths[$file - . $field_name . $fieldset] == 1) - { - $add_component_path = true; - } - } - } - } - // only add if part of the component field types path is required - if ($add_component_path) - { - $xml .= PHP_EOL . ''; - } - else - { - $xml .= PHP_EOL . '
'; - } - // add the fields - foreach ($fields as $field_name => $fieldsets) - { - // check if we have an double fields naming set - $field_name_inner = ''; - $field_name_outer = $field_name; - if (strpos((string) $field_name, '.') !== false) - { - $field_names = explode('.', (string) $field_name); - if (count((array) $field_names) == 2) - { - $field_name_outer = $field_names[0]; - $field_name_inner = $field_names[1]; - } - } - $xml .= PHP_EOL . Indent::_(1) - . ''; - foreach ($fieldsets as $fieldset => $field) - { - // default to the field set name - $label = $fieldset; - if (isset($plugin->fieldsets_label[$file . $field_name . $fieldset])) - { - $label = $plugin->fieldsets_label[$file . $field_name . $fieldset]; - } - // add path to plugin rules and custom fields - if (isset($plugin->fieldsets_paths[$file . $field_name . $fieldset]) - && ($plugin->fieldsets_paths[$file . $field_name . $fieldset] == 2 - || $plugin->fieldsets_paths[$file . $field_name . $fieldset] == 3)) - { - if (!isset($plugin->add_rule_path[$file . $field_name . $fieldset])) - { - $plugin->add_rule_path[$file . $field_name . $fieldset] = - '/plugins/' . strtolower((string) $plugin->group - ) . '/' . strtolower((string) $plugin->code_name) - . '/rules'; - } - - if (!isset($plugin->add_field_path[$file . $field_name . $fieldset])) - { - $plugin->add_field_path[$file . $field_name . $fieldset] = - '/plugins/' . strtolower((string) $plugin->group - ) . '/' . strtolower((string) $plugin->code_name) - . '/fields'; - } - } - // add path to plugin rules and custom fields - if (isset($plugin->add_rule_path[$file . $field_name . $fieldset]) - || isset($plugin->add_field_path[$file . $field_name . $fieldset])) - { - $xml .= PHP_EOL . Indent::_(1) . ''; - - $xml .= PHP_EOL . Indent::_(1) . '
add_rule_path[$file . $field_name . $fieldset])) - { - $xml .= PHP_EOL . Indent::_(2) - . 'addrulepath="' . $plugin->add_rule_path[$file . $field_name . $fieldset] . '"'; - } - - if (isset($plugin->add_field_path[$file . $field_name . $fieldset])) - { - $xml .= PHP_EOL . Indent::_(2) - . 'addfieldpath="' . $plugin->add_field_path[$file . $field_name . $fieldset] . '"'; - } - - $xml .= PHP_EOL . Indent::_(1) . '>'; - } - else - { - $xml .= PHP_EOL . Indent::_(1) . '
'; - } - // check if we have an inner field set - if (StringHelper::check( - $field_name_inner - )) - { - $xml .= PHP_EOL . Indent::_(1) - . ''; - } - // add the placeholder of the fields - $xml .= Placefix::_h('FIELDSET_' . $file - . $field_name . $fieldset ); - // check if we have an inner field set - if (StringHelper::check( - $field_name_inner - )) - { - $xml .= PHP_EOL . Indent::_(1) - . ''; - } - $xml .= PHP_EOL . Indent::_(1) - . '
'; - } - $xml .= PHP_EOL . Indent::_(1) . ''; - } - $xml .= PHP_EOL . ''; - // add xml to file - $this->writeFile($fileDetails['path'], $xml); - $this->newFiles[$plugin->key][] = $fileDetails; - // count the file created - CFactory::_('Counter')->file++; - } - } - // set SQL stuff if needed - if ($plugin->add_sql || $plugin->add_sql_uninstall) - { - // create SQL folder - $this->createFolder($plugin->folder_path . '/sql'); - // create mysql folder - $this->createFolder( - $plugin->folder_path . '/sql/mysql' - ); - // now set the install file - if ($plugin->add_sql) - { - $this->writeFile( - $plugin->folder_path . '/sql/mysql/install.sql', - $plugin->sql - ); - // count the file created - CFactory::_('Counter')->file++; - } - // now set the uninstall file - if ($plugin->add_sql_uninstall) - { - $this->writeFile( - $plugin->folder_path - . '/sql/mysql/uninstall.sql', - $plugin->sql_uninstall - ); - // count the file created - CFactory::_('Counter')->file++; - } - } - // creat the language folder path - $this->createFolder($plugin->folder_path . '/language'); - // also creat the lang tag folder path - $this->createFolder( - $plugin->folder_path . '/language/' . CFactory::_('Config')->get('lang_tag', 'en-GB') - ); - // check if this lib has files - if (isset($plugin->files) - && ArrayHelper::check($plugin->files)) - { - // add to component files - foreach ($plugin->files as $file) - { - // set the path finder - $file['target_type'] = $plugin->target_type; - $file['target_id'] = $plugin->id; - CFactory::_('Component')->appendArray('files', $file); - } - } - // check if this lib has folders - if (isset($plugin->folders) - && ArrayHelper::check($plugin->folders)) - { - // add to component folders - foreach ($plugin->folders as $folder) - { - // set the path finder - $folder['target_type'] = $plugin->target_type; - $folder['target_id'] = $plugin->id; - CFactory::_('Component')->appendArray('folders', $folder); - } - } - // check if this plugin has urls - if (isset($plugin->urls) - && ArrayHelper::check($plugin->urls)) - { - // add to component urls - foreach ($plugin->urls as $n => &$url) - { - // should we add the local folder - if (isset($url['type']) && $url['type'] > 1 - && isset($url['url']) - && StringHelper::check( - $url['url'] - )) - { - // set file name - $fileName = basename((string) $url['url']); - // get the file contents - $data = FileHelper::getContent( - $url['url'] - ); - // build sub path - if (strpos($fileName, '.js') !== false) - { - $path = '/js'; - } - elseif (strpos($fileName, '.css') !== false) - { - $path = '/css'; - } - else - { - $path = ''; - } - // create sub media media folder path if not set - $this->createFolder( - $plugin->folder_path . $path - ); - // set the path to plugin file - $url['path'] = $plugin->folder_path . $path - . '/' . $fileName; // we need this for later - // write data to path - $this->writeFile($url['path'], $data); - // count the file created - CFactory::_('Counter')->file++; - } - } - } - } - } - } + CFactory::_('Joomlaplugin.Builder')->run(); } /** * Create Path if not exist * * @return void + * @deprecated 3.3 Use CFactory::_('Utilities.Folder')->create($path); */ private function createFolder($path) { - // check if the path exist - if (!Folder::exists( - $path - )) - { - // create the path - Folder::create( - $path - ); - // count the folder created - CFactory::_('Counter')->folder++; - // add index.html (boring I know) - $this->indexHTML( - $path, '' - ); - } + CFactory::_('Utilities.Folder')->create($path); } /** * Build the Libraries files, folders, url's and config * * @return void - * + * @deprecated 3.3 Use CFactory::_('Library.Builder')->run(); */ private function setLibraries() { - if (($libraries_ = CFactory::_('Registry')->get('builder.libraries')) !== null) - { - // for plugin event TODO change event api signatures - $component_context = CFactory::_('Config')->component_context; - // Trigger Event: jcb_ce_onBeforeSetLibraries - CFactory::_('Event')->trigger( - 'jcb_ce_onBeforeSetLibraries', - array(&$component_context, &$libraries_) - ); - // creat the main component folder - if (!Folder::exists($this->componentPath)) - { - Folder::create($this->componentPath); - // count the folder created - CFactory::_('Counter')->folder++; - $this->indexHTML(''); - } - // create media path if not set - $this->createFolder($this->componentPath . '/media'); - foreach ($libraries_ as $id => &$library) - { - if (ObjectHelper::check($library)) - { - // check if this lib has files - if (isset($library->files) - && ArrayHelper::check($library->files)) - { - // add to component files - foreach ($library->files as $file) - { - CFactory::_('Component')->appendArray('files', $file); - } - } - // check if this lib has folders - if (isset($library->folders) - && ArrayHelper::check( - $library->folders - )) - { - // add to component folders - foreach ($library->folders as $folder) - { - CFactory::_('Component')->appendArray('folders', $folder); - } - } - // check if this lib has urls - if (isset($library->urls) - && ArrayHelper::check($library->urls)) - { - // build media folder path - $libFolder = strtolower( - preg_replace( - '/\s+/', '-', - (string) StringHelper::safe( - $library->name, 'filename', ' ', false - ) - ) - ); - $mediaPath = '/media/' . $libFolder; - // should we add the local folder - $addLocalFolder = false; - // add to component urls - foreach ($library->urls as $n => &$url) - { - if (isset($url['type']) && $url['type'] > 1 - && isset($url['url']) - && StringHelper::check( - $url['url'] - )) - { - // create media/lib path if not set - $this->createFolder( - $this->componentPath . $mediaPath - ); - // add local folder - $addLocalFolder = true; - // set file name - $fileName = basename((string) $url['url']); - // get the file contents - $data = FileHelper::getContent( - $url['url'] - ); - // build sub path - if (strpos($fileName, '.js') !== false) - { - $path = '/js'; - } - elseif (strpos($fileName, '.css') !== false) - { - $path = '/css'; - } - else - { - $path = ''; - } - // create sub media path if not set - $this->createFolder( - $this->componentPath . $mediaPath . $path - ); - // set the path to library file - $url['path'] = $mediaPath . $path . '/' - . $fileName; // we need this for later - // set full path - $path = $this->componentPath . $url['path']; - // write data to path - $this->writeFile($path, $data); - // count the file created - CFactory::_('Counter')->file++; - } - } - // only add if local - if ($addLocalFolder) - { - // add folder to xml of media folders - CFactory::_('Content')->add('EXSTRA_MEDIA_FOLDERS', - PHP_EOL . Indent::_(2) . "" - . $libFolder . ""); - } - } - // if config fields are found load into component config (avoiding duplicates) - if (isset($library->how) && $library->how > 1 - && isset($library->config) - && ArrayHelper::check($library->config)) - { - foreach ($library->config as $cofig) - { - $found = array_filter( - CFactory::_('Component')->get('config'), - fn($item) => $item['field'] == $cofig['field'] - ); - // set the config data if not found - if (!ArrayHelper::check($found)) - { - CFactory::_('Component')->appendArray('config', $cofig); - } - } - } - // update the global value just in case for now - CFactory::_('Registry')->set("builder.libraries.$id", $library); - } - } - } + CFactory::_('Library.Builder')->run(); } /** @@ -1923,30 +688,30 @@ class Structure extends Get )) { // creat the main component folder - if (!Folder::exists($this->componentPath)) + if (!Folder::exists(CFactory::_('Utilities.Paths')->component_path)) { - Folder::create($this->componentPath); + Folder::create(CFactory::_('Utilities.Paths')->component_path); // count the folder created - CFactory::_('Counter')->folder++; - $this->indexHTML(''); + CFactory::_('Utilities.Counter')->folder++; + CFactory::_('Utilities.File')->html(''); } // now build all folders needed for this component foreach ($this->joomlaVersionData->create as $main => $folders) { - $this->createFolder($this->componentPath . '/' . $main); + CFactory::_('Utilities.Folder')->create(CFactory::_('Utilities.Paths')->component_path . '/' . $main); if (ObjectHelper::check($folders)) { foreach ($folders as $sub => $subFolders) { - $this->createFolder( - $this->componentPath . '/' . $main . '/' . $sub + CFactory::_('Utilities.Folder')->create( + CFactory::_('Utilities.Paths')->component_path . '/' . $main . '/' . $sub ); if (ObjectHelper::check($subFolders)) { foreach ($subFolders as $sub_2 => $subFolders_2) { - $this->createFolder( - $this->componentPath . '/' . $main . '/' + CFactory::_('Utilities.Folder')->create( + CFactory::_('Utilities.Paths')->component_path . '/' . $main . '/' . $sub . '/' . $sub_2 ); if (ObjectHelper::check( @@ -1957,8 +722,8 @@ class Structure extends Get $subFolders_2 as $sub_3 => $subFolders_3 ) { - $this->createFolder( - $this->componentPath . '/' . $main + CFactory::_('Utilities.Folder')->create( + CFactory::_('Utilities.Paths')->component_path . '/' . $main . '/' . $sub . '/' . $sub_2 . '/' . $sub_3 ); @@ -1971,8 +736,8 @@ class Structure extends Get $subFolders_4 ) { - $this->createFolder( - $this->componentPath . '/' + CFactory::_('Utilities.Folder')->create( + CFactory::_('Utilities.Paths')->component_path . '/' . $main . '/' . $sub . '/' . $sub_2 . '/' . $sub_3 . '/' . $sub_4 @@ -1986,8 +751,8 @@ class Structure extends Get => $subFolders_5 ) { - $this->createFolder( - $this->componentPath + CFactory::_('Utilities.Folder')->create( + CFactory::_('Utilities.Paths')->component_path . '/' . $main . '/' . $sub . '/' . $sub_2 . '/' @@ -2005,8 +770,8 @@ class Structure extends Get $subFolders_6 ) { - $this->createFolder( - $this->componentPath + CFactory::_('Utilities.Folder')->create( + CFactory::_('Utilities.Paths')->component_path . '/' . $main . '/' @@ -2034,8 +799,8 @@ class Structure extends Get $subFolders_7 ) { - $this->createFolder( - $this->componentPath + CFactory::_('Utilities.Folder')->create( + CFactory::_('Utilities.Paths')->component_path . '/' . $main . '/' @@ -2155,7 +920,7 @@ class Structure extends Get ); $path = str_replace( $details->_target['type'] . '/', - $this->dynamicPaths[$details->_target['key']] . '/', + CFactory::_('Registry')->get('dynamic_paths.' . $details->_target['key'], '') . '/', (string) $details->path ); } @@ -2164,13 +929,13 @@ class Structure extends Get // set destination path $zipPath = str_replace('c0mp0n3nt/', '', (string) $details->path); $path = str_replace( - 'c0mp0n3nt/', $this->componentPath . '/', (string) $details->path + 'c0mp0n3nt/', CFactory::_('Utilities.Paths')->component_path . '/', (string) $details->path ); } // set the template folder path $templatePath = (isset($details->custom) && $details->custom) - ? (($details->custom !== 'full') ? $this->templatePathCustom - . '/' : '') : $this->templatePath . '/'; + ? (($details->custom !== 'full') ? CFactory::_('Utilities.Paths')->template_path_custom + . '/' : '') : CFactory::_('Utilities.Paths')->template_path . '/'; // set the final paths $currentFullPath = (preg_match('/^[a-z]:/i', (string) $item)) ? $item : $templatePath . '/' . $item; @@ -2208,23 +973,29 @@ class Structure extends Get // move the file to its place File::copy($currentFullPath, $packageFullPath); // count the file created - CFactory::_('Counter')->file++; + CFactory::_('Utilities.Counter')->file++; // store the new files if (!in_array($ftem, $this->notNew)) { if (isset($details->_target)) { - $this->newFiles[$details->_target['key']][] - = array('path' => $packageFullPath, - 'name' => $new, - 'zip' => $zipFullPath); + CFactory::_('Utilities.Files')->appendArray($details->_target['key'], + [ + 'path' => $packageFullPath, + 'name' => $new, + 'zip' => $zipFullPath + ] + ); } else { - $this->newFiles['static'][] - = array('path' => $packageFullPath, - 'name' => $new, - 'zip' => $zipFullPath); + CFactory::_('Utilities.Files')->appendArray('static', + [ + 'path' => $packageFullPath, + 'name' => $new, + 'zip' => $zipFullPath + ] + ); } } // ensure we update this file if needed @@ -2261,7 +1032,7 @@ class Structure extends Get $currentFullPath, $packageFullPath, '', true ); // count the folder created - CFactory::_('Counter')->folder++; + CFactory::_('Utilities.Counter')->folder++; } } // only add if no target found since those belong to plugins and modules @@ -2503,13 +1274,13 @@ class Structure extends Get { // check files exist if (File::exists( - $this->componentPath . '/admin/models/fields/' + CFactory::_('Utilities.Paths')->component_path . '/admin/models/fields/' . $field['type_name'] . '.php' )) { // copy the custom field File::copy( - $this->componentPath . '/admin/models/fields/' + CFactory::_('Utilities.Paths')->component_path . '/admin/models/fields/' . $field['type_name'] . '.php', $path . '/fields/' . $field['type_name'] . '.php' ); @@ -2530,14 +1301,14 @@ class Structure extends Get { // check files exist if (File::exists( - $this->componentPath . '/admin/models/rules/' + CFactory::_('Utilities.Paths')->component_path . '/admin/models/rules/' . CFactory::_('Registry')->get('validation.linked.' . $field['field']) . '.php' )) { // copy the custom field File::copy( - $this->componentPath . '/admin/models/rules/' + CFactory::_('Utilities.Paths')->component_path . '/admin/models/rules/' . CFactory::_('Registry')->get('validation.linked.' . $field['field']) . '.php', $path . '/rules/' . CFactory::_('Registry')->get('validation.linked.' . $field['field']) @@ -2780,7 +1551,7 @@ class Structure extends Get { $zipPath = str_replace('c0mp0n3nt/', '', (string) $path); $path = str_replace( - 'c0mp0n3nt/', $this->componentPath . '/', (string) $path + 'c0mp0n3nt/', CFactory::_('Utilities.Paths')->component_path . '/', (string) $path ); } else @@ -2798,9 +1569,9 @@ class Structure extends Get if (!Folder::exists($path)) { Folder::create($path); - $this->indexHTML($zipPath); + CFactory::_('Utilities.File')->html($zipPath); // count the folder created - CFactory::_('Counter')->folder++; + CFactory::_('Utilities.Counter')->folder++; } // do the file renaming if ($details->rename) @@ -2831,11 +1602,16 @@ class Structure extends Get { // move the file to its place File::copy( - $this->templatePath . '/' . $item, + CFactory::_('Utilities.Paths')->template_path . '/' . $item, $path . '/' . $new ); // count the file created - CFactory::_('Counter')->file++; + CFactory::_('Utilities.Counter')->file++; + } + // we can't have dots in a file name (oops) + if (strpos($name, '.') !== false) + { + $name = preg_replace('/[\.]+/', '_', (string) $name); } // setup array for new file $newFIle = array('path' => $path . '/' . $new, @@ -2846,7 +1622,7 @@ class Structure extends Get $newFIle['config'] = $config; } // store the new files - $this->newFiles['dynamic'][$name][] = $newFIle; + CFactory::_('Utilities.Files')->appendArray('dynamic.' . $name, $newFIle); // we have build atleast one $build_status = true; } @@ -2866,7 +1642,7 @@ class Structure extends Get private function setJoomlaVersionData() { // option to load other settings - $custom_settings = $this->templatePath . '/settings_' . CFactory::_('Config')->component_code_name . '.json'; + $custom_settings = CFactory::_('Utilities.Paths')->template_path . '/settings_' . CFactory::_('Config')->component_code_name . '.json'; // set the version data if (File::exists($custom_settings)) { @@ -2880,7 +1656,7 @@ class Structure extends Get { $version_data = json_decode( (string) FileHelper::getContent( - $this->templatePath . '/settings.json' + CFactory::_('Utilities.Paths')->template_path . '/settings.json' ) ); } @@ -3178,10 +1954,10 @@ class Structure extends Get protected function setDynamicFolders() { // check if we should add the dynamic folder moving script to the installer script - if (!$this->setMoveFolders) + if (!CFactory::_('Registry')->get('set_move_folders_install_script')) { // add the setDynamicF0ld3rs() method to the install scipt.php file - $this->setMoveFolders = true; + CFactory::_('Registry')->set('set_move_folders_install_script', true); // set message that this was done (will still add a tutorial link later) $this->app->enqueueMessage( JText::_( @@ -3202,32 +1978,12 @@ class Structure extends Get * @param string $path The path to place the index.html file in * * @return void + * @deprecated 3.3 Use CFactory::_('Utilities.File')->write($path, $root); * */ private function indexHTML($path, $root = 'component') { - if ('component' === $root) - { - $root = $this->componentPath . '/'; - } - // use path if exist - if (strlen($path) > 0) - { - File::copy( - $this->templatePath . '/index.html', - $root . $path . '/index.html' - ); - // count the file created - CFactory::_('Counter')->file++; - } - else - { - File::copy( - $this->templatePath . '/index.html', $root . '/index.html' - ); - // count the file created - CFactory::_('Counter')->file++; - } + CFactory::_('Utilities.File')->write($path, $root); } /** @@ -3254,11 +2010,11 @@ class Structure extends Get * @param boolean $ignore The files and folders to ignore * * @return boolean True if all is removed - * + * @deprecated 3.3 Use CFactory::_('Utilities.Folder')->remove($dir, $ignore); */ protected function removeFolder($dir, $ignore = false) { - return ComponentbuilderHelper::removeFolder($dir, $ignore); + return CFactory::_('Utilities.Folder')->remove($dir, $ignore); } } diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 7f8f30bb8..5de6f89a0 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -658,7 +658,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(3) . 'readonly="true"'; $fieldSet[] = Indent::_(2) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if created is not set if (!isset($this->fieldsNames[$nameSingleCode]['created'])) @@ -681,7 +681,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(3) . "filter=" . '"user_utc"'; $fieldSet[] = Indent::_(2) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if created_by is not set if (!isset($this->fieldsNames[$nameSingleCode]['created_by'])) @@ -701,7 +701,7 @@ class Fields extends Structure . '_CREATED_BY_DESC"'; $fieldSet[] = Indent::_(2) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if published is not set if (!isset($this->fieldsNames[$nameSingleCode]['published'])) @@ -728,7 +728,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(4) . "JTRASHED"; $fieldSet[] = Indent::_(2) . ""; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if modified is not set if (!isset($this->fieldsNames[$nameSingleCode]['modified'])) @@ -743,7 +743,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(3) . 'size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />'; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if modified_by is not set if (!isset($this->fieldsNames[$nameSingleCode]['modified_by'])) @@ -761,7 +761,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(3) . 'filter="unset"'; $fieldSet[] = Indent::_(2) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // check if view has access if (isset($this->accessBuilder[$nameSingleCode]) @@ -784,7 +784,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(3) . 'required="false"'; $fieldSet[] = Indent::_(2) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if ordering is not set if (!isset($this->fieldsNames[$nameSingleCode]['ordering'])) @@ -807,7 +807,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(3) . 'required="false"'; $fieldSet[] = Indent::_(2) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if version is not set if (!isset($this->fieldsNames[$nameSingleCode]['version'])) @@ -827,7 +827,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(3) . 'filter="unset"'; $fieldSet[] = Indent::_(2) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // check if metadata is added to this view if (isset($this->metadataBuilder[$nameSingleCode]) @@ -851,7 +851,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(3) . 'cols="30"'; $fieldSet[] = Indent::_(2) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // metadesc if (!isset($this->fieldsNames[$nameSingleCode]['metadesc'])) @@ -869,7 +869,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(3) . 'cols="30"'; $fieldSet[] = Indent::_(2) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } } // fix the permissions field "title" issue gh-629 @@ -896,7 +896,7 @@ class Fields extends Structure . $nameSingleCode . '"'; $fieldSet[] = Indent::_(2) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; // setup needed field values for layout $field_array = array(); $field_array['order_edit'] = 0; @@ -957,7 +957,7 @@ class Fields extends Structure . ''; $fieldSet[] = Indent::_(3) . ''; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // author if (!isset($this->fieldsNames[$nameSingleCode]['author'])) @@ -972,7 +972,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(4) . 'size="20"'; $fieldSet[] = Indent::_(3) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // rights if (!isset($this->fieldsNames[$nameSingleCode]['rights'])) @@ -987,7 +987,7 @@ class Fields extends Structure $fieldSet[] = Indent::_(4) . 'cols="30" rows="2"'; $fieldSet[] = Indent::_(3) . "/>"; // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } $fieldSet[] = Indent::_(2) . "
"; $fieldSet[] = Indent::_(1) . "
"; @@ -1084,7 +1084,7 @@ class Fields extends Structure $fieldXML = $fieldSetXML->addChild('field'); ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if created is not set if (!isset($this->fieldsNames[$nameSingleCode]['created'])) @@ -1106,7 +1106,7 @@ class Fields extends Structure $fieldXML = $fieldSetXML->addChild('field'); ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if created_by is not set if (!isset($this->fieldsNames[$nameSingleCode]['created_by'])) @@ -1125,7 +1125,7 @@ class Fields extends Structure $fieldXML = $fieldSetXML->addChild('field'); ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if published is not set if (!isset($this->fieldsNames[$nameSingleCode]['published'])) @@ -1143,7 +1143,7 @@ class Fields extends Structure $fieldXML = $fieldSetXML->addChild('field'); ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; foreach ( array('JPUBLISHED' => 1, 'JUNPUBLISHED' => 0, 'JARCHIVED' => 2, 'JTRASHED' => -2) as $text => $value @@ -1175,7 +1175,7 @@ class Fields extends Structure $fieldXML = $fieldSetXML->addChild('field'); ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if modified_by is not set if (!isset($this->fieldsNames[$nameSingleCode]['modified_by'])) @@ -1196,7 +1196,7 @@ class Fields extends Structure $fieldXML = $fieldSetXML->addChild('field'); ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // check if view has access if (isset($this->accessBuilder[$nameSingleCode]) @@ -1221,7 +1221,7 @@ class Fields extends Structure $fieldXML = $fieldSetXML->addChild('field'); ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if ordering is not set if (!isset($this->fieldsNames[$nameSingleCode]['ordering'])) @@ -1244,7 +1244,7 @@ class Fields extends Structure $fieldXML = $fieldSetXML->addChild('field'); ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // if version is not set if (!isset($this->fieldsNames[$nameSingleCode]['version'])) @@ -1266,7 +1266,7 @@ class Fields extends Structure $fieldXML = $fieldSetXML->addChild('field'); ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // check if metadata is added to this view if (isset($this->metadataBuilder[$nameSingleCode]) @@ -1294,7 +1294,7 @@ class Fields extends Structure $fieldXML, $attributes ); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // metadesc if (!isset($this->fieldsNames[$nameSingleCode]['metadesc'])) @@ -1311,7 +1311,7 @@ class Fields extends Structure $fieldXML, $attributes ); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } } // fix the permissions field "title" issue gh-629 @@ -1346,7 +1346,7 @@ class Fields extends Structure $fieldXML = $fieldSetXML->addChild('field'); ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; // setup needed field values for layout $field_array = array(); $field_array['order_edit'] = 0; @@ -1409,7 +1409,7 @@ class Fields extends Structure $robots, $attributes ); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; $options = array( 'JGLOBAL_USE_GLOBAL' => '', 'JGLOBAL_INDEX_FOLLOW' => 'index, follow', @@ -1443,7 +1443,7 @@ class Fields extends Structure $author, $attributes ); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } // rights if (!isset($this->fieldsNames[$nameSingleCode]['rights'])) @@ -1467,7 +1467,7 @@ class Fields extends Structure $rights, $attributes ); // count the static field created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; } } } @@ -1891,7 +1891,7 @@ class Fields extends Structure &$optionArray, $custom = null, $taber = '' ) { // count the dynamic fields created - CFactory::_('Counter')->field++; + CFactory::_('Utilities.Counter')->field++; // check what type of field builder to use if (CFactory::_('Config')->get('field_builder_type', 2) == 1) { diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 2eca6b18a..c4434e0c1 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1234,9 +1234,10 @@ class Interpretation extends Fields } // stop it from being added double $addDynamicSQL = false; - CFactory::_('Component')->appendArray('version_update', $update_); // add dynamic SQL $this->setUpdateXMLSQL($update_, $updateXML, $addDynamicSQL); + + CFactory::_('Component')->appendArray('version_update', $update_); } /** @@ -1249,7 +1250,7 @@ class Interpretation extends Fields public function setUpdateXMLSQL(&$update, &$updateXML, &$addDynamicSQL) { // ensure version naming is correct - $update['version'] = preg_replace('/[^0-9.]+/', '', (string) $update['version']); + $update['version'] = preg_replace('/[^0-9\.]+/', '', (string) $update['version']); // setup SQL if (StringHelper::check($update['mysql'])) { @@ -1284,7 +1285,8 @@ class Interpretation extends Fields $name = StringHelper::safe($update['version']); $target = array('admin' => $name); $this->buildDynamique($target, 'sql_update', $update['version']); - CFactory::_('Content')->set_($name . '_' . $update['version'], 'UPDATE_VERSION_MYSQL', + $_name = preg_replace('/[\.]+/', '_', (string) $update['version']); + CFactory::_('Content')->set_($name . '_' . $_name, 'UPDATE_VERSION_MYSQL', $update['mysql'] ); } @@ -6294,7 +6296,7 @@ class Interpretation extends Fields if (isset($folder['rename']) && 1 == $folder['rename']) { if ($_paths = FileHelper::getPaths( - $this->componentPath . $path + CFactory::_('Utilities.Paths')->component_path . $path )) { $files[$path] = $_paths; @@ -6304,7 +6306,7 @@ class Interpretation extends Fields { $path = $path . '/' . trim((string)$folder['folder'], '/'); if ($_paths = FileHelper::getPaths( - $this->componentPath . $path + CFactory::_('Utilities.Paths')->component_path . $path )) { $files[$path] = $_paths; @@ -7087,7 +7089,7 @@ class Interpretation extends Fields public function getReplacementNames() { - foreach ($this->newFiles as $type => $files) + foreach (CFactory::_('Utilities.Files')->toArray() as $type => $files) { foreach ($files as $view => $file) { @@ -8512,7 +8514,7 @@ class Interpretation extends Fields public function setMoveFolderScript() { - if ($this->setMoveFolders) + if (CFactory::_('Registry')->get('set_move_folders_install_script')) { // reset script $script = array(); @@ -8530,7 +8532,7 @@ class Interpretation extends Fields public function setMoveFolderMethod() { - if ($this->setMoveFolders) + if (CFactory::_('Registry')->get('set_move_folders_install_script')) { // reset script $script = array(); @@ -22535,7 +22537,7 @@ class Interpretation extends Fields $type = ComponentbuilderHelper::imageInfo($path); if ($type) { - $imagePath = $this->componentPath . '/admin/assets/images'; + $imagePath = CFactory::_('Utilities.Paths')->component_path . '/admin/assets/images'; // move the image to its place File::copy( JPATH_SITE . '/' . $path, @@ -22757,7 +22759,7 @@ class Interpretation extends Fields $this->iconBuilder )) { - $imagePath = $this->componentPath + $imagePath = CFactory::_('Utilities.Paths')->component_path . '/admin/assets/images/icons'; foreach ($this->iconBuilder as $icon => $path) { @@ -27924,20 +27926,20 @@ function vdm_dkim() { { Folder::create($path); // count the folder created - CFactory::_('Counter')->folder++; + CFactory::_('Utilities.Counter')->folder++; } // add to language files (for now we add all to both TODO) - $this->writeFile( + CFactory::_('Utilities.File')->write( $path . $file_name, implode(PHP_EOL, $lang) ); - $this->writeFile( + CFactory::_('Utilities.File')->write( $path . $tag . '.' . $module->file_name . '.sys.ini', implode(PHP_EOL, $lang) ); // set the line counter - CFactory::_('Counter')->line += count( + CFactory::_('Utilities.Counter')->line += count( (array) $lang ); unset($lang); @@ -28316,14 +28318,14 @@ function vdm_dkim() { { Folder::create($path); // count the folder created - CFactory::_('Counter')->folder++; + CFactory::_('Utilities.Counter')->folder++; } // add to language file - $this->writeFile( + CFactory::_('Utilities.File')->write( $path . $file_name, implode(PHP_EOL, $lang) ); - $this->writeFile( + CFactory::_('Utilities.File')->write( $path . $tag . '.plg_' . strtolower( (string) $plugin->group ) @@ -28332,7 +28334,7 @@ function vdm_dkim() { implode(PHP_EOL, $lang) ); // set the line counter - CFactory::_('Counter')->line += count( + CFactory::_('Utilities.Counter')->line += count( (array) $lang ); unset($lang); diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index d26137175..18de73afc 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -172,7 +172,7 @@ class Infusion extends Interpretation CFactory::_('Content')->set('GLOBALVERSION', CFactory::_('Content')->get('VERSION')); // set the joomla target xml version - CFactory::_('Content')->set('XMLVERSION', $this->joomlaVersions[CFactory::_('Config')->joomla_version]['xml_version']); + CFactory::_('Content')->set('XMLVERSION', CFactory::_('Config')->joomla_versions[CFactory::_('Config')->joomla_version]['xml_version']); // Component_name $name = CFactory::_('Component')->get('name'); @@ -2095,7 +2095,7 @@ class Infusion extends Interpretation // remove old unused language strings $this->purgeLanuageStrings($values, CFactory::_('Config')->component_id); // path to INI file - $getPAth = $this->templatePath . '/en-GB.com_admin.ini'; + $getPAth = CFactory::_('Utilities.Paths')->template_path . '/en-GB.com_admin.ini'; // for plugin event TODO change event api signatures $component_context = CFactory::_('Config')->component_context; // Trigger Event: jcb_ce_onBeforeBuildAllLangFiles @@ -2143,18 +2143,18 @@ class Infusion extends Interpretation )) { // build the path to place the lang file - $path = $this->componentPath . '/' . $p . '/language/' + $path = CFactory::_('Utilities.Paths')->component_path . '/' . $p . '/language/' . $tag . '/'; if (!Folder::exists($path)) { Folder::create($path); // count the folder created - CFactory::_('Counter')->folder++; + CFactory::_('Utilities.Counter')->folder++; } // move the file to its place File::copy($getPAth, $path . $file_name); // count the file created - CFactory::_('Counter')->file++; + CFactory::_('Utilities.Counter')->file++; // add content to it $lang = array_map( fn($langstring, $placeholder) => $placeholder . '="' . $langstring . '"', @@ -2162,11 +2162,11 @@ class Infusion extends Interpretation array_keys($languageStrings) ); // add to language file - $this->writeFile( + CFactory::_('Utilities.File')->write( $path . $file_name, implode(PHP_EOL, $lang) ); // set the line counter - CFactory::_('Counter')->line += count( + CFactory::_('Utilities.Counter')->line += count( (array) $lang ); unset($lang); @@ -2199,7 +2199,7 @@ class Infusion extends Interpretation = implode(PHP_EOL . Indent::_(2), $langXML['site']); } // build xml path - $xmlPath = $this->componentPath . '/' . CFactory::_('Config')->component_code_name + $xmlPath = CFactory::_('Utilities.Paths')->component_path . '/' . CFactory::_('Config')->component_code_name . '.xml'; // get the content in xml $componentXML = FileHelper::getContent( @@ -2208,7 +2208,7 @@ class Infusion extends Interpretation // update the xml content $componentXML = CFactory::_('Placeholder')->update($componentXML, $replace); // store the values back to xml - $this->writeFile($xmlPath, $componentXML); + CFactory::_('Utilities.File')->write($xmlPath, $componentXML); } } } diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 46a7109b5..d5a814154 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -1318,6 +1318,7 @@ COM_COMPONENTBUILDER_AUTHOR_NAME="Author Name" COM_COMPONENTBUILDER_AUTHOR_WEBSITE="Author Website" COM_COMPONENTBUILDER_AUTO_CHECKIN="Auto Check-in" COM_COMPONENTBUILDER_AVAILABLE_LIBRARIES="Available Libraries" +COM_COMPONENTBUILDER_A_METHOD_SETDYNAMICFZEROLDTHREERS_WAS_ADDED_TO_THE_INSTALL_BSCRIPTPHPB_OF_THIS_PACKAGE_TO_INSURE_THAT_THE_FOLDERS_ARE_COPIED_INTO_THE_CORRECT_PLACE_WHEN_THIS_COMPONENT_IS_INSTALLED="A method (setDynamicF0ld3rs) was added to the install script.php of this package to insure that the folder(s) are copied into the correct place when this component is installed!" COM_COMPONENTBUILDER_A_S_SPAN_CLASSICONFLAG_SPANREPORT_BROKEN_PACKAGEA=" Report Broken Package" COM_COMPONENTBUILDER_BACK="Back" COM_COMPONENTBUILDER_BACKUP="Backup" @@ -1651,6 +1652,7 @@ COM_COMPONENTBUILDER_CLASS_PROPERTY_VERSION_DESC="A count of the number of times COM_COMPONENTBUILDER_CLASS_PROPERTY_VERSION_LABEL="Version" COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_DESCRIPTION="The visibility of a function/method or property can be defined by prefixing the declaration with the keywords public, protected or private. You also have the option to make function/method or property static." COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL="Visibility" +COM_COMPONENTBUILDER_CLEAR="Clear" COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp" COM_COMPONENTBUILDER_CLONE="Clone" COM_COMPONENTBUILDER_CLONE_FAILED="Clone failed!" @@ -5602,6 +5604,7 @@ COM_COMPONENTBUILDER_HIDE_ONLY="Hide Only" COM_COMPONENTBUILDER_HIDE_TOGGLE="Hide Toggle" COM_COMPONENTBUILDER_HOW_TO_GET_A_S_FREE_KEYSA_FROM_VDM="How to get free keys from VDM." COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODES_WARNINGHTHREE="

Custom Codes Warning

" +COM_COMPONENTBUILDER_HR_HTHREEDYNAMIC_FOLDERS_WERE_DETECTEDHTHREE="

Dynamic folder(s) were detected.

" COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_ERRORHTHREE="

External Code Error

" COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_NOTICEHTHREE="

External Code Notice

" COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_WARNINGHTHREE="

External Code Warning

" diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index ffb554af7..496c32aae 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1973,30 +1973,30 @@ INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `licens INSERT INTO `#__componentbuilder_power` (`id`, `add_head`, `description`, `extends`, `extends_custom`, `guid`, `head`, `implements`, `implements_custom`, `load_selection`, `main_class_code`, `method_selection`, `name`, `namespace`, `power_version`, `property_selection`, `system_name`, `type`, `use_selection`, `params`, `published`, `created`, `modified`, `version`, `ordering`) VALUES (1, '', 'Basic shared utilities, a legacy implementation\r\n\r\n@since 3.0.9', '', '', '79d765b3-7319-4988-9730-446c7f347020', '', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBNYWluIEFjdGl2ZSBMYW5ndWFnZQ0KCSAqIA0KCSAqIEB2YXIgICAgICBzdHJpbmcNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyAkbGFuZ1RhZzsNCg0KCS8qKg0KCSAqIENoZWNrIGlmIGhhdmUgYSBzdHJpbmcgd2l0aCBhIGxlbmd0aA0KCSAqDQoJICogQGlucHV0ICAgIHN0cmluZyAgJHN0cmluZyBUaGUgc3RyaW5nIHRvIGNoZWNrDQoJICoNCgkgKiBAcmV0dXJucyBib29sIHRydWUgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKg0KCSAqIEBkZXByZWNhdGVkICA0LjAgLSBVc2UgU3RyaW5nSGVscGVyOjpjaGVjaygkc3RyaW5nK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jokb3B0aW9uKSAmJiBwcm9wZXJ0eV9leGlzdHMoX19DTEFTU19fLCAnQ29tcG9uZW50Q29kZU5hbWUnKSkNCgkJCXsNCgkJCQlIZWxwZXI6OiRvcHRpb24gPSAnY29tXycgLiBzZWxmOjokQ29tcG9uZW50Q29kZU5hbWU7DQoJCQl9DQoJCX0NCgkJZWxzZQ0KCQl7DQoJCQlIZWxwZXI6OiRvcHRpb24gPSAkb3B0aW9uOw0KCQl9DQoJfQ0K', '{}', 'Utilities', 'VDM\\Joomla\\Utilities', '1.0.0', '{}', 'Utilities', 'trait', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"4b225c51-d293-48e4-b3f6-5136cf5c3f18\",\"as\":\"default\"},\"use_selection2\":{\"use\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\",\"as\":\"default\"},\"use_selection3\":{\"use\":\"91004529-94a9-4590-b842-e7c6b624ecf5\",\"as\":\"default\"},\"use_selection4\":{\"use\":\"152c8793-8b75-4715-996a-257b9f65451c\",\"as\":\"default\"},\"use_selection5\":{\"use\":\"db87c339-5bb6-4291-a7ef-2c48ea1b06bc\",\"as\":\"default\"},\"use_selection6\":{\"use\":\"9c513baf-b279-43fd-ae29-a585c8cbc4f0\",\"as\":\"default\"},\"use_selection7\":{\"use\":\"a223b31e-ea1d-4cdf-92ae-5f9becffaff0\",\"as\":\"default\"},\"use_selection8\":{\"use\":\"9ef0eb24-aae4-4f5a-99af-d724db44808f\",\"as\":\"default\"},\"use_selection9\":{\"use\":\"a8935cbe-7701-40dc-bfd5-675f2d600954\",\"as\":\"default\"},\"use_selection10\":{\"use\":\"30c5b4c2-f75f-4d15-869a-f8bfedd87358\",\"as\":\"default\"},\"use_selection11\":{\"use\":\"ce8cf834-6bac-44fb-941c-861f7e046cc0\",\"as\":\"default\"},\"use_selection12\":{\"use\":\"3cf76fbf-fd95-4a33-878e-7aff6d36b7f6\",\"as\":\"default\"},\"use_selection13\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2021-11-06 13:25:19', '2022-09-20 11:53:22', 77, 1), (5, 1, '', '', '', 'db4a1e4d-be59-4e87-8b4d-c40512752232', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwIGFzIEJhc2VIdHRwOw0KdXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwRmFjdG9yeTsNCnVzZSBKb29tbGFcUmVnaXN0cnlcUmVnaXN0cnk7', '', '', '{\"load_selection0\":{\"load\":\"aa253bac-f4b4-41b4-8ace-071a73fc4d96\"},\"load_selection1\":{\"load\":\"c65aaf1f-817c-49a2-8202-282e3904f5b1\"},\"load_selection2\":{\"load\":\"51195163-1e87-4251-b755-a03c376798a6\"},\"load_selection3\":{\"load\":\"ef011ee1-64f0-4048-b013-777473b727dd\"},\"load_selection4\":{\"load\":\"c4a188de-ad78-4a6d-9d5b-01866846d701\"}}', 'CS8qKg0KCSAqIE9wdGlvbnMgZm9yIHRoZSBHaXRlYSBvYmplY3QuDQoJICoNCgkgKiBAdmFyICAgIGFycmF5DQoJICogQHNpbmNlICAxLjANCgkgKi8NCglwcm90ZWN0ZWQgJG9wdGlvbnM7DQoNCgkvKioNCgkgKiBUaGUgSFRUUCBjbGllbnQgb2JqZWN0IHRvIHVzZSBpbiBzZW5kaW5nIEhUVFAgcmVxdWVzdHMuDQoJICoNCgkgKiBAdmFyICAgIEJhc2VIdHRwDQoJICogQHNpbmNlICAxLjANCgkgKi8NCglwcm90ZWN0ZWQgJGNsaWVudDsNCg0KCS8qKg0KCSAqIENvbnN0cnVjdG9yLg0KCSAqDQoJICogQHBhcmFtICAgUmVnaXN0cnkgICRvcHRpb25zICBHaXRlYSBvcHRpb25zIG9iamVjdC4NCgkgKiBAcGFyYW0gICBIdHRwICAgICAgJGNsaWVudCAgIFRoZSBIVFRQIGNsaWVudCBvYmplY3QuDQoJICoNCgkgKiB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Q0KDQoJCXJldHVybiAkYm9keTsNCgl9DQo=', '{}', 'AbstractGiteaObject', 'VDM\\Gitea\\AbstractGiteaObject', '1.0.0', '{}', 'Abstract Gitea Object', 'abstract class', '{\"use_selection0\":{\"use\":\"4b225c51-d293-48e4-b3f6-5136cf5c3f18\",\"as\":\"default\"}}', '', 1, '2021-12-03 16:00:26', '2023-02-02 15:45:30', 22, 4), +(6, 1, '', '', '', 'aa253bac-f4b4-41b4-8ace-071a73fc4d96', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwIGFzIEJhc2VIdHRwOw0KdXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXEh0dHBcUmVzcG9uc2U7DQp1c2UgSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5Ow0KdXNlIEpvb21sYVxVcmlcVXJpOw==', '', '', '{}', 'CS8qKg0KCSAqIE9wdGlvbnMgZm9yIHRoZSBHaXRlYSBvYmplY3QuDQoJICoNCgkgKiBAdmFyICAgIFJlZ2lzdHJ5DQoJICogQHNpbmNlICAxLjANCgkgKi8NCglwcm90ZWN0ZWQgJG9wdGlvbnM7DQoNCgkvKioNCgkgKiBUaGUgSFRUUCBjbGllbnQgb2JqZWN0IHRvIHVzZSBpbiBzZW5kaW5nIEhUVFAgcmVxdWVzdHMuDQoJICoNCgkgKiBAdmFyICAgIEJhc2VIdHRwDQoJICogQHNpbmNlICAxLjANCgkgKi8NCglwcm90ZWN0ZWQgJGNsaWVudDsNCg0KCS8qKg0KCSAqIFRoZSBwYWNrYWdlIHRoZSBvYmplY3QgcmVzaWRlcyBpbg0KCSAqDQoJICogQHZhciAgICBzdHJpbmcNCgkgKiBAc2luY2UgIDEuMA0KCSAqLw0KCXByb3RlY3RlZCAkcGFja2FnZSA9ICcnOw0KDQoJLyoqDQoJICogQ29uc3RydWN0b3IuDQoJICoNCgkgKiBAcGFyYW0gICBSZWdpc3RyeSAgJG9wdGlvb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c2UtPmNvZGUgIT0gJGV4cGVjdGVkQ29kZSkNCgkJew0KCQkJLy8gRGVjb2RlIHRoZSBlcnJvciByZXNwb25zZSBhbmQgdGhyb3cgYW4gZXhjZXB0aW9uLg0KCQkJJGVycm9yICAgPSBqc29uX2RlY29kZSgoc3RyaW5nKSAkcmVzcG9uc2UtPmJvZHkpOw0KCQkJJG1lc3NhZ2UgPSBpc3NldCgkZXJyb3ItPm1lc3NhZ2UpID8gJGVycm9yLT5tZXNzYWdlIDogJ0ludmFsaWQgcmVzcG9uc2UgcmVjZWl2ZWQgZnJvbSBHaXRlYS4nOw0KDQoJCQl0aHJvdyBuZXcgXERvbWFpbkV4Y2VwdGlvbigkbWVzc2FnZSwgJHJlc3BvbnNlLT5jb2RlKTsNCgkJfQ0KDQoJCWlmIChKc29uSGVscGVyOjpjaGVjaygkcmVzcG9uc2UtPmJvZHkpKQ0KCQl7DQoJCQkkYm9keSA9IGpzb25fZGVjb2RlKChzdHJpbmcpICRyZXNwb25zZS0+Ym9keSk7DQoNCgkJCWlmIChpc3NldCgkYm9keS0+Y29udGVudF9iYXNlNjQpKQ0KCQkJew0KCQkJCSRib2R5LT5jb250ZW50ID0gYmFzZTY0X2RlY29kZSgoc3RyaW5nKSAkYm9keS0+Y29udGVudF9iYXNlNjQpOw0KCQkJfQ0KCQl9DQoJCWVsc2UNCgkJew0KCQkJJGJvZHkgPSAkcmVzcG9uc2UtPmJvZHk7DQoJCX0NCg0KCQlyZXR1cm4gJGJvZHk7DQoJfQ0K', '{}', 'AbstractGiteaObject', 'VDM\\Gitea\\AbstractGiteaObject', '1.0.0', '{}', 'Abstract Gitea Object', 'abstract class', '{\"use_selection0\":{\"use\":\"4b225c51-d293-48e4-b3f6-5136cf5c3f18\",\"as\":\"default\"}}', '', 1, '2021-12-03 16:00:26', '2023-02-02 15:45:30', 22, 4), (7, 1, '', 'aa253bac-f4b4-41b4-8ace-071a73fc4d96', '', 'c65aaf1f-817c-49a2-8202-282e3904f5b1', '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xcUGFja2FnZVxcJyAuICR0aGlzLT5wYWNrYWdlIC4gJ1xcJyAuIHVjZmlyc3QoJG5hbWUpOw0KDQoJCWlmIChjbGFzc19leGlzdHMoJGNsYXNzKSA9PSBmYWxzZSkNCgkJew0KCQkJdGhyb3cgbmV3IFxJbnZhbGlkQXJndW1lbnRFeGNlcHRpb24oDQoJCQkJc3ByaW50ZigNCgkJCQkJJ0FyZ3VtZW50ICUxJHMgcHJvZHVjZWQgYW4gaW52YWxpZCBjbGFzcyBuYW1lOiAlMiRzIGluIHBhY2thZ2UgJTMkcycsDQoJCQkJCSRuYW1lLCAkY2xhc3MsICR0aGlzLT5wYWNrYWdlDQoJCQkJKQ0KCQkJKTsNCgkJfQ0KDQoJCWlmIChpc3NldCgkdGhpcy0+JG5hbWUpID09IGZhbHNlKQ0KCQl7DQoJCQkkdGhpcy0+JG5hbWUgPSBuZXcgJGNsYXNzKCR0aGlzLT5vcHRpb25zLCAkdGhpcy0+Y2xpZW50KTsNCgkJfQ0KDQoJCXJldHVybiAkdGhpcy0+JG5hbWU7DQoJfQ0K', '{}', 'AbstractPackage', 'VDM\\Gitea\\AbstractPackage', '1.0.0', '{}', 'Abstract Gitea Package', 'abstract class', '{}', '', 1, '2021-12-03 16:03:06', '2023-02-02 15:45:48', 17, 4), (8, 1, '', 'c65aaf1f-817c-49a2-8202-282e3904f5b1', '', '51195163-1e87-4251-b755-a03c376798a6', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwOw0KdXNlIEpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeTs=', '', '', '{}', 'CS8qKg0KCSAqIExpc3QgeW91ciByZXBvc2l0b3JpZXMuDQoJICoNCgkgKiBMaXN0IHJlcG9zaXRvcmllcyBmb3IgdGhlIGF1dGhlbnRpY2F0ZWQgdXNlci4NCgkgKg0KCSAqIEByZXR1cm4gIG9iamVjdA0KCSAqDQoJICogQHNpbmNlICAgMS4wDQoJICovDQoJcHVibGljIGZ1bmN0aW9uIGdldEx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', 'Gitea Repo', 'class', '{}', '', 1, '2021-12-03 16:37:20', '2022-07-09 10:28:45', 13, 4), (9, 1, '', '', '', '011813ba-8dd2-4beb-98f9-50ab3f3665d1', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwIGFzIEJhc2VIdHRwOw0KdXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwRmFjdG9yeTsNCnVzZSBKb29tbGFcUmVnaXN0cnlcUmVnaXN0cnk7', '', '', '{\"load_selection0\":{\"load\":\"aa253bac-f4b4-41b4-8ace-071a73fc4d96\"},\"load_selection1\":{\"load\":\"c65aaf1f-817c-49a2-8202-282e3904f5b1\"},\"load_selection2\":{\"load\":\"51195163-1e87-4251-b755-a03c376798a6\"}}', 'CS8qKg0KCSAqIE9wdGlvbnMgZm9yIHRoZSBbW1tBcGldXV0gb2JqZWN0Lg0KCSAqDQoJICogQHZhciAgICBhcnJheQ0KCSAqIEBzaW5jZSAgMS4wDQoJICovDQoJcHJvdGVjdGVkICRvcHRpb25zOw0KDQoJLyoqDQoJICogVGhlIEhUVFAgY2xpZW50IG9iamVjdCB0byB1c2UgaW4gc2VuZGluZyBIVFRQIHJlcXVlc3RzLg0KCSAqDQoJICogQHZhciAgICBCYXNlSHR0cA0KCSAqIEBzaW5jZSAgMS4wDQoJICovDQoJcHJvdGVjdGVkICRjbGllbnQ7DQoNCgkvKioNCgkgKiBDb25zdHJ1Y3Rvci4NCgkgKg0KCSAqIEBwYXJhbSAgIFJlZ2lzdHJ5ICAkb3B0aW9ucyAgW1tbQXBpXV1dIG9wdGlvbnMgb2JqZWN0Lg0KCSAqIEBwYXJhbSAgIEh0dHAgICAgICAkY2xpZW50ICAgVGhlIEhUVFAgY2xpZW50IG9iamVjdC4NCgkgKg0KCSAqIEBzaW5jZSAgIDEuMA0KCSAqLw0KCXB1YmxpYyBmdW5jdGlvbiBfX2NvbnN0cnVjdChSZWdpc3RyeSAkb3B0aW9ucyA9IG51bGwsIEJhc2VIdHRwICRjbGllbnQg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BAcGFyYW0gICBtaXhlZCAgICR2YWx1ZSAgVGhlIG9wdGlvbiB2YWx1ZSB0byBzZXQuDQoJICoNCgkgKiBAcmV0dXJuICBbW1tBcGldXV0gIFRoaXMgb2JqZWN0IGZvciBtZXRob2QgY2hhaW5pbmcuDQoJICoNCgkgKiBAc2luY2UgICAxLjANCgkgKi8NCglwdWJsaWMgZnVuY3Rpb24gc2V0T3B0aW9uKCRrZXksICR2YWx1ZSkNCgl7DQoJCSR0aGlzLT5vcHRpb25zWyRrZXldID0gJHZhbHVlOw0KDQoJCXJldHVybiAkdGhpczsNCgl9DQo=', '{}', '[[[Api]]]', '[[[COMPANY]]]\\[[[Api]]]\\[[[Api]]]', '1.0.0', '{}', 'API', 'class', '{}', '', 1, '2022-01-05 00:44:15', '2022-09-20 10:09:49', 6, 4), (10, 1, 'Control the naming of a field\r\n\r\n@since 3.0.9', '', '', '9ef0eb24-aae4-4f5a-99af-d724db44808f', 'dXNlIEpvb21sYVxDTVNcQ29tcG9uZW50XENvbXBvbmVudEhlbHBlcjs=', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBmaWVsZCBidWlsZGVyIHN3aXRjaA0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljICRidWlsZGVyID0gZmFsc2U7DQoNCgkvKioNCgkgKiBNYWtpbmcgZmllbGQgbmFtZXMgc2FmZQ0KCSAqDQoJICogQGlucHV0CXN0cmluZyAgICAgICBUaGUgc3RyaW5nIHlvdSB3b3VsZCBsaWtlIHRvIG1ha2Ugc2FmZQ0KCSAqIEBpbnB1dAlib29sZWFuICAgICAgVGhlIHN3aXRjaCB0byByZXR1cm4gYW4gQUxMIFVQUEVSIENBU0Ugc3RyaW5nDQoJICogQGlucHV0CXN0cmluZyAgICAgICBUaGUgc3RyaW5nIHRvIHVzZSBpbiB3aGl0ZSBzcGFjZQ0KCSAqDQoJICogQHJldHVybnMgc3RyaW5nIG9uIHN1Y2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7dc6b429ef\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 20:46:56', '2023-01-14 18:06:18', 22, 5), -(11, '', 'The json checker\r\n\r\n@since 3.0.9', '', '', '4b225c51-d293-48e4-b3f6-5136cf5c3f18', '', '', '', '{\"load_selection0\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"load_selection1\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection2\":{\"load\":\"db87c339-5bb6-4291-a7ef-2c48ea1b06bc\"}}', 'CS8qKg0KCSAqIENoZWNrIGlmIHlvdSBoYXZlIGEganNvbiBzdHJpbmcNCgkgKg0KCSAqIEBpbnB1dCAgICBzdHJpbmcgICRzdHJpbmcgIFRoZSBqc29uIHN0cmluZyB0byBjaGVjaw0KCSAqDQoJICogQHJldHVybnMgYm9vbCB0cnVlIG9uIHN1Y2Nlc3MNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBjaGVjaygkc3RyaW5nKTogYm9vbA0KCXsNCgkJaWYgKFN0cmluZ0hlbHBlcjo6Y2hlY2soJHN0cmluZykpDQoJCXsNCgkJCWpzb25fZGVjb2RlKChzdHJpbmcpICRzdHJpbmcpOw0KCQkJcmV0dXJuIChqc29uX2xhc3RfZXJyb3IoKSA9PT0gSlNPTl9FUlJPUl9OT05FKTsNCgkJfQ0KDQoJCXJldHVybiBmYWxzZTsNCgl9DQoNCgkvKioNCgkgKiBDb252ZXJ0IGEganNvbiBvYmplY3QgdG8gYSBzdHJpbmcNCgkgKg0KCSAqIEBpbnB1dCAgICBzdHJpbmcgICR2YWx1ZSAgVGhlIGpzb24gc3RyaW5nIHRvIGNvbnZlcnQNCgkgKg0KCSAqIEByZXR1cm5zIGEgc3RyaW5nDQoJICogDQoJICogQHNpbmNlICAzLjAuOQ0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kJCQkJCXsNCgkJCQkJCQlpZiAoJF9uYW1lID0gR2V0SGVscGVyOjp2YXIoJHRhYmxlLCAkdmFsLCAkaWQsICRuYW1lKSkNCgkJCQkJCQl7DQoJCQkJCQkJCSRuYW1lc1tdID0gJF9uYW1lOw0KCQkJCQkJCX0NCgkJCQkJCX0NCgkJCQkJfQ0KCQkJCQlpZiAoQXJyYXlIZWxwZXI6OmNoZWNrKCRuYW1lcykpDQoJCQkJCXsNCgkJCQkJCXJldHVybiAoc3RyaW5nKSBpbXBsb2RlKCRzZXBhcmF0b3IsICRuYW1lcyk7DQoJCQkJCX0JDQoJCQkJfQ0KCQkJCXJldHVybiAoc3RyaW5nKSBpbXBsb2RlKCRzZXBhcmF0b3IsICRyZXN1bHQpOw0KCQkJfQ0KCQkJcmV0dXJuIChzdHJpbmcpIGpzb25fZGVjb2RlKChzdHJpbmcpICR2YWx1ZSk7DQoJCX0NCgkJcmV0dXJuICR2YWx1ZTsNCgl9DQo=', '{}', 'JsonHelper', 'VDM\\Joomla\\Utilities.JsonHelper', '1.0.0', '{}', 'Utilities Json Helper', 'abstract class', '{}', '', 1, '2022-03-08 21:03:54', '2023-01-14 18:11:18', 22, 6), -(12, 1, 'Some string tricks\r\n\r\n@since 3.0.9', '', '', '1f28cb53-60d9-4db1-b517-3c7dc6b429ef', 'dXNlIEpvb21sYVxDTVNcRmlsdGVyXElucHV0RmlsdGVyOw0KdXNlIEpvb21sYVxDTVNcTGFuZ3VhZ2VcTGFuZ3VhZ2U7', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"}}', 'CS8qKg0KCSAqIFRoZSBNYWluIEFjdGl2ZSBMYW5ndWFnZQ0KCSAqIA0KCSAqIEB2YXIgICAgICBzdHJpbmcNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyAkbGFuZ1RhZzsNCg0KCS8qKg0KCSAqIENoZWNrIGlmIHdlIGhh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sNCgkJCQkJJHcgLj0gJyAnOw0KCQkJCQlpZigkciA8IDEwMCkNCgkJCQkJew0KCQkJCQkJJHcgLj0gJ2FuZCAnOw0KCQkJCQl9DQoJCQkJCSR3IC49IHNlbGY6Om51bWJlcigkcik7DQoJCQkJfQ0KCQkJfQ0KCQl9DQoJCXJldHVybiAkdzsNCgl9DQoNCgkvKioNCgkgKiBSYW5kb20gS2V5DQoJICoNCgkgKiBAcmV0dXJucyBhIHN0cmluZw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHJhbmRvbSgkc2l6ZSk6IHN0cmluZw0KCXsNCgkJJGJhZyA9ICJhYmNlZmdoaWprbm9wcXJzdHV3eHl6QUJDRERFRkdISUpLTExNTU5PUFFSU1RVVlZXWFlaYWJjZGRlZmdoaWprbGxtbW5vcHFyc3R1dnZ3eHl6QUJDRUZHSElKS05PUFFSU1RVV1hZWiI7DQoJCSRrZXkgPSBhcnJheSgpOw0KCQkkYmFnc2l6ZSA9IHN0cmxlbigkYmFnKSAtIDE7DQoNCgkJZm9yICgkaSA9IDA7ICRpIDwgJHNpemU7ICRpKyspDQoJCXsNCgkJCSRnZXQgPSByYW5kKDAsICRiYWdzaXplKTsNCgkJCSRrZXlbXSA9ICRiYWdbJGdldF07DQoJCX0NCg0KCQlyZXR1cm4gaW1wbG9kZSgka2V5KTsNCgl9DQo=', '{}', 'StringHelper', 'VDM\\Joomla\\Utilities.StringHelper', '1.0.0', '{}', 'Utilities String Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 21:35:37', '2023-01-31 12:08:09', 31, 7), -(13, '', 'Some array tricks helper\r\n\r\n@since 3.0.9', '', '', '0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a', '', '', '', '{}', 'CS8qKg0KCSAqIENoZWNrIGlmIGhhdmUgYW4gYXJ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CgkJaWYoc2VsZjo6Y2hlY2soJGFycmF5cykpDQoJCXsNCgkJCSRtZXJnZWQgPSBbXTsNCgkJCWZvcmVhY2ggKCRhcnJheXMgYXMgJGFycmF5KQ0KCQkJew0KCQkJCWlmIChzZWxmOjpjaGVjaygkYXJyYXkpKQ0KCQkJCXsNCgkJCQkJJG1lcmdlZCA9IGFycmF5X21lcmdlKCRtZXJnZWQsICRhcnJheSk7DQoJCQkJfQ0KCQkJfQ0KCQkJcmV0dXJuICRtZXJnZWQ7DQoJCX0NCgkJcmV0dXJuIG51bGw7DQoJfQ0KDQoJLyoqDQoJICogQ2hlY2sgaWYgYXJyYXlzIGludGVyc2VjdA0KCSAqDQoJICogQGlucHV0CWFycmF5ICAgVGhlIGZpcnN0IGFycmF5DQoJICogQGlucHV0CWFycmF5ICAgVGhlIHNlY29uZCBhcnJheQ0KCSAqDQoJICogQHJldHVybnMgYm9vbCAgdHJ1ZSBpZiBpbnRlcnNlY3QgZWxzZSBmYWxzZQ0KCSAqIA0KCSAqIEBzaW5jZSAgMy4xLjENCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGludGVyc2VjdCgkYV9hcnJheSwgJGJfYXJyYXkpOiBib29sDQoJew0KCQkvLyBmbGlwIHRoZSBzZWNvbmQgYXJyYXkNCgkJJGJfYXJyYXkgPSBhcnJheV9mbGlwKCRiX2FycmF5KTsNCg0KCQkvLyBsb29wIHRoZSBmaXJzdCBhcnJheQ0KCQlmb3JlYWNoICgkYV9hcnJheSBhcyAkdikNCgkJew0KCQkJaWYgKGlzc2V0KCRiX2FycmF5WyR2XSkpDQoJCQl7DQoJCQkJcmV0dXJuIHRydWU7DQoJCQl9DQoJCX0NCgkJcmV0dXJuIGZhbHNlOw0KCX0NCg==', '{}', 'ArrayHelper', 'VDM\\Joomla\\Utilities.ArrayHelper', '1.0.0', '{}', 'Utilities Array Helper', 'abstract class', '{}', '', 1, '2022-03-08 22:53:52', '2023-01-18 22:09:16', 20, 8), +(11, '', 'The json checker\r\n\r\n@since 3.0.9', '', '', '4b225c51-d293-48e4-b3f6-5136cf5c3f18', '', '', '', '{\"load_selection0\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"load_selection1\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection2\":{\"load\":\"db87c339-5bb6-4291-a7ef-2c48ea1b06bc\"}}', 'CS8qKg0KCSAqIENoZWNrIGlmIHlvdSBoYXZlIGEganNvbiBzdHJpbmcNCgkgKg0KCSAqIEBpbnB1dCAgICBzdHJpbmcgICRzdHJpbmcgIFRoZSBqc29uIHN0cmluZyB0byBjaGVjaw0KCSAqDQoJICogQHJldHVybnMgYm9vbCB0cnVlIG9uIHN1Y2Nlc3MNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBjaGVjaygkc3RyaW5nKTogYm9vbA0KCXsNCgkJaWYgKFN0cmluZ0hlbHBlcjo6Y2hlY2soJHN0cmluZykpDQoJCXsNCgkJCWpzb25fZGVjb2RlKChzdHJpbmcpICRzdHJpbmcpOw0KCQkJcmV0dXJuIChqc29uX2xhc3RfZXJyb3IoKSA9PT0gSlNPTl9FUlJPUl9OT05FKTsNCgkJfQ0KDQoJCXJldHVybiBmYWxzZTsNCgl9DQoNCgkvKioNCgkgKiBDb252ZXJ0IGEganNvbiBvYmplY3QgdG8gYSBzdHJpbmcNCgkgKg0KCSAqIEBpbnB1dCAgICBzdHJpbmcgICR2YWx1ZSAgVGhlIGpzb24gc3RyaW5nIHRvIGNvbnZlcnQNCgkgKg0KCSAqIEByZXR1cm5zIGEgc3RyaW5nDQoJICogDQoJICogQHNpbmNlICAzLjAuOQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gc3RyaW5nKCR2YWx1ZSwgJHNlcGFyYXRvciA9ICIsICIsICR0YWJsZSA9IG51bGwsICRpZCA9ICdpZCcs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ZXNbXSA9ICRfbmFtZTsNCgkJCQkJCQl9DQoJCQkJCQl9DQoJCQkJCX0NCgkJCQkJaWYgKEFycmF5SGVscGVyOjpjaGVjaygkbmFtZXMpKQ0KCQkJCQl7DQoJCQkJCQlyZXR1cm4gKHN0cmluZykgaW1wbG9kZSgkc2VwYXJhdG9yLCAkbmFtZXMpOw0KCQkJCQl9CQ0KCQkJCX0NCgkJCQlyZXR1cm4gKHN0cmluZykgaW1wbG9kZSgkc2VwYXJhdG9yLCAkcmVzdWx0KTsNCgkJCX0NCgkJCXJldHVybiAoc3RyaW5nKSBqc29uX2RlY29kZSgoc3RyaW5nKSAkdmFsdWUpOw0KCQl9DQoJCXJldHVybiAkdmFsdWU7DQoJfQ0K', '{}', 'JsonHelper', 'VDM\\Joomla\\Utilities.JsonHelper', '1.0.0', '{}', 'Utilities Json Helper', 'abstract class', '{}', '', 1, '2022-03-08 21:03:54', '2023-01-14 18:11:18', 22, 6), +(12, 1, 'Some string tricks\r\n\r\n@since 3.0.9', '', '', '1f28cb53-60d9-4db1-b517-3c7dc6b429ef', 'dXNlIEpvb21sYVxDTVNcRmlsdGVyXElucHV0RmlsdGVyOw0KdXNlIEpvb21sYVxDTVNcTGFuZ3VhZ2VcTGFuZ3VhZ2U7', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"}}', 'CS8qKg0KCSAqIFRoZSBNYWluIEFjdGl2ZSBMYW5ndWFnZQ0KCSAqIA0KCSAqIEB2YXIgICAgICBzdHJpbmcNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyAkbGFuZ1RhZzsNCg0KCS8qKg0KCSAqIENoZWNrIGlmIHdlIGhhdmUgYSBzdHJpbmcgd2l0aCBhIGxlbmd0aA0KCSAqDQoJICogQGlucHV0ICAgIHN0cmluZyAgJHN0cmluZyBUaGUgc3RyaW5nIHRvIGNoZWNrDQoJICoNCgkgKiBAcmV0dXJ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lcigkcik7DQoJCQkJfQ0KCQkJfQ0KCQl9DQoJCXJldHVybiAkdzsNCgl9DQoNCgkvKioNCgkgKiBSYW5kb20gS2V5DQoJICoNCgkgKiBAcmV0dXJucyBhIHN0cmluZw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHJhbmRvbSgkc2l6ZSk6IHN0cmluZw0KCXsNCgkJJGJhZyA9ICJhYmNlZmdoaWprbm9wcXJzdHV3eHl6QUJDRERFRkdISUpLTExNTU5PUFFSU1RVVlZXWFlaYWJjZGRlZmdoaWprbGxtbW5vcHFyc3R1dnZ3eHl6QUJDRUZHSElKS05PUFFSU1RVV1hZWiI7DQoJCSRrZXkgPSBbXTsNCgkJJGJhZ3NpemUgPSBzdHJsZW4oJGJhZykgLSAxOw0KDQoJCWZvciAoJGkgPSAwOyAkaSA8ICRzaXplOyAkaSsrKQ0KCQl7DQoJCQkkZ2V0ID0gcmFuZCgwLCAkYmFnc2l6ZSk7DQoJCQkka2V5W10gPSAkYmFnWyRnZXRdOw0KCQl9DQoNCgkJcmV0dXJuIGltcGxvZGUoJGtleSk7DQoJfQ0K', '{}', 'StringHelper', 'VDM\\Joomla\\Utilities.StringHelper', '1.0.0', '{}', 'Utilities String Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 21:35:37', '2023-01-31 12:08:09', 31, 7), +(13, '', 'Some array tricks helper\r\n\r\n@since 3.0.9', '', '', '0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a', '', '', '', '{}', 'CS8qKg0KCSAqIENoZWNrIGlmIGhhdmUgYW4gYXJyYXkgd2l0aCBhIGxlbmd0aA0KCSAqDQoJICogQGlucHV0CWFycmF5ICAgVGhlIGFycmF5IHRvIGNoZWNrDQoJICoNCgkgKiBAcmV0dXJucyBpbnR8ZmFsc2UgIG51bWJlciBvZ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hlY2soJGFycmF5KSkNCgkJCQl7DQoJCQkJCSRtZXJnZWQgPSBhcnJheV9tZXJnZSgkbWVyZ2VkLCAkYXJyYXkpOw0KCQkJCX0NCgkJCX0NCgkJCXJldHVybiAkbWVyZ2VkOw0KCQl9DQoJCXJldHVybiBudWxsOw0KCX0NCg0KCS8qKg0KCSAqIENoZWNrIGlmIGFycmF5cyBpbnRlcnNlY3QNCgkgKg0KCSAqIEBpbnB1dAlhcnJheSAgIFRoZSBmaXJzdCBhcnJheQ0KCSAqIEBpbnB1dAlhcnJheSAgIFRoZSBzZWNvbmQgYXJyYXkNCgkgKg0KCSAqIEByZXR1cm5zIGJvb2wgIHRydWUgaWYgaW50ZXJzZWN0IGVsc2UgZmFsc2UNCgkgKiANCgkgKiBAc2luY2UgIDMuMS4xDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBpbnRlcnNlY3QoJGFfYXJyYXksICRiX2FycmF5KTogYm9vbA0KCXsNCgkJLy8gZmxpcCB0aGUgc2Vjb25kIGFycmF5DQoJCSRiX2FycmF5ID0gYXJyYXlfZmxpcCgkYl9hcnJheSk7DQoNCgkJLy8gbG9vcCB0aGUgZmlyc3QgYXJyYXkNCgkJZm9yZWFjaCAoJGFfYXJyYXkgYXMgJHYpDQoJCXsNCgkJCWlmIChpc3NldCgkYl9hcnJheVskdl0pKQ0KCQkJew0KCQkJCXJldHVybiB0cnVlOw0KCQkJfQ0KCQl9DQoJCXJldHVybiBmYWxzZTsNCgl9DQo=', '{}', 'ArrayHelper', 'VDM\\Joomla\\Utilities.ArrayHelper', '1.0.0', '{}', 'Utilities Array Helper', 'abstract class', '{}', '', 1, '2022-03-08 22:53:52', '2023-02-05 17:36:34', 21, 8), (14, '', 'Control the naming of a namespace helper\r\n\r\n@since 3.0.9', '', '', 'ce8cf834-6bac-44fb-941c-861f7e046cc0', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBuYW1lc3BhY2Ugc2FmZQ0KCSAqDQoJICog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zIGluc2lkZSBvZiB0aGUgc3RyaW5nDQoJCQlpZiAoJHJlbW92ZU51bWJlcnMpDQoJCQl7DQoJCQkJJHN0cmluZyA9IHRyaW0oIHByZWdfcmVwbGFjZSgiL1teQS1aYS16XCtdLyIsICcnLCAkc3RyaW5nKSwgJysnKTsNCgkJCX0NCgkJCWVsc2UNCgkJCXsNCgkJCQkkc3RyaW5nID0gdHJpbSggcHJlZ19yZXBsYWNlKCIvW15BLVphLXowLTlcK10vIiwgJycsICRzdHJpbmcpLCAnKycpOw0KCQkJfQ0KDQoJCQkvLyBwbGFjZSB0aGUgW1xdIGJhY2tzbGFzaGVzIGJhY2sNCgkJCXJldHVybiB0cmltKCBwcmVnX3JlcGxhY2UoIi9cKysvIiwgJ1xcJywgJHN0cmluZykpOw0KCQl9DQoNCgkJLy8gbm90IGEgc3RyaW5nDQoJCXJldHVybiAnJzsNCgl9DQo=', '{}', 'NamespaceHelper', 'VDM\\Joomla\\Utilities.String.NamespaceHelper', '1.0.0', '{}', 'String Namespace Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:27:57', '2023-01-14 18:04:48', 19, 5), (15, 1, 'Control the naming of a field type\r\n\r\n@since 3.0.9', '', '', 'a8935cbe-7701-40dc-bfd5-675f2d600954', 'dXNlIEpvb21sYVxDTVNcQ29tcG9uZW50XENvbXBvbmVudEhlbHBlcjs=', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBmaWVsZCBidWlsZGVyIHN3aXRjaA0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljICRidWlsZGVyID0gZmFsc2U7DQoNCgkvKioNCgkgKiBNYWtpbmcgZmllbGQgdHlwZSBuYW1lIHNhZmUNCgkgKg0KCSAqIEBwYXJhbSAgIFN0cmluZyAgICAgICRzdHJpbmcgICAgIFRoZSB5b3Ugd291bG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FuZCBudW1iZXJzIGFuZCBwb2ludCAoVE9ETyBqdXN0IG9uZSBwb2ludCkNCgkJCQkkc3RyaW5nID0gdHJpbShwcmVnX3JlcGxhY2UoIi9bXkEtWmEtejAtOVwuXS8iLCAnJywgKHN0cmluZykgJHN0cmluZykpOw0KDQoJCQkJLy8gYmVzdCBpcyB0byByZXR1cm4gbG93ZXIgKGZvciBhbGwgc3RyaW5nIGVxdWFsaXR5IGluIGNvbXBpbGVyKQ0KCQkJCXJldHVybiBzdHJ0b2xvd2VyKCRzdHJpbmcpOw0KCQkJfQ0KCQkJLy8gbm90IGEgc3RyaW5nDQoJCQlyZXR1cm4gJyc7DQoJCX0NCg0KCQkvLyB1c2UgdGhlIGRlZmF1bHQgKG9yaWdpbmFsIGJlaGF2aW91ci9jb252ZW50aW9uKQ0KCQlyZXR1cm4gU3RyaW5nSGVscGVyOjpzYWZlKCRzdHJpbmcpOw0KCX0NCg==', '{}', 'TypeHelper', 'VDM\\Joomla\\Utilities.String.TypeHelper', '1.0.0', '{}', 'String Type Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:33:09', '2023-01-14 17:56:28', 16, 5), -(16, '', 'Control the naming of a class and function\r\n\r\n@since 3.0.9', '', '', '30c5b4c2-f75f-4d15-869a-f8bfedd87358', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBjbGFzcyBvciBmdW5jdGlvbiBuYW1lIHNhZmUNCgkgKg0KCSAqIEBpbnB1dAlzdHJpbmcgICAgICAgVGhlIG5hbWUgeW91IHdvdWxkIGxpa2UgdG8gbWFrZSBzYWZlDQoJICoNCgkgKiBAcmV0dXJucyBzdHJpbmcgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHNhZmUoJG5hbWUpDQoJew0KCQkvLyByZW1vdmUgbnVtYmVycyBpZiB0aGUgZmlyc3QgY2hhcmFjdGVyIGlzIGEgbnVtYmVyDQoJCWlmIChpc19udW1lcmljKHN1YnN0cigoc3RyaW5nKSAkbmFtZSwgMCwgMSkpKQ0KCQl7DQoJCQkkbmFtZSA9IFN0cmluZ0hlbHBlcjo6bnVtYmVycygkbmFtZSk7DQoJCX0NCg0KCQkvLyByZW1vdmUgYWxsIHNwYWNlcyBhbmQgc3RyYW5nZSBjaGFyYWN0ZXJzDQoJCXJldHVybiB0cmltKHByZWdfcmVwbGFjZSgiL1teQS1aYS16MC05Xy1dLyIsICcnLCAoc3RyaW5nKSAkbmFtZSkpOw0KCX0NCg==', '{}', 'ClassfunctionHelper', 'VDM\\Joomla\\Utilities.String.ClassfunctionHelper', '1.0.0', '{}', 'String Classfunction Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:43:10', '2023-01-14 18:07:10', 16, 5), +(16, '', 'Control the naming of a class and function\r\n\r\n@since 3.0.9', '', '', '30c5b4c2-f75f-4d15-869a-f8bfedd87358', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBjbGFzcyBvciBmdW5jdGlvbiBuYW1lIHNhZmUNCgkgKg0KCSAqIEBpbnB1dAlzdHJpbmcgICAgICAgVGhlIG5hbWUgeW91IHdvdWxkIGxpa2UgdG8gbWFrZSBzYWZlDQoJICoNCgkgKiBAcmV0dXJucyBzdHJpbmcgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIHNhZmUoJG5hbWUpOiBzdHJpbmcNCgl7DQoJCS8vIHJlbW92ZSBudW1iZXJzIGlmIHRoZSBmaXJzdCBjaGFyYWN0ZXIgaXMgYSBudW1iZXINCgkJaWYgKGlzX251bWVyaWMoc3Vic3RyKChzdHJpbmcpICRuYW1lLCAwLCAxKSkpDQoJCXsNCgkJCSRuYW1lID0gU3RyaW5nSGVscGVyOjpudW1iZXJzKCRuYW1lKTsNCgkJfQ0KDQoJCS8vIHJlbW92ZSBhbGwgc3BhY2VzIGFuZCBzdHJhbmdlIGNoYXJhY3RlcnMNCgkJcmV0dXJuIHRyaW0ocHJlZ19yZXBsYWNlKCIvW15BLVphLXowLTlfLV0vIiwgJycsIChzdHJpbmcpICRuYW1lKSk7DQoJfQ0K', '{}', 'ClassfunctionHelper', 'VDM\\Joomla\\Utilities.String.ClassfunctionHelper', '1.0.0', '{}', 'String Classfunction Helper', 'abstract class', '{\"use_selection0\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"}}', '', 1, '2022-03-08 23:43:10', '2023-02-05 18:04:30', 17, 5), (17, 1, 'Some easy get...\r\n\r\n@since 3.0.9', '', '', 'db87c339-5bb6-4291-a7ef-2c48ea1b06bc', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIEdldCBhIFZhcmlhYmxlIA0KCSAqDQoJICogQHBhcmFtICAgc3RyaW5nfG51bGwgICR0YWJsZSAgICAgICAgVGhlIHRhYmxlIGZyb20gd2hpY2ggdG8gZ2V0IHRoZSB2YXJpYWJsZQ0KCSAqIEBwYXJhbSAgIG1peGVkICAgICAgICAkd2hlcmUgICAgICAgIFRoZSB2YWx1ZSB3aGVyZQ0KCSAqIEBwYXJhbSAgIHN0cmluZyAgICAgICAkd2hlcmVTdHJpbmcgIFRoZSB0YXJnZXQvZmllbGQgc3RyaW5nIHdoZXJlL25hbWUNCgkgKiBAcGFyYW0gICBzdHJpb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W5nIHZhbHVlDQoJICogQHBhcmFtICBzdHJpbmcgICAgICAgJGVuZCAgICAgICAgVGhlIGVuZGluZyB2YWx1ZQ0KCSAqIEBwYXJhbSAgc3RyaW5nICAgICAgICRkZWZhdWx0ICAgIFRoZSBkZWZhdWx0IHZhbHVlIGlmIG5vbmUgZm91bmQNCgkgKg0KCSAqIEByZXR1cm4gIHN0cmluZyAgICAgICAgICBPbiBzdWNjZXNzIC8gZW1wdHkgc3RyaW5nIG9uIGZhaWx1cmUNCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBiZXR3ZWVuKHN0cmluZyAkY29udGVudCwgc3RyaW5nICRzdGFydCwgc3RyaW5nICRlbmQsIHN0cmluZyAkZGVmYXVsdCA9ICcnKTogc3RyaW5nDQoJew0KCQkkYXJyYXkgPSBleHBsb2RlKCRzdGFydCwgJGNvbnRlbnQpOw0KCQlpZiAoaXNzZXQoJGFycmF5WzFdKSAmJiBzdHJwb3MoJGFycmF5WzFdLCAkZW5kKSAhPT0gZmFsc2UpDQoJCXsNCgkJCSRhcnJheSA9IGV4cGxvZGUoJGVuZCwgJGFycmF5WzFdKTsNCg0KCQkJLy8gcmV0dXJuIHN0cmluZyBmb3VuZCBiZXR3ZWVuDQoJCQlyZXR1cm4gJGFycmF5WzBdOw0KCQl9DQoNCgkJcmV0dXJuICRkZWZhdWx0Ow0KCX0NCg==', '{}', 'GetHelper', 'VDM\\Joomla\\Utilities.GetHelper', '1.0.0', '{}', 'Utilities GetHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-09 00:21:06', '2023-01-18 22:46:18', 26, 9), (18, '', 'Some object tricks\r\n\r\n@since 3.0.9', '', '', '91004529-94a9-4590-b842-e7c6b624ecf5', '', '', '', '{}', 'CS8qKg0KCSAqIENoZWNrIGlmIGhhdmUgYW4gb2JqZWN0IHdpdGggYSBsZW5ndGgNCgkgKg0KCSAqIEBpbnB1dAlvYmplY3QgICBUaGUgb2JqZWN0IHRvIGNoZWNrDQoJICoNCgkgKiBAcmV0dXJucyBib29sIHRydWUgb24gc3VjY2Vzcw0KCSAqIA0KCSAqIEBzaW5jZSAgMy4wLjkNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGNoZWNrKCRvYmplY3QpDQoJew0KCQlpZiAoaXNfb2JqZWN0KCRvYmplY3QpKQ0KCQl7DQoJCQlyZXR1cm4gY291bnQoKGFycmF5KSAkb2JqZWN0KSA+IDA7DQoJCX0NCg0KCQlyZXR1cm4gZmFsc2U7DQoJfQ0K', '{}', 'ObjectHelper', 'VDM\\Joomla\\Utilities.ObjectHelper', '1.0.0', '{}', 'Utilities Object Helper', 'abstract class', '{}', '', 1, '2022-03-09 00:35:23', '2022-09-20 09:51:31', 15, 8), (19, '', 'Basic Math Helper\r\n\r\n@since 3.0.9', '', '', '152c8793-8b75-4715-996a-257b9f65451c', '', '', '', '{}', 'CS8qKg0KCSAqIGJjIG1hdGggd3JhcHBlciAodmVyeSBiYXNpYyBub3QgZm9yIGFjY291bnRpbmcpDQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmcgICAkdHlwZSAgICBUaGUgdHlwZSBiYyBtYXRoDQoJICogQHBhcmFtICAgaW50ICAgICAgJHZhbDEgICAgVGhlIGZpcnN0IHZhbHVlDQoJICogQHBhcmFtICAgaW50ICAgICAgJHZhbDIgICAgVGhlIHNlY29uZCB2YWx1ZQ0KCSAqIEBwYXJhbSAgIGludCAgICAgICRzY2FsZSAgIFRoZSBzY2FsZSB2YWx1ZQ0KCSAqDQoJICogQHJldHVybiBpbnQNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBiYygkdHlwZSwgJHZhbDEsICR2YWwyLCAkc2NhbGUgPSAwKQ0KCXsNCgkJLy8gYnVpbGQgZnVuY3Rpb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hcnJheSk7DQoJfQ0K', '{}', 'MathHelper', 'VDM\\Joomla\\Utilities.MathHelper', '1.0.0', '{}', 'Utilities Math Helper', 'abstract class', '{}', '', 1, '2022-03-09 13:05:39', '2023-01-31 13:10:26', 13, 9), (20, '', 'Control the naming of a plugin\r\n\r\n@since 3.0.9', '', '', '3cf76fbf-fd95-4a33-878e-7aff6d36b7f6', '', '', '', '{}', 'CS8qKg0KCSAqIE1ha2luZyBwbHVnaW4gZm9sZGVyIG5hbWUgc2FmZQ0KCSAqDQoJICogQGlucHV0CXN0cmluZyAgICAkY29kZU5hbWUgICBUaGUgbmFtZQ0KCSAqIEBpbnB1dAlzdHJpbmcgICAgJGdyb3VwICAgVGhlIGdyb3VwIG5hbWUNCgkgKg0KCSAqIEByZXR1cm5zIHN0cmluZyBvbiBzdWNjZXNzDQoJICogDQoJICogQHNpbmNlICAzLjAuOQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gc2FmZUZvbGRlck5hbWUoc3RyaW5nICRjb2RlTmFtZSwgc3RyaW5nICRncm91cCk6IHN0cmluZw0KCXsNCgkJLy8gZWRpdG9ycy14dGQgZ3JvdXAgcGx1Z2lucyBtdXN0IGhhdmUgYSBjbGFzcyB3aXRoIHBsZ0J1dHRvbjxQbHVnaW5OYW1lPiBzdHJ1Y3R1cmUNCgkJaWYgKCRncm91cCA9PT0gJ2VkaXRvcnMteHRkJykNCgkJew0KCQkJJGdyb3VwID0gJ0J1dHRvbic7DQoJCX0NCg0KCQlyZXR1cm4gJ3BsZ18nIC4gc3RydG9sb3dlcigkZ3JvdXApIC4gJ18nIC4gc3RydG9sb3dlcigNCgkJCSRjb2RlTmFtZQ0KCQkpOw0KCX0NCg0KCS8qKg0KCSAqIE1ha2luZyBwbHVnaW4gY2xhc3MgbmFtZSBzYWZlDQoJICoNCgkgKiBAaW5wdXQJc3RyaW5nICAgICRjb2RlTmFtZSAgIFRoZSBuYW1lDQoJICogQGlucHV0CXN0cmluZyAg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QoJCWlmICgkZ3JvdXAgPT09ICdlZGl0b3JzLXh0ZCcpDQoJCXsNCgkJCSRncm91cCA9ICdCdXR0b24nOw0KCQl9DQoNCgkJcmV0dXJuICdwbGcnIC4gdWNmaXJzdCgkZ3JvdXApIC4gdWNmaXJzdCgNCgkJCSRjb2RlTmFtZQ0KCQkpIC4gJ0luc3RhbGxlclNjcmlwdCc7DQoJfQ0KDQoJLyoqDQoJICogTWFraW5nIGxhbmd1YWdlIHByZWZpeCBzYWZlDQoJICoNCgkgKiBAaW5wdXQJc3RyaW5nICAgICRjb2RlTmFtZSAgIFRoZSBuYW1lDQoJICogQGlucHV0CXN0cmluZyAgICAkZ3JvdXAgICBUaGUgZ3JvdXAgbmFtZQ0KCSAqDQoJICogQHJldHVybnMgc3RyaW5nIG9uIHN1Y2Nlc3MNCgkgKiANCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBzYWZlTGFuZ1ByZWZpeChzdHJpbmcgJGNvZGVOYW1lLCBzdHJpbmcgJGdyb3VwKTogc3RyaW5nDQoJew0KCQkvLyBlZGl0b3JzLXh0ZCBncm91cCBwbHVnaW5zIG11c3QgaGF2ZSBhIGNsYXNzIHdpdGggcGxnQnV0dG9uPFBsdWdpbk5hbWU+IHN0cnVjdHVyZQ0KCQlpZiAoJGdyb3VwID09PSAnZWRpdG9ycy14dGQnKQ0KCQl7DQoJCQkkZ3JvdXAgPSAnQnV0dG9uJzsNCgkJfQ0KDQoJCXJldHVybiAnUExHXycgLiBzdHJ0b3VwcGVyKCRncm91cCkgLiAnXycgLiBzdHJ0b3VwcGVyKA0KCQkJJGNvZGVOYW1lDQoJCSk7DQoJfQ0K', '{}', 'PluginHelper', 'VDM\\Joomla\\Utilities.String.PluginHelper', '1.0.0', '{}', 'String Plugin Helper', 'abstract class', '{}', '', 1, '2022-03-09 14:44:58', '2023-01-14 18:00:42', 16, 5), (21, 1, 'Global Unique ID Helper\r\n\r\n@since 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JGd1aWQpOw0KCQl9DQoJCXJldHVybiBmYWxzZTsNCgl9DQo=', '{}', 'GuidHelper', 'VDM\\Joomla\\Utilities.GuidHelper', '1.0.0', '{}', 'Utilities GuidHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-12 01:27:10', '2023-01-14 20:50:52', 17, 9), -(22, 1, 'File helper\r\n\r\n@since 3.0.9', '', '', 'a223b31e-ea1d-4cdf-92ae-5f9becffaff0', 'dXNlIEpvb21sYVxDTVNcVXJpXFVyaTsNCnVzZSBKb29tbGFcQ01TXEZhY3Rvcnk7DQp1c2UgSm9vbWxhXENNU1xMYW5ndWFnZVxUZXh0Ow0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxQYXRoOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGaWxlOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXEFyY2hpdmVcQXJjaGl2ZTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"load_selection2\":{\"load\":\"91004529-94a9-4590-b842-e7c6b624ecf5\"}}', 'CS8qKg0KCSAqIFRyaWdnZXIgZXJyb3Igbm90aWNlIG9ubHkgb25jZQ0KCSAqDQoJICogQHZhciAgICBib29sDQoJICoNCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHJvdGVjdGVkIHN0YXRpYyAkY3VybEVycm9yID0gZmFsc2U7DQoNCgkvKioNCgkgKiBUaGUgemlwcGVyIG1ldGhvZA0KCSAqIA0KCSAqIEBwYXJhbSAgc3RyaW5nICAgJHdvcmtpbmdEaXJlY3RvcnkgICAgVGhlIGRpcmVjdG9yeSB3aGVyZSB0aGUgaXRlbXMgbXVzdCBiZS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lzdHM7DQoJfQ0K', '{}', 'FileHelper', 'VDM\\Joomla\\Utilities.FileHelper', '1.0.0', '{}', 'Utilities FileHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-12 02:09:18', '2023-02-02 15:57:19', 32, 9), +(22, 1, 'File helper\r\n\r\n@since 3.0.9', '', '', 'a223b31e-ea1d-4cdf-92ae-5f9becffaff0', 'dXNlIEpvb21sYVxDTVNcVXJpXFVyaTsNCnVzZSBKb29tbGFcQ01TXEZhY3Rvcnk7DQp1c2UgSm9vbWxhXENNU1xMYW5ndWFnZVxUZXh0Ow0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxQYXRoOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGaWxlOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXEFyY2hpdmVcQXJjaGl2ZTs=', '', '', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"},\"load_selection2\":{\"load\":\"91004529-94a9-4590-b842-e7c6b624ecf5\"}}', 'CS8qKg0KCSAqIFRyaWdnZXIgZXJyb3Igbm90aWNlIG9ubHkgb25jZQ0KCSAqDQoJICogQHZhciAgICBib29sDQoJICoNCgkgKiBAc2luY2UgIDMuMC45DQoJICovDQoJcHJvdGVjdGVkIHN0YXRpYyAkY3VybEVycm9yID0gZmFsc2U7DQoNCgkvKioNCgkgKiBUaGUgemlwcGVyIG1ldGhvZA0KCSAqIA0KCSAqIEBwYXJhbSAgc3RyaW5nICAgJHdvcmtpbmdEaXJlY3RvcnkgICAgVGhlIGRpcmVjdG9yeSB3aGVyZSB0aGUgaXRlbXMgbXVzdCBiZSB6aXBwZWQNCgkgKiBAcGFyYW0gIHN0cmluZ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mIChmdW5jdGlvbl9leGlzdHMoJ2N1cmxfdmVyc2lvbicpKQ0KCQl7DQoJCQkvLyBpbml0aWF0ZSBjdXJsDQoJCQkkY2ggPSBjdXJsX2luaXQoJHBhdGgpOw0KCQkJLy8gQ1VSTE9QVF9OT0JPRFkgKGRvIG5vdCByZXR1cm4gYm9keSkNCgkJCWN1cmxfc2V0b3B0KCRjaCwgQ1VSTE9QVF9OT0JPRFksIHRydWUpOw0KCQkJLy8gbWFrZSBjYWxsDQoJCQkkcmVzdWx0ID0gY3VybF9leGVjKCRjaCk7DQoJCQkvLyBjaGVjayByZXR1cm4gdmFsdWUNCgkJCWlmICgkcmVzdWx0ICE9PSBmYWxzZSkNCgkJCXsNCgkJCQkvLyBnZXQgdGhlIGh0dHAgQ09ERQ0KCQkJCSRzdGF0dXNDb2RlID0gY3VybF9nZXRpbmZvKCRjaCwgQ1VSTElORk9fSFRUUF9DT0RFKTsNCgkJCQlpZiAoJHN0YXR1c0NvZGUgIT09IDQwNCkNCgkJCQl7DQoJCQkJCSRleGlzdHMgPSB0cnVlOw0KCQkJCX0NCgkJCX0NCgkJCS8vIGNsb3NlIHRoZSBjb25uZWN0aW9uDQoJCQljdXJsX2Nsb3NlKCRjaCk7DQoJCX0NCgkJZWxzZWlmICgkaGVhZGVycyA9IEBnZXRfaGVhZGVycygkcGF0aCkpDQoJCXsNCgkJCWlmKGlzc2V0KCRoZWFkZXJzWzBdKSAmJiBpc19zdHJpbmcoJGhlYWRlcnNbMF0pICYmIHN0cnBvcygkaGVhZGVyc1swXSwnNDA0JykgPT09IGZhbHNlKQ0KCQkJew0KCQkJCSRleGlzdHMgPSB0cnVlOw0KCQkJfQ0KCQl9DQoJCXJldHVybiAkZXhpc3RzOw0KCX0NCg==', '{}', 'FileHelper', 'VDM\\Joomla\\Utilities.FileHelper', '1.0.0', '{}', 'Utilities FileHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-03-12 02:09:18', '2023-02-05 17:42:56', 33, 9), (23, 1, 'Some component helper\r\n\r\n@since 3.0.11', '', '', '640b5352-fb09-425f-a26e-cd44eda03f15', 'dXNlIEpvb21sYVxJbnB1dFxJbnB1dDsNCnVzZSBKb29tbGFcQ01TXENvbXBvbmVudFxDb21wb25lbnRIZWxwZXI7DQp1c2UgSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5Ow==', '', '', '{}', 'CS8qKg0KCSAqIFRoZSBjdXJyZW50IG9wdGlvbg0KCSAqDQoJICogQHZhciAgICBzdHJpbmcNCgkgKiBAc2luY2UgICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljIHN0cmluZyAkb3B0aW9uOw0KDQoJLyoqDQoJICogVGhlIGNvbXBvbmVudCBwYXJhbXMgbGlzdCBjYWNoZQ0KCSAqDQoJICogQHZhciAgICBSZWdpc3RyeVtdDQoJICogQHNpbmNlICAgMy4wLjExDQoJICovDQoJcHJvdGVjdGVkIHN0YXRpYyBhcnJheSAkcGFyYW1zID0gW107DQoNCgkvKioNCgkgKiBHZXRzIHRoZSBwYXJhbWV0ZXIgb2JqZWN0IGZvciB0aGUgY29tcG9uZW50DQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmd8bnVsbCAgICAgJG9wdGlvbiAgVGhlIG9wdGlvbiBmb3IgdGhlIGNvbXBvbmVudC4NCgkgKg0KCSAqIEByZXR1cm4gIFJlZ2lzdHJ5ICAgICBBIFJlZ2lzdHJ5IG9iamVjdC4NCgkgKiBAc2VlICAgICBSZWdpc3RyeQ0KCSAqIEBzaW5jZSAgIDMuMC4xMQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gZ2V0UGFyYW1zKD9zdHJpbmcgJG9wdGlvbiA9IG51bGwpOiBSZWdpc3RyeQ0KCXsNCgkJLy8gY2hlY2sgdGhhdCB3ZSBoYXZlIGFuIG9wdGlvbg0KCQlpZiAoZW1wdHkoJG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XNzDQoJCWlmICgoJGhlbHBlciA9IHNlbGY6OmdldCgkb3B0aW9uLCBmYWxzZSkpICE9PSBmYWxzZSAmJg0KCQkJbWV0aG9kX2V4aXN0cygkaGVscGVyLCAkbWV0aG9kKSkNCgkJew0KCQkJLy8gd2Uga25vdyB0aGlzIGlzIG5vdCBpZGVhbC4uLg0KCQkJLy8gc28gd2UgbmVlZCB0byBtb3ZlIHRoZXNlDQoJCQkvLyBmdW5jdGlvbnMgdG8gdGhlaXIgb3duIGNsYXNzZXMNCgkJCXJldHVybiBjYWxsX3VzZXJfZnVuY19hcnJheShbJGhlbHBlciwgJG1ldGhvZF0sICAkYXJndW1lbnRzKTsNCgkJfQ0KDQoJCXJldHVybiBudWxsOw0KCX0NCg==', '{}', 'Helper', 'VDM\\Joomla\\Utilities.Component.Helper', '1.0.0', '{}', 'Utilities Component Helper', 'abstract class', '{}', '', 1, '2022-05-13 05:36:32', '2023-01-26 15:29:49', 27, 7), (24, 1, 'Image helper\r\n\r\n@since 3.0.11', '', '', '962b15d8-915f-4cd7-aea6-7cf82afdc20b', 'dXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGaWxlOw0KdXNlIEpvb21sYVxDTVNcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXENNU1xVcmlcVXJpOw0KdXNlIEpvb21sYVxDTVNcSW1hZ2VcSW1hZ2U7', '', '', '{\"load_selection0\":{\"load\":\"91004529-94a9-4590-b842-e7c6b624ecf5\"},\"load_selection1\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"}}', 'CS8qKg0KCSAqIFJlc2l6ZSBhbiBpbWFnZQ0KCSAqDQoJICogQHBhcmFtICAgc3RyaW5nICAgICRmdWxsUGF0aCAgIFRoZSBmdWxsIHBhdGggdG8gdGhlIGltYWdlDQoJICogQHBhcmFtICAgc3RyaW5nICAgICR0eXBlICAgICAgICBUaGUgdHlwZSBvZiBpbWFnZQ0KCSAqDQoJICogQHJldHVybiB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ract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 10:59:17', '2022-09-20 09:51:10', 21, 9), -(25, 1, 'Upload Helper\r\n\r\n@since 3.0.11', '', '', 'd7600b43-771a-4747-9f5d-952765721799', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXExhbmd1YWdlXFRleHQ7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZpbGU7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZvbGRlcjsNCnVzZSBKb29tbGFcQ01TXEZpbGVzeXN0ZW1cUGF0aDs=', '', '', '{\"load_selection0\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', 'CS8qKg0KCSAqIFRydWUgdG8gdXNlIHN0cmVhbXMNCgkgKg0KCSAqIEB2YXIgICAgYm9vbA0KCSAqDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljICR1c2VTdHJlYW1zID0gZmFsc2U7DQoNCgkvKioNCgkgKiBBbGxvdyB0aGUgdXBsb2FkIG9mIHVuc2FmZSBmaWxlcw0KCSAqDQoJICogQHZhciAgICBib29sDQoJICoNCgkgKiBAc2luY2UgIDMuMC4xMQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgJGFsbG93VW5zYWZlID0gZmFsc2U7DQoNCgkvKioNCgkgKiBPcHRpb25zIHRvIElucHV0RmlsdGVyOjppc1NhZmVGaWxlDQoJICoNCgkgKiBAdmFyICAgIGFycmF5DQoJICoNCgkgKiBAc2luY2UgIDMuMC4xMQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgJHNhZmVGaWxlT3B0aW9ucyA9IGFycmF5KCk7DQoNCgkvKioNCgkgKiBTZXQgdGhlIGVycm9yIGJlaGF2aW9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RmlsZTo6ZGVsZXRlKFBhdGg6OmNsZWFuKCRmdWxsUGF0aCkpOw0KCQl9DQoJfQ0KDQoJLyoqDQoJICogU2V0IHRoZSBlcnJvcnMNCgkgKg0KCSAqIEBwYXJhbSAgc3RyaW5nICAgICAgICAkbWVzc2FnZSAgIFRoZSBlcnJvciBtZXNzYWdlDQoJICoNCgkgKiBAcmV0dXJuICB2b2lkDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwcm90ZWN0ZWQgc3RhdGljIGZ1bmN0aW9uIHNldEVycm9yKCRtZXNzYWdlKQ0KCXsNCgkJaWYgKHNlbGY6OiRlbnF1ZXVlRXJyb3IpDQoJCXsNCgkJCUZhY3Rvcnk6OmdldEFwcGxpY2F0aW9uKCktPmVucXVldWVNZXNzYWdlKCRtZXNzYWdlLCAnZXJyb3InKTsNCgkJfQ0KCQllbHNlDQoJCXsNCgkJCXNlbGY6OiRlcnJvcnNbXSA9ICRtZXNzYWdlOw0KCQl9DQoJfQ0K', '{}', 'UploadHelper', 'VDM\\Joomla\\Utilities.UploadHelper', '1.0.0', '{}', 'Utilities UploadHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 13:20:50', '2022-09-20 10:10:51', 37, 9), +(25, 1, 'Upload Helper\r\n\r\n@since 3.0.11', '', '', 'd7600b43-771a-4747-9f5d-952765721799', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXExhbmd1YWdlXFRleHQ7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZpbGU7DQp1c2UgSm9vbWxhXENNU1xGaWxlc3lzdGVtXEZvbGRlcjsNCnVzZSBKb29tbGFcQ01TXEZpbGVzeXN0ZW1cUGF0aDs=', '', '', '{\"load_selection0\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"},\"load_selection1\":{\"load\":\"1f28cb53-60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SAkbWVzc2FnZTsNCgkJfQ0KCX0NCg==', '{}', 'UploadHelper', 'VDM\\Joomla\\Utilities.UploadHelper', '1.0.0', '{}', 'Utilities UploadHelper', 'abstract class', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', '', 1, '2022-05-16 13:20:50', '2022-09-20 10:10:51', 37, 9), (26, '', 'Mime Helper\r\n\r\n@since 3.0.11', '', '', 'f11dc790-713e-4706-9a85-a318ed3ad56e', '', '', '', '{}', 'W0VYVEVSTkFMQ09ERT1odHRwczovL2dpc3QuZ2l0aHVidXNlcmNvbnRlbnQuY29tL0xsZXdlbGx5bnZkbS83NGJlMzczMzU3ZTEzMWI4Nzc1YTc1ODJjM2RlNTA4Yi9yYXcvbWltZV90eXBlcy5waHBdDQoNCltFWFRFUk5BTENPREU9aHR0cHM6Ly9naXN0LmdpdGh1YnVzZXJjb250ZW50LmNvbS9MbGV3ZWxseW52ZG0vNzRiZTM3MzM1N2UxMzFiODc3NWE3NTgyYzNkZTUwOGIvcmF3L2dldC5waHBdDQoNCltFWFRFUk5BTENPREU9aHR0cHM6Ly9naXN0LmdpdGh1YnVzZXJjb250ZW50LmNvbS9MbGV3ZWxseW52ZG0vNzRiZTM3MzM1N2UxMzFiODc3NWE3NTgyYzNkZTUwOGIvcmF3L2V4dGVuc2lvbnMucGhwXQ==', '{}', 'MimeHelper', 'VDM\\Joomla\\Utilities.MimeHelper', '1.0.0', '{}', 'Utilities MimeHelper', 'abstract class', '{}', '', 1, '2022-05-16 14:27:38', '2022-09-20 09:51:01', 6, 9), (27, '', 'Just to link powers to the power updater component', '', '', '8025e71c-8e21-44cb-b23e-dce2fb5a1ab5', '', '', '', '{\"load_selection0\":{\"load\":\"79d765b3-7319-4988-9730-446c7f347020\"},\"load_selection1\":{\"load\":\"d7600b43-771a-4747-9f5d-952765721799\"},\"load_selection2\":{\"load\":\"962b15d8-915f-4cd7-aea6-7cf82afdc20b\"},\"load_selection3\":{\"load\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\"},\"load_selection4\":{\"load\":\"0e6235bf-08ef-428a-bc0a-93957587e936\"}}', '', '{}', 'Updater', 'VDM\\Power\\Updater', '1.0.0', '{}', 'Power Updater', 'class', '{}', '', 1, '2022-05-21 13:15:55', '2022-10-20 14:23:32', 7, 13), (28, 1, 'Start looking here:\r\nhttps://git.vdm.dev/api/swagger#/repository/repoGetContents', 'c65aaf1f-817c-49a2-8202-282e3904f5b1', '', 'ef011ee1-64f0-4048-b013-777473b727dd', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwOw0KdXNlIEpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeTs=', '', '', '{}', 'CS8qKg0KCSAqIEdldHMgdGhlIG1ldGFkYXRhIGFuZCBjb250ZW50cyAoaWYgYSBmaWxlKSBvZiBhbiBlbnRyeSBpbiBhIHJlcG9zaXRvcnksIG9yIGEgbGlzdCBvZiBlbnRyaWVzIGlmIGEgZGlyDQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmcgICRvd25lciAgICAgICBSZXBvc2l0b3J5IG93bmVyLg0KCSAqIEBwYXJhbSAgIHN0cmluZyAgJHJlcG8gICAgICAgICBSZXBvc2l0b3J5IG5hbWUuDQoJICogQHBhcmFtICAgc3RyaW5nICAkZmlsZXBhdGggICAgUmVwb3NpdG9yeSBmaWxlIHBhdGguDQoJICoNCgkgKiBAcmV0dXJuICBvYmplY3QNCgkgKg0KCSAqIEBzaW5jZSAgIDEuMA0KCSAqLw0KCXB1YmxpYyBmdW5jdGlvbiBnZXQoJG93bmVyLCAkcmVwbywgJGZpbGVwYXRoKQ0KCXsNCgkJLy8gQnVpbGQgdGhlIHJlcXVlc3QgcGF0aC4NCgkJJHBhdGggPSAnL3JlcG9zLycgLiAkb3duZXIgLiAnLycgLiAkcmVwbyAuICcvY29udGVudHMvJyAuICRmaWxlcGF0aDsNCg0KCQkvLyBTZW5kIHRoZSByZXF1ZXN0Lg0KCQlyZXR1cm4gJHRoaXMtPnByb2Nlc3NSZXNwb25zZSgNCgkJCSR0aGlzLT5jbGllbnQtPmdldCgkdGhpcy0+ZmV0Y2hVcmwoJHBhdGgpKQ0KCQkpOw0KCX0NCg==', '{}', 'File', 'VDM\\Gitea\\Package.Repo.File', '1.0.0', '{}', 'Gitea Repo File', 'class', '{}', '', 1, '2022-05-21 13:40:09', '2022-09-20 10:10:28', 11, 4), -(29, 1, 'Start looking here:\r\nhttps://git.vdm.dev/api/swagger#/repository/repoCreateWikiPage', 'c65aaf1f-817c-49a2-8202-282e3904f5b1', '', 'c4a188de-ad78-4a6d-9d5b-01866846d701', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwOw0KdXNlIEpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeTs=', '', '', '{}', 'CS8qKg0KCSAqIEdldCBhIHJlcG9zaXRvcnkgd2lraSBwYWdlDQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmcgICRvd25lciAgICAgICAgICAgICAgIFRoZSByZXBvc2l0b3J5IG93bmVyDQoJICogQHBhcmFtICAgc3RyaW5nICAkcmVwbyAgICAgICAgICAgICAgICAgVGhlIHJlcG9zaXRvcnkgbmFtZQ0KCSAqIEBwYXJhbSAgIHN0cmluZyAgJHBhZ2VOYW1lICAgICAgIFRoZSBwYWdlIG5hbWUNCgkgKg0KCSAqIEByZXR1cm4gIG9iamVjdA0KCSAqDQoJICogQHNpbmNlICAgMS4wDQoJICovDQoJcHVibGljIGZ1bmN0aW9uIGdldChzdHJpbmcgJG93bmVyLCBzdHJpbmcgJHJlcG8sIHN0cmluZyAkcGFnZU5hbWUpDQoJew0KCQkvLyBCdWlsZCB0aGUgcmVxdWVzdCBwYXRoLg0KCQkkcGF0aCA9ICcvcmVwb3MvJyAuICRvd25lciAuICcvJyAuICRyZXBvIC4gJy93aWtpL3BhZ2UvJyAuICRwYWdlTmFtZTsNCg0KCQkvLyBTZW5kIHRoZSByZXF1ZXN0Lg0KCQlyZX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JzsNCgkJJGhlYWRlcnNbJ0NvbnRlbnQtVHlwZSddID0gJ2FwcGxpY2F0aW9uL2pzb24nOw0KDQoJCS8vIGJ1aWxkIHRoZSBwb3N0IGJvZHkNCgkJJGRhdGEgPSBbDQoJCQknQ29udGV4dCcgPT4gJ3N0cmluZycsDQoJCQknTW9kZScgPT4gJ3N0cmluZycsDQoJCQknVGV4dCcgPT4gJHBhZ2UtPmNvbnRlbnQsDQoJCQknV2lraScgPT4gdHJ1ZQ0KCQldOw0KDQoJCS8vIFBvc3QgdGhlIHJlcXVlc3QuDQoJCXJldHVybiAkdGhpcy0+cHJvY2Vzc1Jlc3BvbnNlKA0KCQkJJHRoaXMtPmNsaWVudC0+cG9zdCgkdGhpcy0+ZmV0Y2hVcmwoJHBhdGgpLCBqc29uX2VuY29kZSgkZGF0YSksICRoZWFkZXJzKQ0KCQkpOw0KCX0NCg==', '{}', 'Wiki', 'VDM\\Gitea\\Package.Repo.Wiki', '1.0.0', '{}', 'Gitea Repo Wiki', 'class', '{}', '', 1, '2022-07-09 10:21:53', '2022-09-20 10:10:25', 10, 4); +(29, 1, 'Start looking here:\r\nhttps://git.vdm.dev/api/swagger#/repository/repoCreateWikiPage', 'c65aaf1f-817c-49a2-8202-282e3904f5b1', '', 'c4a188de-ad78-4a6d-9d5b-01866846d701', 'dXNlIEpvb21sYVxDTVNcSHR0cFxIdHRwOw0KdXNlIEpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeTs=', '', '', '{}', 'CS8qKg0KCSAqIEdldCBhIHJlcG9zaXRvcnkgd2lraSBwYWdlDQoJICoNCgkgKiBAcGFyYW0gICBzdHJpbmcgICRvd25lciAgICAgICAgICAgICAgIFRoZSByZXBvc2l0b3J5IG93bmVyDQoJICogQHBhcmFtICAgc3RyaW5nICAkcmVwbyAgICAgICAgICAgICAgICAgVGhlIHJlcG9zaXRvcnkgbmFtZQ0KCSAqIEBwYXJhbSAgIHN0cmluZyAgJHBhZ2VOYW1lICAgICAgIFRoZ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AoZW1wdHkoJHBhZ2UtPmNvbnRlbnQpKQ0KCQl7DQoJCQl0aHJvdyBuZXcgXEV4Y2VwdGlvbignV2lraSBwYWdlIGNvdWxkIG5vdCBiZSBmb3VuZC4nKTsNCgkJfQ0KDQoJCS8vIEJ1aWxkIHRoZSByZXF1ZXN0IHBhdGguDQoJCSRwYXRoID0gJy9tYXJrZG93bic7DQoNCgkJLy8gR2V0IGhlYWRlcnMNCgkJJGhlYWRlcnMgPSAkdGhpcy0+Y2xpZW50LT5nZXRPcHRpb24oJ2hlYWRlcnMnLCBbXSk7DQoNCgkJJGhlYWRlcnNbJ2FjY2VwdCddID0gJ3RleHQvaHRtbCc7DQoJCSRoZWFkZXJzWydDb250ZW50LVR5cGUnXSA9ICdhcHBsaWNhdGlvbi9qc29uJzsNCg0KCQkvLyBidWlsZCB0aGUgcG9zdCBib2R5DQoJCSRkYXRhID0gWw0KCQkJJ0NvbnRleHQnID0+ICdzdHJpbmcnLA0KCQkJJ01vZGUnID0+ICdzdHJpbmcnLA0KCQkJJ1RleHQnID0+ICRwYWdlLT5jb250ZW50LA0KCQkJJ1dpa2knID0+IHRydWUNCgkJXTsNCg0KCQkvLyBQb3N0IHRoZSByZXF1ZXN0Lg0KCQlyZXR1cm4gJHRoaXMtPnByb2Nlc3NSZXNwb25zZSgNCgkJCSR0aGlzLT5jbGllbnQtPnBvc3QoJHRoaXMtPmZldGNoVXJsKCRwYXRoKSwganNvbl9lbmNvZGUoJGRhdGEpLCAkaGVhZGVycykNCgkJKTsNCgl9DQo=', '{}', 'Wiki', 'VDM\\Gitea\\Package.Repo.Wiki', '1.0.0', '{}', 'Gitea Repo Wiki', 'class', '{}', '', 1, '2022-07-09 10:21:53', '2022-09-20 10:10:25', 10, 4); -- -- Dumping data for table `#__componentbuilder_admin_view` diff --git a/admin/views/search/view.html.php b/admin/views/search/view.html.php index 03bfe4719..0f787e3f3 100644 --- a/admin/views/search/view.html.php +++ b/admin/views/search/view.html.php @@ -137,7 +137,8 @@ class ComponentbuilderViewSearch extends HtmlView // set the mode options $options = [ 1 => 'COM_COMPONENTBUILDER_SEARCH', - 2 => 'COM_COMPONENTBUILDER_REPLACE']; + 2 => 'COM_COMPONENTBUILDER_REPLACE', + 0 => 'COM_COMPONENTBUILDER_CLEAR']; // add to form $xml = ComponentbuilderHelper::getFieldXML($attributes, $options); if ($xml instanceof SimpleXMLElement) diff --git a/componentbuilder.xml b/componentbuilder.xml index a5029dbf1..b46954a83 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 22nd January, 2023 + 29th January, 2023 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io diff --git a/libraries/jcb_powers/VDM.Gitea/src/AbstractGiteaObject.php b/libraries/jcb_powers/VDM.Gitea/src/AbstractGiteaObject.php index 3bfb54c54..5509676f9 100644 --- a/libraries/jcb_powers/VDM.Gitea/src/AbstractGiteaObject.php +++ b/libraries/jcb_powers/VDM.Gitea/src/AbstractGiteaObject.php @@ -83,7 +83,7 @@ abstract class AbstractGiteaObject if ($this->options->get('access.token', false)) { // Use oAuth authentication - $headers = $this->client->getOption('headers', array()); + $headers = $this->client->getOption('headers', []); if (!isset($headers['Authorization'])) { diff --git a/libraries/jcb_powers/VDM.Gitea/src/Package/Repo/Wiki.php b/libraries/jcb_powers/VDM.Gitea/src/Package/Repo/Wiki.php index a34ac032d..c193ec01e 100644 --- a/libraries/jcb_powers/VDM.Gitea/src/Package/Repo/Wiki.php +++ b/libraries/jcb_powers/VDM.Gitea/src/Package/Repo/Wiki.php @@ -70,7 +70,7 @@ class Wiki extends AbstractPackage $path = '/markdown'; // Get headers - $headers = $this->client->getOption('headers', array()); + $headers = $this->client->getOption('headers', []); $headers['accept'] = 'text/html'; $headers['Content-Type'] = 'application/json'; diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/MapperSingle.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/MapperSingle.php new file mode 100644 index 000000000..a7c347a04 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/MapperSingle.php @@ -0,0 +1,122 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Abstraction; + + +use VDM\Joomla\Componentbuilder\Interfaces\Mappersingleinterface; + + +/** + * Compiler Mapper Single + * + * @since 3.2.0 + */ +abstract class MapperSingle implements Mappersingleinterface +{ + + /** + * The Content + * + * @var array + * @since 3.2.0 + **/ + public array $active = []; + + /** + * Set content + * + * @param string $key The main string key + * @param mixed $value The values to set + * + * @return void + * @since 3.2.0 + */ + public function set(string $key, $value) + { + $this->active[$this->key($key)] = $value; + } + + /** + * Get content + * + * @param string $key The main string key + * + * @return mixed + * @since 3.2.0 + */ + public function get(string $key) + { + return $this->active[$this->key($key)] ?? null; + } + + /** + * Does key exist + * + * @param string $key The main string key + * + * @return bool + * @since 3.2.0 + */ + public function exist(string $key): bool + { + if (isset($this->active[$this->key($key)])) + { + return true; + } + return false; + } + + /** + * Add content + * + * @param string $key The main string key + * @param mixed $value The values to set + * + * @return void + * @since 3.2.0 + */ + public function add(string $key, $value) + { + if (isset($this->active[$this->key($key)])) + { + $this->active[$this->key($key)] .= $value; + } + else + { + $this->active[$this->key($key)] = $value; + } + } + + /** + * Remove content + * + * @param string $key The main string key + * + * @return void + * @since 3.2.0 + */ + public function remove(string $key) + { + unset($this->active[$this->key($key)]); + } + + /** + * Model the key + * + * @param string $key The key to model + * + * @return string + * @since 3.2.0 + */ + abstract protected function key(string $key): string; +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Data.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Data.php index 46e17cc4c..f6c3a871b 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Data.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Data.php @@ -86,6 +86,22 @@ class Data */ protected Dispenser $dispenser; + /** + * Compiler Customcode + * + * @var Customcode + * @since 3.2.0 + */ + protected Customcode $customcode; + + /** + * Compiler Customcode in Gui + * + * @var Gui + * @since 3.2.0 + **/ + protected Gui $gui; + /** * Compiler Field * @@ -223,8 +239,7 @@ class Data ?Filesfolders $filesFolders = null, ?Historycomponent $history = null, ?Whmcs $whmcs = null, ?Sqltweaking $sqltweaking = null, ?Adminviews $adminviews = null, ?Siteviews $siteviews = null, ?Customadminviews $customadminviews = null, ?Joomlamodules $modules = null, - ?Joomlaplugins $plugins = null, - ?\JDatabaseDriver $db = null) + ?Joomlaplugins $plugins = null, ?\JDatabaseDriver $db = null) { $this->config = $config ?: Compiler::_('Config'); $this->event = $event ?: Compiler::_('Event'); @@ -709,16 +724,11 @@ class Data unset($component->bom); // README - if ($component->addreadme) - { - $component->readme = $this->customcode->update( - base64_decode((string) $component->readme) - ); - } - else - { - $component->readme = ''; - } + $component->readme = + $component->addreadme ? + $this->customcode->update( + base64_decode((string) $component->readme) + ) : ''; // set lang now $nowLang = $this->config->lang_target; diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php index 5e7de1e38..59040d164 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php @@ -88,7 +88,7 @@ class Placeholder implements PlaceholderInterface // load the db $db = $this->db; // reset bucket - $bucket = array(); + $bucket = []; // Create a new query object. $query = $db->getQuery(true); $query->select($db->quoteName(array('a.target', 'a.value'))); diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php index 9ce6b18cb..5dbef0974 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php @@ -475,6 +475,21 @@ class Config extends BaseConfig return $this->compiler_path . '/default.txt'; } + /** + * get custom folder path + * + * @return string The custom folder path + * @since 3.2.0 + */ + protected function getCustomfolderpath(): string + { + // get the custom folder path + return $this->params->get( + 'custom_folder_path', + JPATH_COMPONENT_ADMINISTRATOR . '/custom' + ); + } + /** * get switch to add assets table fix * diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode.php index 82702e1d8..4a11e95d3 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode.php @@ -193,7 +193,7 @@ class Customcode implements CustomcodeInterface var_dump($string); } // the ids found in this content - $bucket = array(); + $bucket = []; $found = GetHelper::allBetween( $string, '[CUSTO' . 'MCODE=', ']' ); @@ -268,7 +268,7 @@ class Customcode implements CustomcodeInterface { if (!isset($this->data[$id]['args'])) { - $this->data[$id]['args'] = array(); + $this->data[$id]['args'] = []; } // only load if not already loaded if (!isset($this->data[$id]['args'][$key])) @@ -289,7 +289,7 @@ class Customcode implements CustomcodeInterface )) { $this->data[$id]['args'][$key] - = array(); + = []; // update the function values with the custom code key placeholders (this allow the use of [] + and , in the values) $this->data[$id]['args'][$key][] = $this->placeholder->update( @@ -415,7 +415,7 @@ class Customcode implements CustomcodeInterface $this->db->quoteName('a.from_line') . ' ASC' ); // <--- insure we always add code from top of file // reset custom code - $this->active = array(); + $this->active = []; } $query->where($this->db->quoteName('a.published') . ' >= 1'); $this->db->setQuery($query); @@ -502,7 +502,7 @@ class Customcode implements CustomcodeInterface */ protected function insert(array $ids, string $string, int $debug = 0): string { - $code = array(); + $code = []; // load the code foreach ($ids as $id) { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Dispenser.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Dispenser.php index 45a45c894..26c417661 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Dispenser.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Dispenser.php @@ -117,7 +117,7 @@ class Dispenser implements DispenserInterface * @since 3.2.0 */ public function set(&$script, string $first, ?string $second = null, ?string $third = null, - array $config = array(), bool $base64 = true, bool $dynamic = true, bool $add = false): bool + array $config = [], bool $base64 = true, bool $dynamic = true, bool $add = false): bool { // only load if we have a string if (!StringHelper::check($script)) @@ -132,7 +132,7 @@ class Dispenser implements DispenserInterface // check if the script first key is set if ($second && !isset($this->hub[$first])) { - $this->hub[$first] = array(); + $this->hub[$first] = []; } elseif ($add && !$second && !isset($this->hub[$first])) @@ -143,7 +143,7 @@ class Dispenser implements DispenserInterface if ($second && $third && !isset($this->hub[$first][$second])) { - $this->hub[$first][$second] = array(); + $this->hub[$first][$second] = []; } elseif ($add && $second && !$third && !isset($this->hub[$first][$second])) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/External.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/External.php index 352f43fba..1b8acfc19 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/External.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/External.php @@ -122,7 +122,7 @@ class External implements ExternalInterface var_dump($string); } // target content - $bucket = array(); + $bucket = []; $found = GetHelper::allBetween( $string, '[EXTERNA' . 'LCODE=', ']' ); @@ -342,17 +342,9 @@ class External implements ExternalInterface ); } } + // add to local bucket - if (isset($this->code[$target_key])) - { - // update the placeholder with the external code string - $bucket[$key] = $this->code[$target_key]; - } - else - { - // remove the placeholder - $bucket[$key] = ''; - } + $bucket[$key] = $this->code[$target_key] ?? ''; } /** diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor.php index 1dc3bb42d..73ed508ff 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor.php @@ -328,15 +328,7 @@ class Extractor implements ExtractorInterface // make sure we have the path correct (the script file is not in admin path for example) // there may be more... will nead to keep our eye on this... since files could be moved during install $file = str_replace('./', '', (string) $file); # TODO (windows path issues) - - if ($file !== 'script.php') - { - $path = $target . '/' . $file; - } - else - { - $path = $file; - } + $path = $file !== 'script.php' ? $target . '/' . $file : $file; // now we go line by line foreach (new \SplFileObject($file) as $lineNumber => $lineContent) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor/Paths.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor/Paths.php index 2a2196eca..69365547e 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor/Paths.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Extractor/Paths.php @@ -130,7 +130,7 @@ class Paths protected function load() { // set the local paths to search - $local_paths = array(); + $local_paths = []; // admin path $local_paths['admin'] = JPATH_ADMINISTRATOR . '/components/com_' @@ -213,15 +213,8 @@ class Paths { $joomla_modules = array_filter( array_values($addjoomla_modules), - function ($array) { - // only load the modules whose target association call for it - if (!isset($array['target']) || $array['target'] != 2) - { - return true; - } - - return false; - } + // only load the modules whose target association call for it + fn($array): bool => !isset($array['target']) || $array['target'] != 2 ); // if we have values we return IDs if (ArrayHelper::check($joomla_modules)) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Gui.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Gui.php index f240ea365..d827bd49b 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Gui.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Gui.php @@ -183,7 +183,7 @@ class Gui implements GuiInterface // get file content $file_conent = FileHelper::getContent($file); - $guiCode = array(); + $guiCode = []; // we add a new search for the GUI CODE Blocks $guiCode[] = GetHelper::allBetween( $file_conent, '/***[JCB' . 'GUI<>', '/***[/JCBGUI' . '$$$$]***/' diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Hash.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Hash.php index 4d90649ef..2af2ae1d2 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Hash.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Hash.php @@ -62,7 +62,7 @@ class Hash $values = GetHelper::allBetween( $script, 'HASH' . 'STRING((((', '))))' ); - $locker = array(); + $locker = []; // convert them foreach ($values as $value) { @@ -80,7 +80,7 @@ class Hash $values = GetHelper::allBetween( $script, 'HASH' . 'FILE((((', '))))' ); - $locker = array(); + $locker = []; // convert them foreach ($values as $path) { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/LockBase.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/LockBase.php index c7a32837a..7db3a4bcc 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/LockBase.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/LockBase.php @@ -62,7 +62,7 @@ class LockBase implements LockBaseInterface $values = GetHelper::allBetween( $script, 'LOCK'.'BASE64((((', '))))' ); - $locker = array(); + $locker = []; // convert them foreach ($values as $value) { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customview/Data.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customview/Data.php index 3e561dce1..709581696 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customview/Data.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customview/Data.php @@ -294,15 +294,7 @@ class Data $main_get = $this->dynamic->get( array($item->main_get), $item->code, $item->context ); - - if (ArrayHelper::check($main_get)) - { - $item->main_get = $main_get[0]; - } - else - { - $item->main_get = null; - } + $item->main_get = ArrayHelper::check($main_get) ? $main_get[0] : null; // set the custom_get data $item->custom_get = (isset($item->custom_get) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php index dc6a9c589..d6273b893 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php @@ -34,6 +34,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Service\Extension; use VDM\Joomla\Componentbuilder\Compiler\Service\Field; use VDM\Joomla\Componentbuilder\Compiler\Service\Joomlamodule; use VDM\Joomla\Componentbuilder\Compiler\Service\Joomlaplugin; +use VDM\Joomla\Componentbuilder\Compiler\Service\Utilities; use VDM\Joomla\Componentbuilder\Interfaces\FactoryInterface; @@ -136,7 +137,8 @@ abstract class Factory implements FactoryInterface ->registerServiceProvider(new Extension()) ->registerServiceProvider(new Field()) ->registerServiceProvider(new Joomlamodule()) - ->registerServiceProvider(new Joomlaplugin()); + ->registerServiceProvider(new Joomlaplugin()) + ->registerServiceProvider(new Utilities()); } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/DispenserInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/DispenserInterface.php index d5366d95e..5336ddae8 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/DispenserInterface.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/Customcode/DispenserInterface.php @@ -38,7 +38,7 @@ interface DispenserInterface * @since 3.2.0 */ public function set(&$script, string $first, ?string $second = null, ?string $third = null, - array $config = array(), bool $base64 = true, bool $dynamic = true, bool $add = false): bool; + array $config = [], bool $base64 = true, bool $dynamic = true, bool $add = false): bool; /** * Get the script from the customcode dispenser diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/History.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/History.php index 4f0922cde..2cfe3f84e 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/History.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/History.php @@ -170,7 +170,7 @@ class History implements HistoryInterface } else { - $version_note = array('component' => array()); + $version_note = array('component' => []); } // set watch switch ($action) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Builder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Builder.php new file mode 100644 index 000000000..68f63106f --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Builder.php @@ -0,0 +1,883 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Joomlamodule; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\Data as Module; +use VDM\Joomla\Componentbuilder\Compiler\Component; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Registry; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Folder; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\FileHelper; + + +/** + * Joomla Module Builder Class + * + * @since 3.2.0 + */ +class Builder +{ + /** + * Compiler Joomla Module Data Class + * + * @var Module + * @since 3.2.0 + */ + protected Module $module; + + /** + * Compiler Component + * + * @var Component + * @since 3.2.0 + **/ + protected Component $component; + + /** + * Compiler Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * The compiler registry + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * Compiler Customcode Dispenser + * + * @var Dispenser + * @since 3.2.0 + */ + protected Dispenser $dispenser; + + /** + * Compiler Event + * + * @var EventInterface + * @since 3.2.0 + */ + protected EventInterface $event; + + /** + * Compiler Counter + * + * @var Counter + * @since 3.2.0 + */ + protected Counter $counter; + + /** + * Compiler Utilities Folder + * + * @var Folder + * @since 3.2.0 + */ + protected Folder $folder; + + /** + * Compiler Utilities File + * + * @var File + * @since 3.2.0 + */ + protected File $file; + + /** + * Compiler Utilities Files + * + * @var Files + * @since 3.2.0 + */ + protected Files $files; + + /** + * Constructor + * + * @param Module|null $module The compiler Joomla module data object. + * @param Component|null $component The component class. + * @param Config|null $config The compiler config object. + * @param Registry|null $registry The compiler registry object. + * @param Dispenser|null $dispenser The compiler customcode dispenser object. + * @param EventInterface|null $event The compiler event api object. + * @param Counter|null $counter The compiler counter object. + * @param Folder|null $folder The compiler folder object. + * @param File|null $file The compiler file object. + * @param Files|null $files The compiler files object. + * + * @since 3.2.0 + */ + public function __construct(?Module $module = null, ?Component $component = null, + ?Config $config = null, ?Registry $registry = null, + ?Dispenser $dispenser = null, ?EventInterface $event = null, + ?Counter $counter = null, ?Folder $folder = null, + ?File $file = null, ?Files $files = null) + { + $this->module = $module ?: Compiler::_('Joomlamodule.Data'); + $this->component = $component ?: Compiler::_('Component'); + $this->config = $config ?: Compiler::_('Config'); + $this->registry = $registry ?: Compiler::_('Registry'); + $this->dispenser = $dispenser ?: Compiler::_('Customcode.Dispenser'); + $this->event = $event ?: Compiler::_('Event'); + $this->counter = $counter ?? Compiler::_('Utilities.Counter'); + $this->folder = $folder ?? Compiler::_('Utilities.Folder'); + $this->file = $file ?? Compiler::_('Utilities.File'); + $this->files = $files ?? Compiler::_('Utilities.Files'); + } + + /** + * Build the Modules files, folders, url's and config + * + * @return void + * @since 3.2.0 + */ + public function run() + { + if ($this->module->exists()) + { + // for plugin event TODO change event api signatures + $component_context = $this->config->component_context; + $modules = $this->module->get(); + // Trigger Event: jcb_ce_onBeforeSetModules + $this->event->trigger( + 'jcb_ce_onBeforeBuildModules', + array(&$component_context, &$modules) + ); + + foreach ($modules as $module) + { + if (ObjectHelper::check($module) + && isset($module->folder_name) + && StringHelper::check( + $module->folder_name + )) + { + // module path + $module->folder_path = $this->config->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/' + . $module->folder_name; + + // set the module paths + $this->registry->set('dynamic_paths.' . $module->key, $module->folder_path); + + // make sure there is no old build + $this->folder->remove($module->folder_path); + + // creat the main module folder + $this->folder->create($module->folder_path); + + // set main mod file + $fileDetails = array('path' => $module->folder_path . '/' + . $module->file_name . '.php', + 'name' => $module->file_name . '.php', + 'zip' => $module->file_name . '.php'); + $this->file->write( + $fileDetails['path'], + 'files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // set custom_get + if ($module->custom_get) + { + $fileDetails = array( + 'path' => $module->folder_path . '/data.php', + 'name' => 'data.php', + 'zip' => 'data.php' + ); + $this->file->write( + $fileDetails['path'], + 'official_name . ' Data' + . PHP_EOL . + ' */' . PHP_EOL . + "class " . $module->class_data_name + . ' extends \JObject' . PHP_EOL . + "{" . Placefix::_h('DYNAMICGETS') . "}" + . PHP_EOL + ); + $this->files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + } + + // set helper file + if ($module->add_class_helper >= 1) + { + $fileDetails = array('path' => $module->folder_path + . '/helper.php', + 'name' => 'helper.php', + 'zip' => 'helper.php'); + $this->file->write( + $fileDetails['path'], + 'files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + } + + // set main xml file + $fileDetails = array('path' => $module->folder_path . '/' + . $module->file_name . '.xml', + 'name' => $module->file_name . '.xml', + 'zip' => $module->file_name . '.xml'); + $this->file->write( + $fileDetails['path'], + $this->getXML($module) + ); + $this->files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // set tmpl folder + $this->folder->create($module->folder_path . '/tmpl'); + + // set default file + $fileDetails = array('path' => $module->folder_path + . '/tmpl/default.php', + 'name' => 'default.php', + 'zip' => 'tmpl/default.php'); + $this->file->write( + $fileDetails['path'], + 'files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // set install script if needed + if ($module->add_install_script) + { + $fileDetails = array('path' => $module->folder_path + . '/script.php', + 'name' => 'script.php', + 'zip' => 'script.php'); + $this->file->write( + $fileDetails['path'], + 'files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + } + + // set readme if found + if ($module->addreadme) + { + $fileDetails = array('path' => $module->folder_path + . '/README.md', + 'name' => 'README.md', + 'zip' => 'README.md'); + $this->file->write($fileDetails['path'], $module->readme); + $this->files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + } + + // set the folders target path + $target_path = ''; + if ($module->target_client === 'administrator') + { + $target_path = '/administrator'; + } + + // check if we have custom fields needed for scripts + $module->add_scripts_field = false; + $field_script_bucket = []; + + // add any css from the fields + if (($css = $this->dispenser->get( + 'css_view', $module->key + )) !== null + && StringHelper::check($css)) + { + // make sure this script does not have PHP + if (strpos((string) $css, 'add_scripts_field = true; + + // create the css folder + $this->folder->create($module->folder_path . '/css'); + + // add the CSS file + $fileDetails = array('path' => $module->folder_path + . '/css/mod_admin.css', + 'name' => 'mod_admin.css', + 'zip' => 'mod_admin.css'); + $this->file->write( + $fileDetails['path'], + Placefix::_h('BOM') . PHP_EOL + . PHP_EOL . $css + ); + $this->files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // add the field script + $field_script_bucket[] = Indent::_(2) . "//" + . Line::_(__Line__, __Class__) . " Custom CSS"; + $field_script_bucket[] = Indent::_(2) + . "\$document->addStyleSheet('" . $target_path + . "/modules/" . $module->folder_name + . "/css/mod_admin.css', ['version' => 'auto', 'relative' => true]);"; + } + } + + // add any JavaScript from the fields + if (($javascript = $this->dispenser->get( + 'view_footer', $module->key + )) !== null + && StringHelper::check($javascript)) + { + // make sure this script does not have PHP + if (strpos((string) $javascript, 'add_scripts_field = true; + + // add the JavaScript file + $this->folder->create($module->folder_path . '/js'); + + // add the CSS file + $fileDetails = array('path' => $module->folder_path + . '/js/mod_admin.js', + 'name' => 'mod_admin.js', + 'zip' => 'mod_admin.js'); + $this->file->write( + $fileDetails['path'], + Placefix::_h('BOM') . PHP_EOL + . PHP_EOL . $javascript + ); + $this->files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // add the field script + $field_script_bucket[] = Indent::_(2) . "//" + . Line::_(__Line__, __Class__) . " Custom JS"; + $field_script_bucket[] = Indent::_(2) + . "\$document->addScript('" . $target_path + . "/modules/" . $module->folder_name + . "/js/mod_admin.js', ['version' => 'auto', 'relative' => true]);"; + } + } + + // set fields folders if needed + if ($module->add_scripts_field + || (isset($module->fields_rules_paths) + && $module->fields_rules_paths == 2)) + { + // create fields folder + $this->folder->create($module->folder_path . '/fields'); + + // add the custom script field + if ($module->add_scripts_field) + { + $fileDetails = [ + 'path' => $module->folder_path + . '/fields/modadminvvvvvvvdm.php', + 'name' => 'modadminvvvvvvvdm.php', + 'zip' => 'modadminvvvvvvvdm.php' + ]; + $this->file->write( + $fileDetails['path'], + $this->getCustomScriptField( + $field_script_bucket + ) + ); + $this->files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + } + } + + // set rules folders if needed + if (isset($module->fields_rules_paths) + && $module->fields_rules_paths == 2) + { + // create rules folder + $this->folder->create($module->folder_path . '/rules'); + } + + // set forms folder if needed + if (isset($module->form_files) + && ArrayHelper::check( + $module->form_files + )) + { + // create forms folder + $this->folder->create($module->folder_path . '/forms'); + + // set the template files + foreach ($module->form_files as $file => $fields) + { + // set file details + $fileDetails = array('path' => $module->folder_path + . '/forms/' . $file . '.xml', + 'name' => $file . '.xml', + 'zip' => 'forms/' . $file + . '.xml'); + + // build basic XML + $xml = ''; + $xml .= PHP_EOL . ''; + + // search if we must add the component path + $add_component_path = false; + foreach ($fields as $field_name => $fieldsets) + { + if (!$add_component_path) + { + foreach ($fieldsets as $fieldset => $field) + { + if (!$add_component_path + && isset( + $module->fieldsets_paths[$file + . $field_name . $fieldset] + ) + && $module->fieldsets_paths[$file + . $field_name . $fieldset] == 1) + { + $add_component_path = true; + } + } + } + } + + // only add if part of the component field types path is required + if ($add_component_path) + { + $xml .= PHP_EOL . ''; + } + else + { + $xml .= PHP_EOL . '
'; + } + + // add the fields + foreach ($fields as $field_name => $fieldsets) + { + // check if we have an double fields naming set + $field_name_inner = ''; + $field_name_outer = $field_name; + if (strpos((string) $field_name, '.') !== false) + { + $field_names = explode('.', (string) $field_name); + if (count((array) $field_names) == 2) + { + $field_name_outer = $field_names[0]; + $field_name_inner = $field_names[1]; + } + } + $xml .= PHP_EOL . Indent::_(1) + . ''; + foreach ($fieldsets as $fieldset => $field) + { + // default to the field set name + $label = $fieldset; + if (isset($module->fieldsets_label[$file . $field_name . $fieldset])) + { + $label = $module->fieldsets_label[$file . $field_name . $fieldset]; + } + + // add path to module rules and custom fields + if (isset($module->fieldsets_paths[$file . $field_name . $fieldset]) + && ($module->fieldsets_paths[$file . $field_name . $fieldset] == 2 + || $module->fieldsets_paths[$file . $field_name . $fieldset] == 3)) + { + if ($module->target == 2) + { + if (!isset($module->add_rule_path[$file . $field_name . $fieldset])) + { + $module->add_rule_path[$file . $field_name . $fieldset] = + '/administrator/modules/' + . $module->file_name . '/rules'; + } + + if (!isset($module->add_field_path[$file . $field_name . $fieldset])) + { + $module->add_field_path[$file . $field_name . $fieldset] = + '/administrator/modules/' + . $module->file_name . '/fields'; + } + } + else + { + if (!isset($module->add_rule_path[$file . $field_name . $fieldset])) + { + $module->add_rule_path[$file . $field_name . $fieldset] = + '/modules/' . $module->file_name + . '/rules'; + } + + if (!isset($module->add_field_path[$file . $field_name . $fieldset])) + { + $module->add_field_path[$file . $field_name . $fieldset] = + '/modules/' . $module->file_name + . '/fields'; + } + } + } + + // add path to module rules and custom fields + if (isset($module->add_rule_path[$file . $field_name . $fieldset]) + || isset($module->add_field_path[$file . $field_name . $fieldset])) + { + + $xml .= PHP_EOL . Indent::_(1) . ''; + + $xml .= PHP_EOL . Indent::_(1) . '
add_rule_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . Indent::_(2) + . 'addrulepath="' . $module->add_rule_path[$file . $field_name . $fieldset] . '"'; + } + + if (isset($module->add_field_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . Indent::_(2) + . 'addfieldpath="' . $module->add_field_path[$file . $field_name . $fieldset] . '"'; + } + + $xml .= PHP_EOL . Indent::_(1) . '>'; + } + else + { + $xml .= PHP_EOL . Indent::_(1) . '
'; + } + + // check if we have an inner field set + if (StringHelper::check( + $field_name_inner + )) + { + $xml .= PHP_EOL . Indent::_(1) + . ''; + } + + // add the placeholder of the fields + $xml .= Placefix::_h('FIELDSET_' . $file + . $field_name . $fieldset ); + + // check if we have an inner field set + if (StringHelper::check( + $field_name_inner + )) + { + $xml .= PHP_EOL . Indent::_(1) + . ''; + } + $xml .= PHP_EOL . Indent::_(1) + . '
'; + } + $xml .= PHP_EOL . Indent::_(1) . ''; + } + $xml .= PHP_EOL . ''; + + // add xml to file + $this->file->write($fileDetails['path'], $xml); + $this->files->appendArray($module->key, $fileDetails); + + // count the file created + $this->counter->file++; + } + } + + // set SQL stuff if needed + if ($module->add_sql || $module->add_sql_uninstall) + { + // create SQL folder + $this->folder->create($module->folder_path . '/sql'); + + // create mysql folder + $this->folder->create( + $module->folder_path . '/sql/mysql' + ); + + // now set the install file + if ($module->add_sql) + { + $this->file->write( + $module->folder_path . '/sql/mysql/install.sql', + $module->sql + ); + + // count the file created + $this->counter->file++; + } + + // now set the uninstall file + if ($module->add_sql_uninstall) + { + $this->file->write( + $module->folder_path + . '/sql/mysql/uninstall.sql', + $module->sql_uninstall + ); + + // count the file created + $this->counter->file++; + } + } + + // creat the language folder + $this->folder->create($module->folder_path . '/language'); + // also create the lang tag folder + $this->folder->create( + $module->folder_path . '/language/' . $this->config->get('lang_tag', 'en-GB') + ); + + // check if this lib has files + if (isset($module->files) + && ArrayHelper::check($module->files)) + { + // add to component files + foreach ($module->files as $file) + { + // set the pathfinder + $file['target_type'] = $module->target_type; + $file['target_id'] = $module->id; + $this->component->appendArray('files', $file); + } + } + + // check if this lib has folders + if (isset($module->folders) + && ArrayHelper::check($module->folders)) + { + // add to component folders + foreach ($module->folders as $folder) + { + // set the pathfinder + $folder['target_type'] = $module->target_type; + $folder['target_id'] = $module->id; + $this->component->appendArray('folders', $folder); + } + } + + // check if this module has urls + if (isset($module->urls) + && ArrayHelper::check($module->urls)) + { + // add to component urls + foreach ($module->urls as $n => &$url) + { + // should we add the local folder + if (isset($url['type']) && $url['type'] > 1 + && isset($url['url']) + && StringHelper::check( + $url['url'] + )) + { + // set file name + $fileName = basename((string) $url['url']); + + // get the file contents + $data = FileHelper::getContent( + $url['url'] + ); + + // build sub path + if (strpos($fileName, '.js') !== false) + { + $path = '/js'; + } + elseif (strpos($fileName, '.css') !== false) + { + $path = '/css'; + } + else + { + $path = ''; + } + + // create sub media path if not set + $this->folder->create( + $module->folder_path . $path + ); + + // set the path to module file + $url['path'] = $module->folder_path . $path + . '/' . $fileName; // we need this for later + + // write data to path + $this->file->write($url['path'], $data); + + // count the file created + $this->counter->file++; + } + } + } + } + } + } + } + + /** + * get the module xml template + * + * @param object $module The module object + * + * @return string + * @since 3.2.0 + */ + protected function getXML(object &$module): string + { + $xml = ''; + $xml .= PHP_EOL . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $module->lang_prefix + . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('BUILDDATE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOR') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOREMAIL') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHORWEBSITE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('COPYRIGHT') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('LICENSE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $module->module_version + . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $module->lang_prefix + . '_XML_DESCRIPTION'; + $xml .= Placefix::_h('MAINXML'); + $xml .= PHP_EOL . ''; + + return $xml; + } + + /** + * get the module admin custom script field + * + * @param array $fieldScriptBucket The field + * + * @return string + * @since 3.2.0 + * + */ + protected function getCustomScriptField(array $fieldScriptBucket): string + { + $form_field_class = []; + $form_field_class[] = Placefix::_h('BOM') . PHP_EOL; + $form_field_class[] = "//" . Line::_(__Line__, __Class__) + . " No direct access to this file"; + $form_field_class[] = "defined('_JEXEC') or die('Restricted access');"; + $form_field_class[] = PHP_EOL . "use Joomla\CMS\Form\FormField;"; + $form_field_class[] = "use Joomla\CMS\Factory;"; + $form_field_class[] = PHP_EOL + . "class JFormFieldModadminvvvvvvvdm extends FormField"; + $form_field_class[] = "{"; + $form_field_class[] = Indent::_(1) + . "protected \$type = 'modadminvvvvvvvdm';"; + $form_field_class[] = PHP_EOL . Indent::_(1) + . "protected function getLabel()"; + $form_field_class[] = Indent::_(1) . "{"; + $form_field_class[] = Indent::_(2) . "return;"; + $form_field_class[] = Indent::_(1) . "}"; + $form_field_class[] = PHP_EOL . Indent::_(1) + . "protected function getInput()"; + $form_field_class[] = Indent::_(1) . "{"; + $form_field_class[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Get the document"; + $form_field_class[] = Indent::_(2) + . "\$document = Factory::getDocument();"; + $form_field_class[] = implode(PHP_EOL, $fieldScriptBucket); + $form_field_class[] = Indent::_(2) . "return; // noting for now :)"; + $form_field_class[] = Indent::_(1) . "}"; + $form_field_class[] = "}"; + + return implode(PHP_EOL, $form_field_class); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Data.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Data.php index 236a1d252..ccee1a8d5 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Data.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Data.php @@ -744,17 +744,17 @@ class Data if (!isset($module->form_files[$form['file']])) { $module->form_files[$form['file']] - = array(); + = []; } if (!isset($module->form_files[$form['file']][$form['fields_name']])) { $module->form_files[$form['file']][$form['fields_name']] - = array(); + = []; } if (!isset($module->form_files[$form['file']][$form['fields_name']][$form['fieldset']])) { $module->form_files[$form['file']][$form['fields_name']][$form['fieldset']] - = array(); + = []; } // do some house cleaning (for fields) foreach ($form['fields'] as $field) @@ -776,12 +776,12 @@ class Data if (!isset($module->config_fields[$form['fields_name']])) { $module->config_fields[$form['fields_name']] - = array(); + = []; } if (!isset($module->config_fields[$form['fields_name']][$form['fieldset']])) { $module->config_fields[$form['fields_name']][$form['fieldset']] - = array(); + = []; } // do some house cleaning (for fields) foreach ($form['fields'] as $field) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Builder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Builder.php new file mode 100644 index 000000000..eaa1d5858 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Builder.php @@ -0,0 +1,626 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\Data as Plugin; +use VDM\Joomla\Componentbuilder\Compiler\Component; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Registry; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Folder; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\FileHelper; + + +/** + * Joomla Plugin Builder Class + * + * @since 3.2.0 + */ +class Builder +{ + /** + * Compiler Joomla Plugin Data Class + * + * @var Plugin + * @since 3.2.0 + */ + protected Plugin $plugin; + + /** + * Compiler Component + * + * @var Component + * @since 3.2.0 + **/ + protected Component $component; + + /** + * Compiler Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * The compiler registry + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * Compiler Customcode Dispenser + * + * @var Dispenser + * @since 3.2.0 + */ + protected Dispenser $dispenser; + + /** + * Compiler Event + * + * @var EventInterface + * @since 3.2.0 + */ + protected EventInterface $event; + + /** + * Compiler Counter + * + * @var Counter + * @since 3.2.0 + */ + protected Counter $counter; + + /** + * Compiler Utilities Folder + * + * @var Folder + * @since 3.2.0 + */ + protected Folder $folder; + + /** + * Compiler Utilities File + * + * @var File + * @since 3.2.0 + */ + protected File $file; + + /** + * Compiler Utilities Files + * + * @var Files + * @since 3.2.0 + */ + protected Files $files; + + /** + * Constructor + * + * @param Plugin|null $plugin The compiler Joomla plugin data object. + * @param Component|null $component The component class. + * @param Config|null $config The compiler config object. + * @param Registry|null $registry The compiler registry object. + * @param Dispenser|null $dispenser The compiler customcode dispenser object. + * @param EventInterface|null $event The compiler event api object. + * @param Counter|null $counter The compiler counter object. + * @param Folder|null $folder The compiler folder object. + * @param File|null $file The compiler file object. + * @param Files|null $files The compiler files object. + * + * @since 3.2.0 + */ + public function __construct(?Plugin $plugin = null, ?Component $component = null, + ?Config $config = null, ?Registry $registry = null, + ?Dispenser $dispenser = null, ?EventInterface $event = null, + ?Counter $counter = null, ?Folder $folder = null, + ?File $file = null, ?Files $files = null) + { + $this->plugin = $plugin ?: Compiler::_('Joomlaplugin.Data'); + $this->component = $component ?: Compiler::_('Component'); + $this->config = $config ?: Compiler::_('Config'); + $this->registry = $registry ?: Compiler::_('Registry'); + $this->dispenser = $dispenser ?: Compiler::_('Customcode.Dispenser'); + $this->event = $event ?: Compiler::_('Event'); + $this->counter = $counter ?? Compiler::_('Utilities.Counter'); + $this->folder = $folder ?? Compiler::_('Utilities.Folder'); + $this->file = $file ?? Compiler::_('Utilities.File'); + $this->files = $files ?? Compiler::_('Utilities.Files'); + } + + /** + * Build the Plugins files, folders, url's and config + * + * @return void + * @since 3.2.0 + */ + public function run() + { + if ($this->plugin->exists()) + { + // for plugin event TODO change event api signatures + $component_context = $this->config->component_context; + $plugins = $this->plugin->get(); + // Trigger Event: jcb_ce_onBeforeSetPlugins + $this->event->trigger( + 'jcb_ce_onBeforeBuildPlugins', + array(&$component_context, &$plugins) + ); + foreach ($plugins as $plugin) + { + if (ObjectHelper::check($plugin) + && isset($plugin->folder_name) + && StringHelper::check( + $plugin->folder_name + )) + { + // plugin path + $plugin->folder_path = $this->config->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/' + . $plugin->folder_name; + + // set the plugin paths + $this->registry->set('dynamic_paths.' . $plugin->key, $plugin->folder_path); + + // make sure there is no old build + $this->folder->remove($plugin->folder_path); + + // creat the main component folder + $this->folder->create($plugin->folder_path); + + // set main class file + $fileDetails = array('path' => $plugin->folder_path . '/' + . $plugin->file_name . '.php', + 'name' => $plugin->file_name . '.php', + 'zip' => $plugin->file_name . '.php'); + $this->file->write( + $fileDetails['path'], + 'files->appendArray($plugin->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // set main xml file + $fileDetails = array('path' => $plugin->folder_path . '/' + . $plugin->file_name . '.xml', + 'name' => $plugin->file_name . '.xml', + 'zip' => $plugin->file_name . '.xml'); + $this->file->write( + $fileDetails['path'], + $this->getXML($plugin) + ); + $this->files->appendArray($plugin->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // set install script if needed + if ($plugin->add_install_script) + { + $fileDetails = array('path' => $plugin->folder_path + . '/script.php', + 'name' => 'script.php', + 'zip' => 'script.php'); + $this->file->write( + $fileDetails['path'], + 'files->appendArray($plugin->key, $fileDetails); + + // count the file created + $this->counter->file++; + } + + // set readme if found + if ($plugin->addreadme) + { + $fileDetails = array('path' => $plugin->folder_path + . '/README.md', + 'name' => 'README.md', + 'zip' => 'README.md'); + $this->file->write($fileDetails['path'], $plugin->readme); + $this->files->appendArray($plugin->key, $fileDetails); + + // count the file created + $this->counter->file++; + } + + // set fields & rules folders if needed + if (isset($plugin->fields_rules_paths) + && $plugin->fields_rules_paths == 2) + { + // create fields folder + $this->folder->create($plugin->folder_path . '/fields'); + + // create rules folder + $this->folder->create($plugin->folder_path . '/rules'); + } + + // set forms folder if needed + if (isset($plugin->form_files) + && ArrayHelper::check( + $plugin->form_files + )) + { + // create forms folder + $this->folder->create($plugin->folder_path . '/forms'); + + // set the template files + foreach ($plugin->form_files as $file => $fields) + { + // set file details + $fileDetails = array('path' => $plugin->folder_path + . '/forms/' . $file . '.xml', + 'name' => $file . '.xml', + 'zip' => 'forms/' . $file + . '.xml'); + + // build basic XML + $xml = ''; + $xml .= PHP_EOL . ''; + + // search if we must add the component path + $add_component_path = false; + foreach ($fields as $field_name => $fieldsets) + { + if (!$add_component_path) + { + foreach ($fieldsets as $fieldset => $field) + { + if (!$add_component_path + && isset( + $plugin->fieldsets_paths[$file + . $field_name . $fieldset] + ) + && $plugin->fieldsets_paths[$file + . $field_name . $fieldset] == 1) + { + $add_component_path = true; + } + } + } + } + + // only add if part of the component field types path is required + if ($add_component_path) + { + $xml .= PHP_EOL . ''; + } + else + { + $xml .= PHP_EOL . '
'; + } + + // add the fields + foreach ($fields as $field_name => $fieldsets) + { + // check if we have an double fields naming set + $field_name_inner = ''; + $field_name_outer = $field_name; + if (strpos((string) $field_name, '.') !== false) + { + $field_names = explode('.', (string) $field_name); + if (count((array) $field_names) == 2) + { + $field_name_outer = $field_names[0]; + $field_name_inner = $field_names[1]; + } + } + $xml .= PHP_EOL . Indent::_(1) + . ''; + foreach ($fieldsets as $fieldset => $field) + { + // default to the field set name + $label = $fieldset; + if (isset($plugin->fieldsets_label[$file . $field_name . $fieldset])) + { + $label = $plugin->fieldsets_label[$file . $field_name . $fieldset]; + } + + // add path to plugin rules and custom fields + if (isset($plugin->fieldsets_paths[$file . $field_name . $fieldset]) + && ($plugin->fieldsets_paths[$file . $field_name . $fieldset] == 2 + || $plugin->fieldsets_paths[$file . $field_name . $fieldset] == 3)) + { + if (!isset($plugin->add_rule_path[$file . $field_name . $fieldset])) + { + $plugin->add_rule_path[$file . $field_name . $fieldset] = + '/plugins/' . strtolower((string) $plugin->group + ) . '/' . strtolower((string) $plugin->code_name) + . '/rules'; + } + + if (!isset($plugin->add_field_path[$file . $field_name . $fieldset])) + { + $plugin->add_field_path[$file . $field_name . $fieldset] = + '/plugins/' . strtolower((string) $plugin->group + ) . '/' . strtolower((string) $plugin->code_name) + . '/fields'; + } + } + + // add path to plugin rules and custom fields + if (isset($plugin->add_rule_path[$file . $field_name . $fieldset]) + || isset($plugin->add_field_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . Indent::_(1) . ''; + + $xml .= PHP_EOL . Indent::_(1) . '
add_rule_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . Indent::_(2) + . 'addrulepath="' . $plugin->add_rule_path[$file . $field_name . $fieldset] . '"'; + } + + if (isset($plugin->add_field_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . Indent::_(2) + . 'addfieldpath="' . $plugin->add_field_path[$file . $field_name . $fieldset] . '"'; + } + + $xml .= PHP_EOL . Indent::_(1) . '>'; + } + else + { + $xml .= PHP_EOL . Indent::_(1) . '
'; + } + + // check if we have an inner field set + if (StringHelper::check( + $field_name_inner + )) + { + $xml .= PHP_EOL . Indent::_(1) + . ''; + } + + // add the placeholder of the fields + $xml .= Placefix::_h('FIELDSET_' . $file + . $field_name . $fieldset ); + + // check if we have an inner field set + if (StringHelper::check( + $field_name_inner + )) + { + $xml .= PHP_EOL . Indent::_(1) + . ''; + } + $xml .= PHP_EOL . Indent::_(1) + . '
'; + } + $xml .= PHP_EOL . Indent::_(1) . ''; + } + $xml .= PHP_EOL . ''; + + // add xml to file + $this->file->write($fileDetails['path'], $xml); + $this->files->appendArray($plugin->key, $fileDetails); + + // count the file created + $this->counter->file++; + } + } + + // set SQL stuff if needed + if ($plugin->add_sql || $plugin->add_sql_uninstall) + { + // create SQL folder + $this->folder->create($plugin->folder_path . '/sql'); + + // create mysql folder + $this->folder->create( + $plugin->folder_path . '/sql/mysql' + ); + + // now set the install file + if ($plugin->add_sql) + { + $this->file->write( + $plugin->folder_path . '/sql/mysql/install.sql', + $plugin->sql + ); + + // count the file created + $this->counter->file++; + } + + // now set the uninstall file + if ($plugin->add_sql_uninstall) + { + $this->file->write( + $plugin->folder_path + . '/sql/mysql/uninstall.sql', + $plugin->sql_uninstall + ); + + // count the file created + $this->counter->file++; + } + } + + // creat the language folder path + $this->folder->create($plugin->folder_path . '/language'); + + // also creat the lang tag folder path + $this->folder->create( + $plugin->folder_path . '/language/' . $this->config->get('lang_tag', 'en-GB') + ); + + // check if this lib has files + if (isset($plugin->files) + && ArrayHelper::check($plugin->files)) + { + // add to component files + foreach ($plugin->files as $file) + { + // set the path finder + $file['target_type'] = $plugin->target_type; + $file['target_id'] = $plugin->id; + $this->component->appendArray('files', $file); + } + } + + // check if this lib has folders + if (isset($plugin->folders) + && ArrayHelper::check($plugin->folders)) + { + // add to component folders + foreach ($plugin->folders as $folder) + { + // set the path finder + $folder['target_type'] = $plugin->target_type; + $folder['target_id'] = $plugin->id; + $this->component->appendArray('folders', $folder); + } + } + + // check if this plugin has urls + if (isset($plugin->urls) + && ArrayHelper::check($plugin->urls)) + { + // add to component urls + foreach ($plugin->urls as $n => &$url) + { + // should we add the local folder + if (isset($url['type']) && $url['type'] > 1 + && isset($url['url']) + && StringHelper::check( + $url['url'] + )) + { + // set file name + $fileName = basename((string) $url['url']); + + // get the file contents + $data = FileHelper::getContent( + $url['url'] + ); + + // build sub path + if (strpos($fileName, '.js') !== false) + { + $path = '/js'; + } + elseif (strpos($fileName, '.css') !== false) + { + $path = '/css'; + } + else + { + $path = ''; + } + + // create sub media media folder path if not set + $this->folder->create( + $plugin->folder_path . $path + ); + + // set the path to plugin file + $url['path'] = $plugin->folder_path . $path + . '/' . $fileName; // we need this for later + + // write data to path + $this->file->write($url['path'], $data); + + // count the file created + $this->counter->file++; + } + } + } + } + } + } + } + + /** + * get the plugin xml template + * + * @param object $module The plugin object + * + * @return string + * @since 3.2.0 + */ + protected function getXML(object &$plugin): string + { + $xml = ''; + $xml .= PHP_EOL . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $plugin->lang_prefix + . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('BUILDDATE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOR') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOREMAIL') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHORWEBSITE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('COPYRIGHT') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('LICENSE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $plugin->plugin_version + . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $plugin->lang_prefix + . '_XML_DESCRIPTION'; + $xml .= Placefix::_h('MAINXML'); + $xml .= PHP_EOL . ''; + + return $xml; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php index fec5eeb68..1743d1052 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php @@ -669,17 +669,17 @@ class Data if (!isset($plugin->form_files[$form['file']])) { $plugin->form_files[$form['file']] - = array(); + = []; } if (!isset($plugin->form_files[$form['file']][$form['fields_name']])) { $plugin->form_files[$form['file']][$form['fields_name']] - = array(); + = []; } if (!isset($plugin->form_files[$form['file']][$form['fields_name']][$form['fieldset']])) { $plugin->form_files[$form['file']][$form['fields_name']][$form['fieldset']] - = array(); + = []; } // do some house cleaning (for fields) foreach ($form['fields'] as $field) @@ -701,12 +701,12 @@ class Data if (!isset($plugin->config_fields[$form['fields_name']])) { $plugin->config_fields[$form['fields_name']] - = array(); + = []; } if (!isset($plugin->config_fields[$form['fields_name']][$form['fieldset']])) { $plugin->config_fields[$form['fields_name']][$form['fieldset']] - = array(); + = []; } // do some house cleaning (for fields) foreach ($form['fields'] as $field) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language/Extractor.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language/Extractor.php index fbb586466..6d47abce1 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language/Extractor.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language/Extractor.php @@ -112,11 +112,11 @@ class Extractor // insure string is not broken $content = $this->placeholder->update_($content); // reset some buckets - $lang_holders = array(); - $lang_check = array(); - $lang_only = array(); - $js_text = array(); - $sc_text = array(); + $lang_holders = []; + $lang_check = []; + $lang_only = []; + $js_text = []; + $sc_text = []; // first get the Joomla .JText._() if (in_array('Joomla' . '.JText._(', $lang_string_targets)) { diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Library/Builder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Library/Builder.php new file mode 100644 index 000000000..53fa6aa0e --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Library/Builder.php @@ -0,0 +1,318 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Library; + + +use Joomla\CMS\Filesystem\Folder as JoomlaFolder; +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Registry; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; +use VDM\Joomla\Componentbuilder\Compiler\Component; +use VDM\Joomla\Componentbuilder\Compiler\Content; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Paths; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Folder; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\FileHelper; + + +/** + * Library Builder Class + * + * @since 3.2.0 + */ +class Builder +{ + /** + * Compiler Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * The compiler registry + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * Compiler Event + * + * @var EventInterface + * @since 3.2.0 + */ + protected EventInterface $event; + + /** + * Compiler Component + * + * @var Component + * @since 3.2.0 + **/ + protected Component $component; + + /** + * Compiler Content + * + * @var Content + * @since 3.2.0 + **/ + protected Content $content; + + /** + * Compiler Counter + * + * @var Counter + * @since 3.2.0 + */ + protected Counter $counter; + + /** + * Compiler Utilities Paths + * + * @var Paths + * @since 3.2.0 + */ + protected Paths $paths; + + /** + * Compiler Utilities Folder + * + * @var Folder + * @since 3.2.0 + */ + protected Folder $folder; + + /** + * Compiler Utilities File + * + * @var File + * @since 3.2.0 + */ + protected File $file; + + /** + * Constructor + * + * @param Config|null $config The compiler config object. + * @param Registry|null $registry The compiler registry object. + * @param EventInterface|null $event The compiler event api object. + * @param Component|null $component The component class. + * @param Content|null $content The compiler content object. + * @param Counter|null $counter The compiler counter object. + * @param Paths|null $paths The compiler paths object. + * @param Folder|null $folder The compiler folder object. + * @param File|null $file The compiler file object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Registry $registry = null, + ?EventInterface $event = null, ?Component $component = null, + ?Content $content = null,?Counter $counter = null, + ?Paths $paths = null, ?Folder $folder = null, + ?File $file = null) + { + $this->config = $config ?: Compiler::_('Config'); + $this->registry = $registry ?: Compiler::_('Registry'); + $this->event = $event ?: Compiler::_('Event'); + $this->component = $component ?: Compiler::_('Component'); + $this->content = $content ?: Compiler::_('Content'); + $this->counter = $counter ?: Compiler::_('Utilities.Counter'); + $this->paths = $paths ?: Compiler::_('Utilities.Paths'); + $this->folder = $folder ?: Compiler::_('Utilities.Folder'); + $this->file = $file ?: Compiler::_('Utilities.File'); + } + + /** + * Build the Libraries files, folders, url's and config + * + * @return void + * @since 3.2.0 + */ + public function run() + { + if (($libraries_ = $this->registry->get('builder.libraries')) !== null) + { + // for plugin event TODO change event api signatures + $component_context = $this->config->component_context; + + // Trigger Event: jcb_ce_onBeforeSetLibraries + $this->event->trigger( + 'jcb_ce_onBeforeSetLibraries', + array(&$component_context, &$libraries_) + ); + + // creat the main component folder + if (!JoomlaFolder::exists($this->paths->component_path)) + { + JoomlaFolder::create($this->paths->component_path); + + // count the folder created + $this->counter->folder++; + $this->file->html(''); + } + + // create media path if not set + $this->folder->create($this->paths->component_path . '/media'); + foreach ($libraries_ as $id => &$library) + { + if (ObjectHelper::check($library)) + { + // check if this lib has files + if (isset($library->files) + && ArrayHelper::check($library->files)) + { + // add to component files + foreach ($library->files as $file) + { + $this->component->appendArray('files', $file); + } + } + + // check if this lib has folders + if (isset($library->folders) + && ArrayHelper::check( + $library->folders + )) + { + // add to component folders + foreach ($library->folders as $folder) + { + $this->component->appendArray('folders', $folder); + } + } + + // check if this lib has urls + if (isset($library->urls) + && ArrayHelper::check($library->urls)) + { + // build media folder path + $libFolder = strtolower( + preg_replace( + '/\s+/', '-', + (string) StringHelper::safe( + $library->name, 'filename', ' ', false + ) + ) + ); + $mediaPath = '/media/' . $libFolder; + + // should we add the local folder + $addLocalFolder = false; + + // add to component urls + foreach ($library->urls as $n => &$url) + { + if (isset($url['type']) && $url['type'] > 1 + && isset($url['url']) + && StringHelper::check( + $url['url'] + )) + { + // create media/lib path if not set + $this->folder->create( + $this->paths->component_path . $mediaPath + ); + + // add local folder + $addLocalFolder = true; + + // set file name + $fileName = basename((string) $url['url']); + + // get the file contents + $data = FileHelper::getContent( + $url['url'] + ); + + // build sub path + if (strpos($fileName, '.js') !== false) + { + $path = '/js'; + } + elseif (strpos($fileName, '.css') !== false) + { + $path = '/css'; + } + else + { + $path = ''; + } + + // create sub media path if not set + $this->folder->create( + $this->paths->component_path . $mediaPath . $path + ); + + // set the path to library file + $url['path'] = $mediaPath . $path . '/' + . $fileName; // we need this for later + + // set full path + $path = $this->paths->component_path . $url['path']; + + // write data to path + $this->file->write($path, $data); + + // count the file created + $this->counter->file++; + } + } + + // only add if local + if ($addLocalFolder) + { + // add folder to xml of media folders + $this->content->add('EXSTRA_MEDIA_FOLDERS', + PHP_EOL . Indent::_(2) . "" + . $libFolder . ""); + } + } + + // if config fields are found load into component config (avoiding duplicates) + if (isset($library->how) && $library->how > 1 + && isset($library->config) + && ArrayHelper::check($library->config)) + { + foreach ($library->config as $cofig) + { + $found = array_filter( + $this->component->get('config'), + fn($item) => $item['field'] == $cofig['field'] + ); + + // set the config data if not found + if (!ArrayHelper::check($found)) + { + $this->component->appendArray('config', $cofig); + } + } + } + + // update the global value just in case for now + $this->registry->set("builder.libraries.$id", $library); + } + } + } + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Dynamicget.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Dynamicget.php index 2e2ccda3c..4b218a239 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Dynamicget.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Dynamicget.php @@ -283,7 +283,7 @@ class Dynamicget // build relationship $_relationship = array_map( function ($op) use (&$_part_of_a) { - $bucket = array(); + $bucket = []; // array(on_field_as, on_field) $bucket['on_field'] = array_map( 'trim', @@ -386,11 +386,11 @@ class Dynamicget )) { // start the part of a table bucket - $_part_of_a = array(); + $_part_of_a = []; // build relationship $_relationship = array_map( function ($op) use (&$_part_of_a) { - $bucket = array(); + $bucket = []; // array(on_field_as, on_field) $bucket['on_field'] = array_map( 'trim', diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Fields.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Fields.php index 75a58578f..d7fe61d64 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Fields.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Fields.php @@ -272,7 +272,7 @@ class Fields && 'tag' !== $field['settings']->type_name) { // build temp field bucket - $tmpfield = array(); + $tmpfield = []; $tmpfield['settings'] = new \stdClass(); // convert the xml json string to normal string diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Sqldump.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Sqldump.php index 794fe31b0..e6ed67572 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Sqldump.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Sqldump.php @@ -94,8 +94,8 @@ class Sqldump if (ArrayHelper::check($fields)) { // reset array buckets - $sourceArray = array(); - $targetArray = array(); + $sourceArray = []; + $targetArray = []; foreach ($fields as $field) { if (strpos($field, "=>") !== false) @@ -148,8 +148,8 @@ class Sqldump if (ArrayHelper::check($fields)) { // reset array buckets - $sourceArray = array(); - $targetArray = array(); + $sourceArray = []; + $targetArray = []; foreach ($fields as $field) { if (strpos($field, "=>") !== false) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Sqltweaking.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Sqltweaking.php index b26729152..960f6076d 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Sqltweaking.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Sqltweaking.php @@ -110,7 +110,7 @@ class Sqltweaking if (2 == $setting['add_sql_options']) { // rest always - $id_array = array(); + $id_array = []; // by id (first remove backups) $ids = $setting['ids']; @@ -126,7 +126,7 @@ class Sqltweaking { $id_array[] = trim((string) $ids); } - $id_array_new = array(); + $id_array_new = []; // check for ranges foreach ($id_array as $key => $id) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder/Reverse.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder/Reverse.php index fcb0b028b..9c866ab3e 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder/Reverse.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder/Reverse.php @@ -131,7 +131,7 @@ class Reverse if (ArrayHelper::check($lang_string_targets)) { // start lang holder - $lang_holders = array(); + $lang_holders = []; // set the lang for both since we don't know what area is being targeted $_tmp = $this->config->lang_target; // set the lang based on target diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php index bd785fee2..ca84d6e6e 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php @@ -542,7 +542,7 @@ class Power implements PowerInterface $this->active[$guid]->use_selection )) ? json_decode((string) $this->active[$guid]->use_selection, true) : null; - if ($this->active[$guid]->use_selection) + if (ArrayHelper::check($this->active[$guid]->use_selection)) { $use = array_values(array_map(function ($u) use(&$as) { // track the AS options @@ -551,6 +551,10 @@ class Power implements PowerInterface return $u['use']; }, $this->active[$guid]->use_selection)); } + else + { + $this->active[$guid]->use_selection = null; + } } /** @@ -569,7 +573,7 @@ class Power implements PowerInterface $this->active[$guid]->load_selection )) ? json_decode((string) $this->active[$guid]->load_selection, true) : null; - if ($this->active[$guid]->load_selection) + if (ArrayHelper::check($this->active[$guid]->load_selection)) { // load use ids array_map( @@ -578,6 +582,10 @@ class Power implements PowerInterface $this->active[$guid]->load_selection ); } + else + { + $this->active[$guid]->load_selection = null; + } } /** diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power/Builder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power/Builder.php new file mode 100644 index 000000000..2197ec0ba --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power/Builder.php @@ -0,0 +1,339 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Power; + + +use Joomla\CMS\Factory; +use Joomla\CMS\Application\CMSApplication; +use Joomla\CMS\Language\Text; +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Componentbuilder\Compiler\Power; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Registry; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Paths; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Folder; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; + + +/** + * Power Builder Class + * + * @since 3.2.0 + */ +class Builder +{ + /** + * we track the creation of htaccess files + * + * @var array + * @since 3.2.0 + **/ + protected array $htaccess = []; + + /** + * Power Objects + * + * @var Power + * @since 3.2.0 + **/ + protected Power $power; + + /** + * Compiler Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * The compiler registry + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * Compiler Event + * + * @var EventInterface + * @since 3.2.0 + */ + protected EventInterface $event; + + /** + * Compiler Counter + * + * @var Counter + * @since 3.2.0 + */ + protected Counter $counter; + + /** + * Compiler Utilities Paths + * + * @var Paths + * @since 3.2.0 + */ + protected Paths $paths; + + /** + * Compiler Utilities Folder + * + * @var Folder + * @since 3.2.0 + */ + protected Folder $folder; + + /** + * Compiler Utilities File + * + * @var File + * @since 3.2.0 + */ + protected File $file; + + /** + * Compiler Utilities Files + * + * @var Files + * @since 3.2.0 + */ + protected Files $files; + + /** + * Database object to query local DB + * + * @var CMSApplication + * @since 3.2.0 + **/ + protected CMSApplication $app; + + /** + * Constructor + * + * @param Power|null $power The power object. + * @param Config|null $config The compiler config object. + * @param Registry|null $registry The compiler registry object. + * @param EventInterface|null $event The compiler event api object. + * @param Counter|null $counter The compiler counter object. + * @param Paths|null $paths The compiler paths object. + * @param Folder|null $folder The compiler folder object. + * @param File|null $file The compiler file object. + * @param Files|null $files The compiler files object. + * @param CMSApplication|null $app The CMS Application object. + * + * @throws \Exception + * @since 3.2.0 + */ + public function __construct(?Power $power = null, ?Config $config = null, + ?Registry $registry = null, ?EventInterface $event = null, + ?Counter $counter = null, ?Paths $paths = null, ?Folder $folder = null, + ?File $file = null, ?Files $files = null, ?CMSApplication $app = null) + { + $this->power = $power ?: Compiler::_('Power'); + $this->config = $config ?: Compiler::_('Config'); + $this->registry = $registry ?: Compiler::_('Registry'); + $this->event = $event ?: Compiler::_('Event'); + $this->counter = $counter ?: Compiler::_('Utilities.Counter'); + $this->paths = $paths ?: Compiler::_('Utilities.Paths'); + $this->folder = $folder ?: Compiler::_('Utilities.Folder'); + $this->file = $file ?: Compiler::_('Utilities.File'); + $this->files = $files ?: Compiler::_('Utilities.Files'); + $this->app = $app ?: Factory::getApplication(); + } + + /** + * Build the Powers files, folders + * + * @return void + * @since 3.2.0 + */ + public function run() + { + if (ArrayHelper::check($this->power->active)) + { + // for plugin event TODO change event api signatures + $powers = $this->power->active; + $component_context = $this->config->component_context; + // Trigger Event: jcb_ce_onBeforeSetModules + $this->event->trigger( + 'jcb_ce_onBeforeBuildPowers', + array(&$component_context, &$powers) + ); + // for plugin event TODO change event api signatures + $this->power->active = $powers; + + foreach ($this->power->active as $power) + { + if (ObjectHelper::check($power) + && isset($power->path) + && StringHelper::check( + $power->path + )) + { + // activate dynamic folders + $this->setDynamicFolders(); + + // power path + $power->full_path = $this->paths->component_path . '/' + . $power->path; + $power->full_path_jcb = $this->paths->component_path . '/' + . $power->path_jcb; + $power->full_path_parent = $this->paths->component_path . '/' + . $power->path_parent; + + // set the power paths + $this->registry->set('dynamic_paths.' . $power->key, $power->full_path_parent); + + // create the power folder if it does not exist + // we do it like this to add html files to each part + $this->folder->create($power->full_path_jcb); + $this->folder->create($power->full_path_parent); + $this->folder->create($power->full_path); + + // set power file + $fileDetails = array('path' => $power->full_path . '/' + . $power->file_name . '.php', + 'name' => $power->file_name . '.php', + 'zip' => $power->file_name . '.php'); + $bom = 'add_licensing_template == 2) + { + $bom = 'licensing_template; + } + $this->file->write( + $fileDetails['path'], + $bom . PHP_EOL . Placefix::_h('POWERCODE') + . PHP_EOL . Placefix::_h('POWERLINKER') + ); + $this->files->appendArray($power->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // set htaccess once per path + $this->setHtaccess($power); + } + } + } + } + + /** + * Set the .htaccess for this power path + * + * @param object $power The power object + * + * @return void + * @since 3.2.0 + */ + protected function setHtaccess(object &$power) + { + if (!isset($this->htaccess[$power->path_jcb])) + { + // set the htaccess data + $data = '# Apache 2.4+' . PHP_EOL . + '' . PHP_EOL . + ' Require all denied' . PHP_EOL . + '' . PHP_EOL . PHP_EOL . + '# Apache 2.0-2.2' . PHP_EOL . + '' . PHP_EOL . + ' Deny from all' . PHP_EOL . + '' . PHP_EOL; + + // now we must add the .htaccess file + $fileDetails = array('path' => $power->full_path_jcb . '/.htaccess', + 'name' => '.htaccess', + 'zip' => '.htaccess'); + $this->file->write( + $fileDetails['path'], $data + ); + $this->files->appendArray($power->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // now we must add the htaccess.txt file where the zip package my not get the [.] files + $fileDetails = array('path' => $power->full_path_jcb . '/htaccess.txt', + 'name' => 'htaccess.txt', + 'zip' => 'htaccess.txt'); + $this->file->write( + $fileDetails['path'], $data + ); + $this->files->appendArray($power->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // now we must add the web.config file + $fileDetails = array('path' => $power->full_path_jcb . '/web.config', + 'name' => 'web.config', + 'zip' => 'web.config'); + $this->file->write( + $fileDetails['path'], + '' . PHP_EOL . + ' ' . PHP_EOL . + ' ' . PHP_EOL . + ' ' . PHP_EOL . + ' ' . PHP_EOL . + ' ' . PHP_EOL . + '' . PHP_EOL + ); + $this->files->appendArray($power->key, $fileDetails); + + // count the file created + $this->counter->file++; + + // we set these files only once + $this->htaccess[$power->path_jcb] = true; + } + } + + /** + * Add the dynamic folders + * + * @return void + * @since 3.2.0 + */ + protected function setDynamicFolders() + { + // check if we should add the dynamic folder moving script to the installer script + if (!$this->registry->get('set_move_folders_install_script')) + { + // add the setDynamicF0ld3rs() method to the install scipt.php file + $this->registry->set('set_move_folders_install_script', true); + + // set message that this was done (will still add a tutorial link later) + $this->app->enqueueMessage( + Text::_('COM_COMPONENTBUILDER_HR_HTHREEDYNAMIC_FOLDERS_WERE_DETECTEDHTHREE'), + 'Notice' + ); + $this->app->enqueueMessage( + Text::sprintf('COM_COMPONENTBUILDER_A_METHOD_SETDYNAMICFZEROLDTHREERS_WAS_ADDED_TO_THE_INSTALL_BSCRIPTPHPB_OF_THIS_PACKAGE_TO_INSURE_THAT_THE_FOLDERS_ARE_COPIED_INTO_THE_CORRECT_PLACE_WHEN_THIS_COMPONENT_IS_INSTALLED'), + 'Notice' + ); + } + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power/Infusion.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power/Infusion.php index 3337748cf..f72181638 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power/Infusion.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power/Infusion.php @@ -128,6 +128,11 @@ class Infusion // POWERCODE $this->content->set_($power->key, 'POWERCODE', $this->get($power)); + // POWERLINKER + // SOON WE STILL NEED TO THINK THIS OVER + // $this->content->set_($power->key, 'POWERLINKER', $this->linker($power)); + $this->content->set_($power->key, 'POWERLINKER', ''); + // Trigger Event: jcb_ce_onAfterInfusePowerData $this->event->trigger( 'jcb_ce_onAfterInfusePowerData', @@ -198,10 +203,84 @@ class Infusion $code[] = $power->main_class_code; } - $code[] = '}' . PHP_EOL . PHP_EOL; + $code[] = '}' . PHP_EOL; return $this->placeholder->update(implode(PHP_EOL, $code), $this->content->active); } + + /** + * Get the Power Linker + * + * @param object $power A power object. + * + * @return string + * @since 3.2.0 + */ + protected function linker(object &$power): string + { + $map = []; + $body = []; + + // set the LINKER + $map[] = '/******************| POWER LINKER |*******************|'; + $map[] = ''; + $map[] = '{'; + + // we build the JSON body + $body[] = ' "guid": "' . $power->guid . '"'; + + // load extends + if (GuidHelper::valid($power->extends)) + { + $body[] = ' "extends": "' . $power->extends . '"'; + } + + // load implements + if (ArrayHelper::check($power->implements)) + { + $sud = []; + foreach ($power->implements as $implement) + { + $sud[] = ' "' . $implement . '"'; + } + $sud = implode(','. PHP_EOL, $sud); + + $body[] = ' "implements": [' . PHP_EOL . $sud . PHP_EOL . ' ]'; + } + + // load (Use Selection) + if (ArrayHelper::check($power->use_selection)) + { + $sud = []; + foreach ($power->use_selection as $use) + { + $sud[] = ' "' . $use['use'] . '"'; + } + $sud = implode(','. PHP_EOL, $sud); + + $body[] = ' "use": [' . PHP_EOL . $sud . PHP_EOL . ' ]'; + } + + // load (Load Selection) + if (ArrayHelper::check($power->load_selection)) + { + $sud = []; + foreach ($power->load_selection as $load) + { + $sud[] = ' "' . $load['load'] . '"'; + } + $sud = implode(','. PHP_EOL, $sud); + + $body[] = ' "load": [' . PHP_EOL . $sud . PHP_EOL . ' ]'; + } + $map[] = implode(','. PHP_EOL, $body); + + $map[] = '}'; + $map[] = ''; + $map[] = '|******************| POWER LINKER |*******************/' . PHP_EOL . PHP_EOL; + + return implode(PHP_EOL, $map); + } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Compiler.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Compiler.php index b9c732c3d..de5451e6f 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Compiler.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Compiler.php @@ -16,7 +16,6 @@ use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Registry; -use VDM\Joomla\Componentbuilder\Compiler\Counter; /** @@ -41,9 +40,6 @@ class Compiler implements ServiceProviderInterface $container->alias(Registry::class, 'Registry') ->share('Registry', [$this, 'getRegistry'], true); - - $container->alias(Counter::class, 'Counter') - ->share('Counter', [$this, 'getCounter'], true); } /** @@ -71,19 +67,6 @@ class Compiler implements ServiceProviderInterface { return new Registry(); } - - /** - * Get the Compiler Counter - * - * @param Container $container The DI container. - * - * @return Counter - * @since 3.2.0 - */ - public function getCounter(Container $container): Counter - { - return new Counter(); - } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlamodule.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlamodule.php index 5f7d697b4..c3c08ef6f 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlamodule.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlamodule.php @@ -15,6 +15,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\Data as JoomlaModuleData; +use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\Builder as JoomlaModuleBuilder; /** @@ -36,6 +37,9 @@ class Joomlamodule implements ServiceProviderInterface { $container->alias(JoomlaModuleData::class, 'Joomlamodule.Data') ->share('Joomlamodule.Data', [$this, 'getJoomlaModuleData'], true); + + $container->alias(JoomlaModuleBuilder::class, 'Joomlamodule.Builder') + ->share('Joomlamodule.Builder', [$this, 'getJoomlaModuleBuilder'], true); } /** @@ -61,6 +65,30 @@ class Joomlamodule implements ServiceProviderInterface $container->get('Dynamicget.Data') ); } + + /** + * Get the Joomla Module Builder + * + * @param Container $container The DI container. + * + * @return JoomlaModuleBuilder + * @since 3.2.0 + */ + public function getJoomlaModuleBuilder(Container $container): JoomlaModuleBuilder + { + return new JoomlaModuleBuilder( + $container->get('Joomlamodule.Data'), + $container->get('Component'), + $container->get('Config'), + $container->get('Registry'), + $container->get('Customcode.Dispenser'), + $container->get('Event'), + $container->get('Utilities.Counter'), + $container->get('Utilities.Folder'), + $container->get('Utilities.File'), + $container->get('Utilities.Files') + ); + } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlaplugin.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlaplugin.php index fff2f5942..1e2d2162a 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlaplugin.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlaplugin.php @@ -15,6 +15,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\Data as JoomlaPluginData; +use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\Builder as JoomlaPluginBuilder; /** @@ -36,6 +37,9 @@ class Joomlaplugin implements ServiceProviderInterface { $container->alias(JoomlaPluginData::class, 'Joomlaplugin.Data') ->share('Joomlaplugin.Data', [$this, 'getJoomlaPluginData'], true); + + $container->alias(JoomlaPluginBuilder::class, 'Joomlaplugin.Builder') + ->share('Joomlaplugin.Builder', [$this, 'getJoomlaPluginBuilder'], true); } /** @@ -59,6 +63,30 @@ class Joomlaplugin implements ServiceProviderInterface $container->get('Model.Filesfolders') ); } + + /** + * Get the Joomla Plugin Builder + * + * @param Container $container The DI container. + * + * @return JoomlaPluginBuilder + * @since 3.2.0 + */ + public function getJoomlaPluginBuilder(Container $container): JoomlaPluginBuilder + { + return new JoomlaPluginBuilder( + $container->get('Joomlaplugin.Data'), + $container->get('Component'), + $container->get('Config'), + $container->get('Registry'), + $container->get('Customcode.Dispenser'), + $container->get('Event'), + $container->get('Utilities.Counter'), + $container->get('Utilities.Folder'), + $container->get('Utilities.File'), + $container->get('Utilities.Files') + ); + } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Library.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Library.php index c07381ec1..f6f624fc5 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Library.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Library.php @@ -14,7 +14,8 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; -use VDM\Joomla\Componentbuilder\Compiler\Library\Data as LibraryData; +use VDM\Joomla\Componentbuilder\Compiler\Library\Data; +use VDM\Joomla\Componentbuilder\Compiler\Library\Builder; /** @@ -34,8 +35,11 @@ class Library implements ServiceProviderInterface */ public function register(Container $container) { - $container->alias(LibraryData::class, 'Library.Data') - ->share('Library.Data', [$this, 'getLibraryData'], true); + $container->alias(Data::class, 'Library.Data') + ->share('Library.Data', [$this, 'getData'], true); + + $container->alias(Builder::class, 'Library.Builder') + ->share('Library.Builder', [$this, 'getBuilder'], true); } /** @@ -43,12 +47,12 @@ class Library implements ServiceProviderInterface * * @param Container $container The DI container. * - * @return LibraryData + * @return Data * @since 3.2.0 */ - public function getLibraryData(Container $container): LibraryData + public function getData(Container $container): Data { - return new LibraryData( + return new Data( $container->get('Config'), $container->get('Registry'), $container->get('Customcode'), @@ -57,6 +61,29 @@ class Library implements ServiceProviderInterface $container->get('Model.Filesfolders') ); } + + /** + * Get the Compiler Library Builder + * + * @param Container $container The DI container. + * + * @return Builder + * @since 3.2.0 + */ + public function getBuilder(Container $container): Builder + { + return new Builder( + $container->get('Config'), + $container->get('Registry'), + $container->get('Event'), + $container->get('Component'), + $container->get('Content'), + $container->get('Utilities.Counter'), + $container->get('Utilities.Paths'), + $container->get('Utilities.Folder'), + $container->get('Utilities.File') + ); + } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php index f252fe7bd..835aa3ac0 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php @@ -17,6 +17,7 @@ use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Power as Powers; use VDM\Joomla\Componentbuilder\Compiler\Power\Infusion; use VDM\Joomla\Componentbuilder\Compiler\Power\Autoloader; +use VDM\Joomla\Componentbuilder\Compiler\Power\Builder; /** @@ -44,6 +45,9 @@ class Power implements ServiceProviderInterface $container->alias(Infusion::class, 'Power.Infusion') ->share('Power.Infusion', [$this, 'getInfusion'], true); + + $container->alias(Builder::class, 'Power.Builder') + ->share('Power.Builder', [$this, 'getBuilder'], true); } /** @@ -100,6 +104,29 @@ class Power implements ServiceProviderInterface $container->get('Event') ); } + + /** + * Get the Compiler Power Builder + * + * @param Container $container The DI container. + * + * @return Builder + * @since 3.2.0 + */ + public function getBuilder(Container $container): Builder + { + return new Builder( + $container->get('Power'), + $container->get('Config'), + $container->get('Registry'), + $container->get('Event'), + $container->get('Utilities.Counter'), + $container->get('Utilities.Paths'), + $container->get('Utilities.Folder'), + $container->get('Utilities.File'), + $container->get('Utilities.Files') + ); + } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php new file mode 100644 index 000000000..dd4ee7468 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php @@ -0,0 +1,134 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Folder; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Paths; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files; + + +/** + * Utilities Service Provider + * + * @since 3.2.0 + */ +class Utilities implements ServiceProviderInterface +{ + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 3.2.0 + */ + public function register(Container $container) + { + $container->alias(Folder::class, 'Utilities.Folder') + ->share('Utilities.Folder', [$this, 'getFolder'], true); + + $container->alias(File::class, 'Utilities.File') + ->share('Utilities.File', [$this, 'getFile'], true); + + $container->alias(Counter::class, 'Utilities.Counter') + ->share('Utilities.Counter', [$this, 'getCounter'], true); + + $container->alias(Paths::class, 'Utilities.Paths') + ->share('Utilities.Paths', [$this, 'getPaths'], true); + + $container->alias(Files::class, 'Utilities.Files') + ->share('Utilities.Files', [$this, 'getFiles'], true); + } + + /** + * Get the Compiler Folder + * + * @param Container $container The DI container. + * + * @return Folder + * @since 3.2.0 + */ + public function getFolder(Container $container): Folder + { + return new Folder( + $container->get('Utilities.Counter'), + $container->get('Utilities.File') + ); + } + + /** + * Get the Compiler File + * + * @param Container $container The DI container. + * + * @return File + * @since 3.2.0 + */ + public function getFile(Container $container): File + { + return new File( + $container->get('Utilities.Counter') + ); + } + + /** + * Get the Compiler Counter + * + * @param Container $container The DI container. + * + * @return Counter + * @since 3.2.0 + */ + public function getCounter(Container $container): Counter + { + return new Counter( + $container->get('Content') + ); + } + + /** + * Get the Compiler Paths + * + * @param Container $container The DI container. + * + * @return Paths + * @since 3.2.0 + */ + public function getPaths(Container $container): Paths + { + return new Paths( + $container->get('Config'), + $container->get('Component') + ); + } + + /** + * Get the Compiler Files Bucket + * + * @param Container $container The DI container. + * + * @return Files + * @since 3.2.0 + */ + public function getFiles(Container $container): Files + { + return new Files(); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Counter.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Counter.php similarity index 93% rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Counter.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Counter.php index 88483cee8..37e878b49 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Counter.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Counter.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VDM\Joomla\Componentbuilder\Compiler; +namespace VDM\Joomla\Componentbuilder\Compiler\Utilities; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; @@ -17,7 +17,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Content; /** - * Compiler Counter + * Compiler Utilities Counter * * @since 3.2.0 */ @@ -300,7 +300,6 @@ class Counter $this->timer = $this->end - $this->start; // compiler time - $this->content->set('COMPILER_TIMER_START', $this->start); $this->content->set('COMPILER_TIMER_END', $this->end); $this->content->set('COMPILER_TIMER', $this->timer); } @@ -353,8 +352,6 @@ class Counter // compiler time $this->content->set('COMPILER_TIMER_START', $this->start); - $this->content->set('COMPILER_TIMER_END', $this->end); - $this->content->set('COMPILER_TIMER', $this->timer); } /** diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/File.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/File.php new file mode 100644 index 000000000..a6046dafa --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/File.php @@ -0,0 +1,109 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Utilities; + + +use Joomla\CMS\Filesystem\File as JoomlaFile; +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Paths; +use VDM\Joomla\Utilities\FileHelper; + + +/** + * File helper + * + * @since 3.2.0 + */ +class File +{ + /** + * Compiler Utilities Counter + * + * @var Counter + * @since 3.2.0 + */ + protected Counter $counter; + + /** + * Compiler Utilities Paths + * + * @var Paths + * @since 3.2.0 + */ + protected Paths $paths; + + /** + * Constructor + * + * @param Counter|null $counter The compiler counter object. + * @param Paths|null $paths The compiler paths object. + * + * @since 3.2.0 + */ + public function __construct(?Counter $counter = null, ?Paths $paths = null) + { + $this->counter = $counter ?: Compiler::_('Utilities.Counter'); + $this->paths = $paths ?: Compiler::_('Utilities.Paths'); + } + + /** + * set HTML blank file to a path + * + * @param string $path The path to where to set the blank html file + * @param string $root The root path + * + * @return void + */ + public function html(string $path = '', string $root = 'component') + { + if ('component' === $root) + { + $root = $this->paths->component_path . '/'; + } + + // use path if exist + if (strlen($path) > 0) + { + JoomlaFile::copy( + $this->paths->template_path . '/index.html', + $root . $path . '/index.html' + ); + } + else + { + JoomlaFile::copy( + $this->paths->template_path . '/index.html', + $root . '/index.html' + ); + } + + // count the file created + $this->counter->file++; + } + + /** + * Create a file on the server if it does not exist, or Overwrite existing files + * + * @param string $path The path and file name where to safe the data + * @param string $data The data to safe + * + * @return bool true On success + * @since 3.2.0 + */ + public function write(string $path, string $data): bool + { + return FileHelper::write($path, $data); + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Files.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Files.php new file mode 100644 index 000000000..a9d9809cf --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Files.php @@ -0,0 +1,26 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Utilities; + + +use VDM\Joomla\Componentbuilder\Abstraction\BaseRegistry; + + +/** + * Compiler Utilities Files Bucket + * + * @since 3.2.0 + */ +class Files extends BaseRegistry +{ +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Folder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Folder.php new file mode 100644 index 000000000..2c983eac8 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Folder.php @@ -0,0 +1,172 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Utilities; + + +use Joomla\CMS\Filesystem\Folder as JoomlaFolder; +use Joomla\CMS\Filesystem\File as JoomlaFile; +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; +use VDM\Joomla\Utilities\ArrayHelper; + + +/** + * Folder helper + * + * @since 3.2.0 + */ +class Folder +{ + /** + * Compiler Counter + * + * @var Counter + * @since 3.2.0 + */ + protected Counter $counter; + + /** + * Compiler Utilities File + * + * @var File + * @since 3.2.0 + */ + protected File $file; + + /** + * Constructor + * + * @param Counter|null $counter The compiler counter object. + * @param File|null $file The compiler file object. + * + * @since 3.2.0 + */ + public function __construct(?Counter $counter = null, ?File $file = null) + { + $this->counter = $counter ?: Compiler::_('Utilities.Counter'); + $this->file = $file ?: Compiler::_('Utilities.File'); + } + + /** + * Create Path if not exist + * + * @param string $path The path to folder to create + * + * @return void + * @since 3.2.0 + */ + public function create(string $path) + { + // check if the path exist + if (!JoomlaFolder::exists($path)) + { + // create the path + JoomlaFolder::create( + $path + ); + + // count the folder created + $this->counter->folder++; + + // add index.html (boring I know) + $this->file->html( + $path, '' + ); + } + } + + /** + * Remove folders with files + * + * @param string $path The path to folder to remove + * @param array|null $ignore The folders and files to ignore and not remove + * + * @return boolean True if all are removed + * @since 3.2.0 + */ + public function remove(string $path, ?array $ignore = null): bool + { + if (JoomlaFolder::exists($path)) + { + $it = new \RecursiveDirectoryIterator($path); + $it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::CHILD_FIRST); + + // remove ending / + $path = rtrim($path, '/'); + + // now loop the files & folders + foreach ($it as $file) + { + if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue; + + // set file dir + $file_dir = $file->getPathname(); + + // check if this is a dir or a file + if ($file->isDir()) + { + $keeper = false; + if (ArrayHelper::check($ignore)) + { + foreach ($ignore as $keep) + { + if (strpos((string) $file_dir, $path . '/' . $keep) !== false) + { + $keeper = true; + } + } + } + + if ($keeper) + { + continue; + } + + JoomlaFolder::delete($file_dir); + } + else + { + $keeper = false; + if (ArrayHelper::check($ignore)) + { + foreach ($ignore as $keep) + { + if (strpos((string) $file_dir, $path . '/'. $keep) !== false) + { + $keeper = true; + } + } + } + + if ($keeper) + { + continue; + } + + JoomlaFile::delete($file_dir); + } + } + + // delete the root folder if ignore not set + if (!ArrayHelper::check($ignore)) + { + return JoomlaFolder::delete($path); + } + + return true; + } + return false; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Path.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Path.php index b98c9703b..c66c8dc7f 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Path.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Path.php @@ -37,7 +37,7 @@ abstract class Path * @return void * @since 3.2.0 */ - public static function fix(&$values, $targets = array()) + public static function fix(&$values, $targets = []) { // if multiple to gets searched and fixed if (ArrayHelper::check($values) && ArrayHelper::check($targets)) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Paths.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Paths.php new file mode 100644 index 000000000..51ea35cb3 --- /dev/null +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Paths.php @@ -0,0 +1,132 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Utilities; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Component; +use VDM\Joomla\Componentbuilder\Interfaces\Mappersingleinterface; +use VDM\Joomla\Componentbuilder\Abstraction\MapperSingle; + + +/** + * Compiler Utilities Paths + * + * @since 3.2.0 + */ +class Paths extends MapperSingle implements Mappersingleinterface +{ + /** + * Compiler Config + * + * @var Config + * @since 3.2.0 + **/ + protected Config $config; + + /** + * Compiler Component + * + * @var Component + * @since 3.2.0 + **/ + protected Component $component; + + /** + * Constructor + * + * @param Config|null $config The compiler config object. + * @param Component|null $component The component class. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Component $component = null) + { + $this->config = $config ?: Compiler::_('Config'); + $this->component = $component ?: Compiler::_('Component'); + + // set the template path + $this->set('template_path', + $this->config->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/joomla_' + . $this->config->joomla_versions[$this->config->joomla_version]['folder_key'] + ); + + // set component sales name + $this->set('component_sales_name', + 'com_' . $this->component->get('sales_name') . '__J' + . $this->config->joomla_version + ); + + // set component backup name + $this->set('component_backup_name', + 'com_' . $this->component->get('sales_name') . '_v' . str_replace( + '.', '_', (string) $this->component->get('component_version') + ) . '__J' . $this->config->joomla_version + ); + + // set component folder name + $this->set('component_folder_name', + 'com_' . $this->component->get('name_code') . '_v' . str_replace( + '.', '_', (string) $this->component->get('component_version') + ) . '__J' . $this->config->joomla_version + ); + + // set component path + $this->set('component_path', + $this->config->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/' + . $this->get('component_folder_name') + ); + + // set the template path for custom TODO: just use custom_folder_path in config + $this->set('template_path_custom', + $this->config->get( + 'custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/custom' + ) + ); + } + + /** + * getting any valid paths + * + * @param string $key The value's key/path name + * + * @return string The path found as a string + * @since 3.2.0 + * @throws \InvalidArgumentException If $key is not a valid function name. + */ + public function __get(string $key): string + { + // check if it has been set + if ($this->exist($key)) + { + return $this->get($key); + } + + throw new \InvalidArgumentException(sprintf('Path %s could not be found in the Paths Class.', $key)); + } + + /** + * Model the key + * + * @param string $key The key to model + * + * @return string + * @since 3.2.0 + */ + protected function key(string $key): string + { + return $key; + } + +} + diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Unique.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Unique.php index 615a93581..b92611ad7 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Unique.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Unique.php @@ -45,11 +45,13 @@ abstract class Unique */ public static function get($size): string { - $unique = end(self::$unique[$size]); + $unique = (isset(self::$unique[$size])) ? end(self::$unique[$size]) : null; if(!$unique) { $unique = substr("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv", 0, $size); + + self::$unique[$size] = []; } while(in_array($unique, self::$unique[$size])) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php index d66d71e0b..ea4422e7a 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php @@ -119,7 +119,7 @@ class Ftp implements Serverinterface } else { - $options = array(); + $options = []; } // get ftp object if (isset($host) && $host != 'HOSTNAME' && diff --git a/libraries/jcb_powers/VDM.Joomla/src/Utilities/ArrayHelper.php b/libraries/jcb_powers/VDM.Joomla/src/Utilities/ArrayHelper.php index 135629a82..70cc939c8 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Utilities/ArrayHelper.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Utilities/ArrayHelper.php @@ -30,14 +30,14 @@ abstract class ArrayHelper */ public static function check($array, $removeEmptyString = false) { - if (is_array($array) && ($nr = count((array)$array)) > 0) + if (is_array($array) && ($nr = count((array) $array)) > 0) { // also make sure the empty strings are removed if ($removeEmptyString) { $array = array_filter($array); - if (empty($array)) + if ($array === []) { return false; } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Utilities/FileHelper.php b/libraries/jcb_powers/VDM.Joomla/src/Utilities/FileHelper.php index a0bbf09f5..1385775dd 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Utilities/FileHelper.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Utilities/FileHelper.php @@ -48,7 +48,7 @@ abstract class FileHelper * * @since 3.0.9 */ - public static function zip($workingDirectory, &$filepath) + public static function zip($workingDirectory, &$filepath): bool { // store the current joomla working directory $joomla = getcwd(); @@ -65,11 +65,11 @@ abstract class FileHelper // get a list of files in the current directory tree (also the hidden files) $files = Folder::files('.', '', true, true, array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array('.*~')); - $zipArray = array(); + $zipArray = []; // setup the zip array foreach ($files as $file) { - $tmp = array(); + $tmp = []; $tmp['name'] = str_replace('./', '', (string) $file); $tmp['data'] = self::getContent($file); $tmp['time'] = filemtime($file); @@ -80,15 +80,10 @@ abstract class FileHelper chdir($joomla); // get the zip adapter - $adapter = new Archive(); - $zip = $adapter->getAdapter('zip'); + $zip = (new Archive())->getAdapter('zip'); //create the zip file - if ($zip->create($filepath, $zipArray)) - { - return true; - } - return false; + return (bool) $zip->create($filepath, $zipArray); } /** @@ -116,7 +111,7 @@ abstract class FileHelper // start curl $ch = curl_init(); // set the options - $options = array(); + $options = []; $options[CURLOPT_URL] = $path; $options[CURLOPT_USERAGENT] = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12'; $options[CURLOPT_RETURNTRANSFER] = TRUE; diff --git a/libraries/jcb_powers/VDM.Joomla/src/Utilities/JsonHelper.php b/libraries/jcb_powers/VDM.Joomla/src/Utilities/JsonHelper.php index ea90e7ee8..47fbd243f 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Utilities/JsonHelper.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Utilities/JsonHelper.php @@ -67,7 +67,7 @@ abstract class JsonHelper { if (StringHelper::check($table)) { - $names = array(); + $names = []; foreach ($result as $val) { if ($external) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Utilities/String/ClassfunctionHelper.php b/libraries/jcb_powers/VDM.Joomla/src/Utilities/String/ClassfunctionHelper.php index 06fce0964..42d21af3e 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Utilities/String/ClassfunctionHelper.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Utilities/String/ClassfunctionHelper.php @@ -31,7 +31,7 @@ abstract class ClassfunctionHelper * * @since 3.0.9 */ - public static function safe($name) + public static function safe($name): string { // remove numbers if the first character is a number if (is_numeric(substr((string) $name, 0, 1))) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php b/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php index 95a7b47f5..1e3d7b966 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Utilities/StringHelper.php @@ -399,7 +399,7 @@ abstract class StringHelper public static function random($size): string { $bag = "abcefghijknopqrstuwxyzABCDDEFGHIJKLLMMNOPQRSTUVVWXYZabcddefghijkllmmnopqrstuvvwxyzABCEFGHIJKNOPQRSTUWXYZ"; - $key = array(); + $key = []; $bagsize = strlen($bag) - 1; for ($i = 0; $i < $size; $i++) diff --git a/libraries/jcb_powers/VDM.Minify/src/Abstraction/Minify.php b/libraries/jcb_powers/VDM.Minify/src/Abstraction/Minify.php index e6e92b50b..23a9a450b 100644 --- a/libraries/jcb_powers/VDM.Minify/src/Abstraction/Minify.php +++ b/libraries/jcb_powers/VDM.Minify/src/Abstraction/Minify.php @@ -32,14 +32,14 @@ abstract class Minify * * @var string[] */ - protected $data = array(); + protected $data = []; /** * Array of patterns to match. * * @var string[] */ - protected $patterns = array(); + protected $patterns = []; /** * This array will hold content of strings and regular expressions that have @@ -50,7 +50,7 @@ abstract class Minify * * @var string[] */ - public $extracted = array(); + public $extracted = []; /** * Init the minify class - optionally, code may be passed along already. @@ -279,7 +279,7 @@ abstract class Minify $output = ''; $processedOffset = 0; $positions = array_fill(0, count($this->patterns), -1); - $matches = array(); + $matches = []; while ($processedOffset < $contentLength) { // find first match for all patterns @@ -435,7 +435,7 @@ abstract class Minify $content = strtr($content, $this->extracted); - $this->extracted = array(); + $this->extracted = []; return $content; } diff --git a/libraries/jcb_powers/VDM.Minify/src/Css.php b/libraries/jcb_powers/VDM.Minify/src/Css.php index c08265b8f..baee09933 100644 --- a/libraries/jcb_powers/VDM.Minify/src/Css.php +++ b/libraries/jcb_powers/VDM.Minify/src/Css.php @@ -171,15 +171,15 @@ class Css extends Minify ); // find all relative imports in css - $matches = array(); + $matches = []; foreach ($importRegexes as $importRegex) { if (preg_match_all($importRegex, $content, $regexMatches, PREG_SET_ORDER)) { $matches = [...$matches, ...$regexMatches]; } } - $search = array(); - $replace = array(); + $search = []; + $replace = []; // loop the matches foreach ($matches as $match) { @@ -234,8 +234,8 @@ class Css extends Minify { $regex = '/url\((["\']?)(.+?)\\1\)/i'; if ($this->importExtensions && preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) { - $search = array(); - $replace = array(); + $search = []; + $replace = []; // loop the matches foreach ($matches as $match) { @@ -277,7 +277,7 @@ class Css extends Minify * * @return string The minified data */ - public function execute($path = null, $parents = array()) + public function execute($path = null, $parents = []) { $content = ''; @@ -387,15 +387,15 @@ class Css extends Minify ); // find all relative urls in css - $matches = array(); + $matches = []; foreach ($relativeRegexes as $relativeRegex) { if (preg_match_all($relativeRegex, $content, $regexMatches, PREG_SET_ORDER)) { $matches = [...$matches, ...$regexMatches]; } } - $search = array(); - $replace = array(); + $search = []; + $replace = []; // loop all urls foreach ($matches as $match) { diff --git a/libraries/jcb_powers/VDM.Minify/src/Path/Converter.php b/libraries/jcb_powers/VDM.Minify/src/Path/Converter.php index 1667ed8fa..c965c9009 100644 --- a/libraries/jcb_powers/VDM.Minify/src/Path/Converter.php +++ b/libraries/jcb_powers/VDM.Minify/src/Path/Converter.php @@ -114,10 +114,10 @@ class Converter implements ConverterInterface // $path could theoretically be empty (e.g. no path is given), in which // case it shouldn't expand to array(''), which would compare to one's // root / - $path1 = $path1 ? explode('/', $path1) : array(); - $path2 = $path2 ? explode('/', $path2) : array(); + $path1 = $path1 ? explode('/', $path1) : []; + $path2 = $path2 ? explode('/', $path2) : []; - $shared = array(); + $shared = []; // compare paths & strip identical ancestors foreach ($path1 as $i => $chunk) { diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini index 385c5ef8c..b77d528f4 100644 --- a/site/language/en-GB/en-GB.com_componentbuilder.ini +++ b/site/language/en-GB/en-GB.com_componentbuilder.ini @@ -3,6 +3,7 @@ COM_COMPONENTBUILDER_ACCESS_DENIED="Access denied!" COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?" COM_COMPONENTBUILDER_API="Api" COM_COMPONENTBUILDER_API_DESC="Sync Portal API" +COM_COMPONENTBUILDER_A_METHOD_SETDYNAMICFZEROLDTHREERS_WAS_ADDED_TO_THE_INSTALL_BSCRIPTPHPB_OF_THIS_PACKAGE_TO_INSURE_THAT_THE_FOLDERS_ARE_COPIED_INTO_THE_CORRECT_PLACE_WHEN_THIS_COMPONENT_IS_INSTALLED="A method (setDynamicF0ld3rs) was added to the install script.php of this package to insure that the folder(s) are copied into the correct place when this component is installed!" COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="Backup failed, please try again. If the error continue, please contact your system administrator." COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully" COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE="Be cautious! Do not continue unless you trust the origin of this package!" @@ -43,6 +44,7 @@ COM_COMPONENTBUILDER_GREAT_THIS_PLACEHOLDER_WILL_WORK="Great, this placeholder w COM_COMPONENTBUILDER_HFOUR_CLASSNAVHEADERCOPYRIGHTHFOURPSP="

%s

" COM_COMPONENTBUILDER_HFOUR_CLASSNAVHEADERLICENSEHFOURPSP="

%s

" COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODES_WARNINGHTHREE="

Custom Codes Warning

" +COM_COMPONENTBUILDER_HR_HTHREEDYNAMIC_FOLDERS_WERE_DETECTEDHTHREE="

Dynamic folder(s) were detected.

" COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_ERRORHTHREE="

External Code Error

" COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_NOTICEHTHREE="

External Code Notice

" COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_WARNINGHTHREE="

External Code Warning

"