From 74e964753a6565cd26b0883199bef4723d4427b5 Mon Sep 17 00:00:00 2001 From: aB0t Date: Fri, 20 Sep 2024 03:29:00 +0200 Subject: [PATCH] Update 2024-09-20 03:29:01 --- .../code.php | 10 ++-- .../code.power | 10 ++-- .../code.php | 18 ++++--- .../code.power | 18 ++++--- .../code.php | 18 ++++--- .../code.power | 18 ++++--- .../code.php | 9 ++-- .../code.power | 9 ++-- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 6 +-- .../code.power | 6 +-- .../README.md | 2 +- .../code.php | 8 ++- .../code.power | 7 ++- .../settings.json | 4 -- .../README.md | 2 +- .../code.php | 7 ++- .../code.power | 6 +-- .../settings.json | 4 -- .../code.php | 8 +-- .../code.power | 8 +-- .../README.md | 2 +- .../code.php | 14 +++--- .../code.power | 12 ++--- .../settings.json | 4 -- .../README.md | 2 +- .../code.php | 7 ++- .../code.power | 6 +-- .../settings.json | 4 -- .../README.md | 12 ++--- .../code.php | 49 +++++++++---------- .../code.power | 44 ++++++++--------- .../settings.json | 26 +++++----- .../code.php | 9 +--- .../code.power | 9 +--- 38 files changed, 179 insertions(+), 207 deletions(-) diff --git a/src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/code.php b/src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/code.php index e47164e..b8b4f66 100644 --- a/src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/code.php +++ b/src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/code.php @@ -398,13 +398,13 @@ final class Infusion $code[] = 'namespace ' . $power->_namespace . ';' . PHP_EOL; // check if we have header data - if (StringHelper::check($power->head)) + if (isset($power->head) && StringHelper::check($power->head)) { $code[] = PHP_EOL . $power->head; } // add description if set - if (StringHelper::check($power->description)) + if (isset($power->description) && StringHelper::check($power->description)) { // check if this is escaped if (strpos((string) $power->description, '/*') === false) @@ -419,13 +419,13 @@ final class Infusion $declaration = $power->type . ' ' . $power->class_name; // check if we have extends - if (StringHelper::check($power->extends_name)) + if (isset($power->extends_name) && StringHelper::check($power->extends_name)) { $declaration .= ' extends ' . $power->extends_name; } // check if we have implements - if (ArrayHelper::check($power->implement_names)) + if (isset($power->implement_names) && ArrayHelper::check($power->implement_names)) { $declaration .= ' implements ' . implode(', ', $power->implement_names); } @@ -434,7 +434,7 @@ final class Infusion $code[] = '{'; // add the main code if set - if (StringHelper::check($power->main_class_code)) + if (isset($power->main_class_code) && StringHelper::check($power->main_class_code)) { $code[] = $power->main_class_code; } diff --git a/src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/code.power b/src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/code.power index 27a892e..34373a3 100644 --- a/src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/code.power +++ b/src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/code.power @@ -364,13 +364,13 @@ $code[] = 'namespace ' . $power->_namespace . ';' . PHP_EOL; // check if we have header data - if (StringHelper::check($power->head)) + if (isset($power->head) && StringHelper::check($power->head)) { $code[] = PHP_EOL . $power->head; } // add description if set - if (StringHelper::check($power->description)) + if (isset($power->description) && StringHelper::check($power->description)) { // check if this is escaped if (strpos((string) $power->description, '/*') === false) @@ -385,13 +385,13 @@ $declaration = $power->type . ' ' . $power->class_name; // check if we have extends - if (StringHelper::check($power->extends_name)) + if (isset($power->extends_name) && StringHelper::check($power->extends_name)) { $declaration .= ' extends ' . $power->extends_name; } // check if we have implements - if (ArrayHelper::check($power->implement_names)) + if (isset($power->implement_names) && ArrayHelper::check($power->implement_names)) { $declaration .= ' implements ' . implode(', ', $power->implement_names); } @@ -400,7 +400,7 @@ $code[] = '{'; // add the main code if set - if (StringHelper::check($power->main_class_code)) + if (isset($power->main_class_code) && StringHelper::check($power->main_class_code)) { $code[] = $power->main_class_code; } diff --git a/src/163fa7ca-21bd-4e7f-a618-26fe10b870fe/code.php b/src/163fa7ca-21bd-4e7f-a618-26fe10b870fe/code.php index be0f88f..308cac4 100644 --- a/src/163fa7ca-21bd-4e7f-a618-26fe10b870fe/code.php +++ b/src/163fa7ca-21bd-4e7f-a618-26fe10b870fe/code.php @@ -154,7 +154,7 @@ final class InputButton implements InputButtonInterface . "\$button_code_name = \$this->getAttribute('name');"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the input from url"; - $addButton[] = Indent::_(3) . "\$app = Factory::getApplication();"; + $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();"; $addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the view name & id"; @@ -181,7 +181,7 @@ final class InputButton implements InputButtonInterface $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " get the return value."; $addButton[] = Indent::_(4) - . "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; $addButton[] = Indent::_(4) . "\$_return = urlencode(base64_encode(\$_uri));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) @@ -206,7 +206,7 @@ final class InputButton implements InputButtonInterface $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " get the return value."; $addButton[] = Indent::_(4) - . "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; $addButton[] = Indent::_(4) . "\$_return = urlencode(base64_encode(\$_uri));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) @@ -231,7 +231,7 @@ final class InputButton implements InputButtonInterface . "\$button_label = ucfirst(strtolower(\$button_label));"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get user object"; - $addButton[] = Indent::_(3) . "\$user = Factory::getApplication()->getIdentity();"; + $addButton[] = Indent::_(3) . "\$user = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " only add if user allowed to create " . $fieldData['view']; // check if the item has permissions. @@ -272,7 +272,11 @@ final class InputButton implements InputButtonInterface $addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {"; $addButton[] = Indent::_(6) - . "document.getElementById('jform_\".\$button_code_name.\"').addEventListener('change', function(e) {"; + . "let \".\$button_code_name.\"Field = document.getElementById('jform_\".\$button_code_name.\"');"; + $addButton[] = Indent::_(6) + . "if (!\".\$button_code_name.\"Field) { return; }"; + $addButton[] = Indent::_(6) + . "\".\$button_code_name.\"Field.addEventListener('change', function(e) {"; $addButton[] = Indent::_(7) . "e.preventDefault();"; $addButton[] = Indent::_(7) . "let \".\$button_code_name.\"Value = this.value;"; @@ -280,7 +284,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \""; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; $addButton[] = Indent::_(6) . "});"; $addButton[] = Indent::_(6) - . "let \".\$button_code_name.\"Value = document.getElementById('jform_\".\$button_code_name.\"').value;"; + . "let \".\$button_code_name.\"Value = \".\$button_code_name.\"Field.value;"; $addButton[] = Indent::_(6) . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; $addButton[] = Indent::_(5) . "});"; @@ -324,7 +328,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " Load the needed script."; $addButton[] = Indent::_(4) - . "\$document = Factory::getApplication()->getDocument();"; + . "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();"; $addButton[] = Indent::_(4) . "\$document->addScriptDeclaration(implode(' ',\$script));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) diff --git a/src/163fa7ca-21bd-4e7f-a618-26fe10b870fe/code.power b/src/163fa7ca-21bd-4e7f-a618-26fe10b870fe/code.power index ebacc20..d86a676 100644 --- a/src/163fa7ca-21bd-4e7f-a618-26fe10b870fe/code.power +++ b/src/163fa7ca-21bd-4e7f-a618-26fe10b870fe/code.power @@ -123,7 +123,7 @@ . "\$button_code_name = \$this->getAttribute('name');"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the input from url"; - $addButton[] = Indent::_(3) . "\$app = Factory::getApplication();"; + $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();"; $addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the view name & id"; @@ -150,7 +150,7 @@ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " get the return value."; $addButton[] = Indent::_(4) - . "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; $addButton[] = Indent::_(4) . "\$_return = urlencode(base64_encode(\$_uri));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) @@ -175,7 +175,7 @@ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " get the return value."; $addButton[] = Indent::_(4) - . "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; $addButton[] = Indent::_(4) . "\$_return = urlencode(base64_encode(\$_uri));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) @@ -200,7 +200,7 @@ . "\$button_label = ucfirst(strtolower(\$button_label));"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get user object"; - $addButton[] = Indent::_(3) . "\$user = Factory::getApplication()->getIdentity();"; + $addButton[] = Indent::_(3) . "\$user = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " only add if user allowed to create " . $fieldData['view']; // check if the item has permissions. @@ -241,7 +241,11 @@ $addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {"; $addButton[] = Indent::_(6) - . "document.getElementById('jform_\".\$button_code_name.\"').addEventListener('change', function(e) {"; + . "let \".\$button_code_name.\"Field = document.getElementById('jform_\".\$button_code_name.\"');"; + $addButton[] = Indent::_(6) + . "if (!\".\$button_code_name.\"Field) { return; }"; + $addButton[] = Indent::_(6) + . "\".\$button_code_name.\"Field.addEventListener('change', function(e) {"; $addButton[] = Indent::_(7) . "e.preventDefault();"; $addButton[] = Indent::_(7) . "let \".\$button_code_name.\"Value = this.value;"; @@ -249,7 +253,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \""; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; $addButton[] = Indent::_(6) . "});"; $addButton[] = Indent::_(6) - . "let \".\$button_code_name.\"Value = document.getElementById('jform_\".\$button_code_name.\"').value;"; + . "let \".\$button_code_name.\"Value = \".\$button_code_name.\"Field.value;"; $addButton[] = Indent::_(6) . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; $addButton[] = Indent::_(5) . "});"; @@ -293,7 +297,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " Load the needed script."; $addButton[] = Indent::_(4) - . "\$document = Factory::getApplication()->getDocument();"; + . "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();"; $addButton[] = Indent::_(4) . "\$document->addScriptDeclaration(implode(' ',\$script));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) diff --git a/src/1b8a40e9-7847-4341-8a8e-dfdc2d531bbe/code.php b/src/1b8a40e9-7847-4341-8a8e-dfdc2d531bbe/code.php index 22e61bf..cdc0cba 100644 --- a/src/1b8a40e9-7847-4341-8a8e-dfdc2d531bbe/code.php +++ b/src/1b8a40e9-7847-4341-8a8e-dfdc2d531bbe/code.php @@ -154,7 +154,7 @@ final class InputButton implements InputButtonInterface . "\$button_code_name = \$this->getAttribute('name');"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the input from url"; - $addButton[] = Indent::_(3) . "\$app = Factory::getApplication();"; + $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();"; $addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the view name & id"; @@ -181,7 +181,7 @@ final class InputButton implements InputButtonInterface $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " get the return value."; $addButton[] = Indent::_(4) - . "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; $addButton[] = Indent::_(4) . "\$_return = urlencode(base64_encode(\$_uri));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) @@ -206,7 +206,7 @@ final class InputButton implements InputButtonInterface $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " get the return value."; $addButton[] = Indent::_(4) - . "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; $addButton[] = Indent::_(4) . "\$_return = urlencode(base64_encode(\$_uri));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) @@ -231,7 +231,7 @@ final class InputButton implements InputButtonInterface . "\$button_label = ucfirst(strtolower(\$button_label));"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get user object"; - $addButton[] = Indent::_(3) . "\$user = Factory::getApplication()->getIdentity();"; + $addButton[] = Indent::_(3) . "\$user = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " only add if user allowed to create " . $fieldData['view']; // check if the item has permissions. @@ -272,7 +272,11 @@ final class InputButton implements InputButtonInterface $addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {"; $addButton[] = Indent::_(6) - . "document.getElementById('jform_\".\$button_code_name.\"').addEventListener('change', function(e) {"; + . "let \".\$button_code_name.\"Field = document.getElementById('jform_\".\$button_code_name.\"');"; + $addButton[] = Indent::_(6) + . "if (!\".\$button_code_name.\"Field) { return; }"; + $addButton[] = Indent::_(6) + . "\".\$button_code_name.\"Field.addEventListener('change', function(e) {"; $addButton[] = Indent::_(7) . "e.preventDefault();"; $addButton[] = Indent::_(7) . "let \".\$button_code_name.\"Value = this.value;"; @@ -280,7 +284,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \""; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; $addButton[] = Indent::_(6) . "});"; $addButton[] = Indent::_(6) - . "let \".\$button_code_name.\"Value = document.getElementById('jform_\".\$button_code_name.\"').value;"; + . "let \".\$button_code_name.\"Value = \".\$button_code_name.\"Field.value;"; $addButton[] = Indent::_(6) . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; $addButton[] = Indent::_(5) . "});"; @@ -324,7 +328,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " Load the needed script."; $addButton[] = Indent::_(4) - . "\$document = Factory::getApplication()->getDocument();"; + . "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();"; $addButton[] = Indent::_(4) . "\$document->addScriptDeclaration(implode(' ',\$script));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) diff --git a/src/1b8a40e9-7847-4341-8a8e-dfdc2d531bbe/code.power b/src/1b8a40e9-7847-4341-8a8e-dfdc2d531bbe/code.power index ebacc20..d86a676 100644 --- a/src/1b8a40e9-7847-4341-8a8e-dfdc2d531bbe/code.power +++ b/src/1b8a40e9-7847-4341-8a8e-dfdc2d531bbe/code.power @@ -123,7 +123,7 @@ . "\$button_code_name = \$this->getAttribute('name');"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the input from url"; - $addButton[] = Indent::_(3) . "\$app = Factory::getApplication();"; + $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();"; $addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the view name & id"; @@ -150,7 +150,7 @@ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " get the return value."; $addButton[] = Indent::_(4) - . "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; $addButton[] = Indent::_(4) . "\$_return = urlencode(base64_encode(\$_uri));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) @@ -175,7 +175,7 @@ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " get the return value."; $addButton[] = Indent::_(4) - . "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; $addButton[] = Indent::_(4) . "\$_return = urlencode(base64_encode(\$_uri));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) @@ -200,7 +200,7 @@ . "\$button_label = ucfirst(strtolower(\$button_label));"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get user object"; - $addButton[] = Indent::_(3) . "\$user = Factory::getApplication()->getIdentity();"; + $addButton[] = Indent::_(3) . "\$user = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();"; $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " only add if user allowed to create " . $fieldData['view']; // check if the item has permissions. @@ -241,7 +241,11 @@ $addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {"; $addButton[] = Indent::_(6) - . "document.getElementById('jform_\".\$button_code_name.\"').addEventListener('change', function(e) {"; + . "let \".\$button_code_name.\"Field = document.getElementById('jform_\".\$button_code_name.\"');"; + $addButton[] = Indent::_(6) + . "if (!\".\$button_code_name.\"Field) { return; }"; + $addButton[] = Indent::_(6) + . "\".\$button_code_name.\"Field.addEventListener('change', function(e) {"; $addButton[] = Indent::_(7) . "e.preventDefault();"; $addButton[] = Indent::_(7) . "let \".\$button_code_name.\"Value = this.value;"; @@ -249,7 +253,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \""; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; $addButton[] = Indent::_(6) . "});"; $addButton[] = Indent::_(6) - . "let \".\$button_code_name.\"Value = document.getElementById('jform_\".\$button_code_name.\"').value;"; + . "let \".\$button_code_name.\"Value = \".\$button_code_name.\"Field.value;"; $addButton[] = Indent::_(6) . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; $addButton[] = Indent::_(5) . "});"; @@ -293,7 +297,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " Load the needed script."; $addButton[] = Indent::_(4) - . "\$document = Factory::getApplication()->getDocument();"; + . "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();"; $addButton[] = Indent::_(4) . "\$document->addScriptDeclaration(implode(' ',\$script));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) diff --git a/src/20cf1825-29d0-4c6c-8fe9-a1e13a4dac53/code.php b/src/20cf1825-29d0-4c6c-8fe9-a1e13a4dac53/code.php index 23aaf39..a99866e 100644 --- a/src/20cf1825-29d0-4c6c-8fe9-a1e13a4dac53/code.php +++ b/src/20cf1825-29d0-4c6c-8fe9-a1e13a4dac53/code.php @@ -329,10 +329,11 @@ final class ConfigFieldsets $field['custom_value'] )) { - // add array if found - if ((strpos((string) $field['custom_value'], '["') !== false) - && (strpos((string) $field['custom_value'], '"]') - !== false)) + // add array or object if found + if (((strpos((string) $field['custom_value'], '["') !== false) + && (strpos((string) $field['custom_value'], '"]') !== false)) || + ((strpos((string) $field['custom_value'], '{"') !== false) + && (strpos((string) $field['custom_value'], '"}') !== false))) { // load the Global checkin defautls $this->extensionsparams->add('component', '"' . $fieldName diff --git a/src/20cf1825-29d0-4c6c-8fe9-a1e13a4dac53/code.power b/src/20cf1825-29d0-4c6c-8fe9-a1e13a4dac53/code.power index 0ac9ea2..5ca9f06 100644 --- a/src/20cf1825-29d0-4c6c-8fe9-a1e13a4dac53/code.power +++ b/src/20cf1825-29d0-4c6c-8fe9-a1e13a4dac53/code.power @@ -283,10 +283,11 @@ $field['custom_value'] )) { - // add array if found - if ((strpos((string) $field['custom_value'], '["') !== false) - && (strpos((string) $field['custom_value'], '"]') - !== false)) + // add array or object if found + if (((strpos((string) $field['custom_value'], '["') !== false) + && (strpos((string) $field['custom_value'], '"]') !== false)) || + ((strpos((string) $field['custom_value'], '{"') !== false) + && (strpos((string) $field['custom_value'], '"}') !== false))) { // load the Global checkin defautls $this->extensionsparams->add('component', '"' . $fieldName diff --git a/src/5c75b455-3d4c-452a-867e-e90424a64c88/code.php b/src/5c75b455-3d4c-452a-867e-e90424a64c88/code.php index a6046da..cf9fb95 100644 --- a/src/5c75b455-3d4c-452a-867e-e90424a64c88/code.php +++ b/src/5c75b455-3d4c-452a-867e-e90424a64c88/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/5c75b455-3d4c-452a-867e-e90424a64c88/settings.json b/src/5c75b455-3d4c-452a-867e-e90424a64c88/settings.json index 4444e29..5561400 100644 --- a/src/5c75b455-3d4c-452a-867e-e90424a64c88/settings.json +++ b/src/5c75b455-3d4c-452a-867e-e90424a64c88/settings.json @@ -30,7 +30,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Compiler.Utilities.File", "description": "File helper\r\n\r\n@since 3.2.0", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "use Joomla\\CMS\\Filesystem\\File as JoomlaFile;", "composer": "" } \ No newline at end of file diff --git a/src/6bbb6ffe-3f09-4c21-aa9d-c93159afa1e1/code.php b/src/6bbb6ffe-3f09-4c21-aa9d-c93159afa1e1/code.php index 4313f08..ec61e5a 100644 --- a/src/6bbb6ffe-3f09-4c21-aa9d-c93159afa1e1/code.php +++ b/src/6bbb6ffe-3f09-4c21-aa9d-c93159afa1e1/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/6bbb6ffe-3f09-4c21-aa9d-c93159afa1e1/settings.json b/src/6bbb6ffe-3f09-4c21-aa9d-c93159afa1e1/settings.json index 710e21b..612b118 100644 --- a/src/6bbb6ffe-3f09-4c21-aa9d-c93159afa1e1/settings.json +++ b/src/6bbb6ffe-3f09-4c21-aa9d-c93159afa1e1/settings.json @@ -30,7 +30,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Compiler.Utilities.Folder", "description": "Folder helper\r\n\r\n@since 3.2.0", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "use Joomla\\CMS\\Filesystem\\Folder as JoomlaFolder;\r\nuse Joomla\\CMS\\Filesystem\\File as JoomlaFile;", "composer": "" } \ No newline at end of file diff --git a/src/8c7abe76-516e-4c4f-97c1-244ca43b7726/code.php b/src/8c7abe76-516e-4c4f-97c1-244ca43b7726/code.php index f60ca27..dc30647 100644 --- a/src/8c7abe76-516e-4c4f-97c1-244ca43b7726/code.php +++ b/src/8c7abe76-516e-4c4f-97c1-244ca43b7726/code.php @@ -87,8 +87,7 @@ final class CreateUser implements CreateUserInterface $method[] = Indent::_(2) . "\$lang = Factory::getLanguage();"; $method[] = Indent::_(2) . "\$extension = 'com_users';"; $method[] = Indent::_(2) . "\$base_dir = JPATH_SITE;"; - $method[] = Indent::_(2) . "\$language_tag = '" . CFactory::_('Config')->get('lang_tag', 'en-GB') - . "';"; + $method[] = Indent::_(2) . "\$language_tag = 'en-GB';"; $method[] = Indent::_(2) . "\$reload = true;"; $method[] = Indent::_(2) . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; @@ -306,8 +305,7 @@ final class CreateUser implements CreateUserInterface $method[] = Indent::_(2) . "\$lang = Factory::getLanguage();"; $method[] = Indent::_(2) . "\$extension = 'com_users';"; $method[] = Indent::_(2) . "\$base_dir = JPATH_ADMINISTRATOR;"; - $method[] = Indent::_(2) . "\$language_tag = '" . CFactory::_('Config')->get('lang_tag', 'en-GB') - . "';"; + $method[] = Indent::_(2) . "\$language_tag = 'en-GB';"; $method[] = Indent::_(2) . "\$reload = true;"; $method[] = Indent::_(2) . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; diff --git a/src/8c7abe76-516e-4c4f-97c1-244ca43b7726/code.power b/src/8c7abe76-516e-4c4f-97c1-244ca43b7726/code.power index cc47b92..d0c17f3 100644 --- a/src/8c7abe76-516e-4c4f-97c1-244ca43b7726/code.power +++ b/src/8c7abe76-516e-4c4f-97c1-244ca43b7726/code.power @@ -61,8 +61,7 @@ $method[] = Indent::_(2) . "\$lang = Factory::getLanguage();"; $method[] = Indent::_(2) . "\$extension = 'com_users';"; $method[] = Indent::_(2) . "\$base_dir = JPATH_SITE;"; - $method[] = Indent::_(2) . "\$language_tag = '" . CFactory::_('Config')->get('lang_tag', 'en-GB') - . "';"; + $method[] = Indent::_(2) . "\$language_tag = 'en-GB';"; $method[] = Indent::_(2) . "\$reload = true;"; $method[] = Indent::_(2) . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; @@ -280,8 +279,7 @@ $method[] = Indent::_(2) . "\$lang = Factory::getLanguage();"; $method[] = Indent::_(2) . "\$extension = 'com_users';"; $method[] = Indent::_(2) . "\$base_dir = JPATH_ADMINISTRATOR;"; - $method[] = Indent::_(2) . "\$language_tag = '" . CFactory::_('Config')->get('lang_tag', 'en-GB') - . "';"; + $method[] = Indent::_(2) . "\$language_tag = 'en-GB';"; $method[] = Indent::_(2) . "\$reload = true;"; $method[] = Indent::_(2) . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; diff --git a/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/README.md b/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/README.md index 15cd030..d7e27e9 100644 --- a/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/README.md +++ b/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/README.md @@ -14,7 +14,7 @@ class Sqldump #Gold { # Registry $registry # $db - + __construct(?Registry $registry = null) + + __construct(Registry $registry) + get(array $tables, string $view, ...) : ?string # escape(string|array $value) : string|array } diff --git a/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/code.php b/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/code.php index bc76ac2..3cf0ef6 100644 --- a/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/code.php +++ b/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/code.php @@ -13,7 +13,6 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model; use Joomla\CMS\Factory; -use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Registry; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; @@ -45,14 +44,13 @@ class Sqldump /** * Constructor * - * @param Registry|null $registry The compiler registry object. - * @param \JDatabaseDriver|null $db The database object. + * @param Registry $registry The compiler registry object. * @since 3.2.0 */ - public function __construct(?Registry $registry = null) + public function __construct(Registry $registry) { - $this->registry = $registry ?: Compiler::_('Registry'); + $this->registry = $registry; $this->db = Factory::getDbo(); } diff --git a/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/code.power b/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/code.power index 52223bb..83ba31f 100644 --- a/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/code.power +++ b/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/code.power @@ -16,14 +16,13 @@ /** * Constructor * - * @param Registry|null $registry The compiler registry object. - * @param \JDatabaseDriver|null $db The database object. + * @param Registry $registry The compiler registry object. * @since 3.2.0 */ - public function __construct(?Registry $registry = null) + public function __construct(Registry $registry) { - $this->registry = $registry ?: Compiler::_('Registry'); + $this->registry = $registry; $this->db = Factory::getDbo(); } diff --git a/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/settings.json b/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/settings.json index 146d2b0..ee09c6c 100644 --- a/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/settings.json +++ b/src/a6e1227c-1efe-407d-84ef-03c6989a6a88/settings.json @@ -10,10 +10,6 @@ "system_name": "JCB.Compiler.Model.Sqldump", "type": "class", "use_selection": { - "use_selection0": { - "use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac", - "as": "Compiler" - }, "use_selection1": { "use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6", "as": "default" diff --git a/src/b80296eb-4718-4ed3-894d-69f3ac293733/README.md b/src/b80296eb-4718-4ed3-894d-69f3ac293733/README.md index c425a29..8232a78 100644 --- a/src/b80296eb-4718-4ed3-894d-69f3ac293733/README.md +++ b/src/b80296eb-4718-4ed3-894d-69f3ac293733/README.md @@ -14,7 +14,7 @@ class Updatesql #Gold { # array $name # Registry $registry - + __construct(?Registry $registry = null) + + __construct(Registry $registry) + set(mixed $old, mixed $new, ...) : void # add(string $type, int $item, ...) : void # name(int $id) : string diff --git a/src/b80296eb-4718-4ed3-894d-69f3ac293733/code.php b/src/b80296eb-4718-4ed3-894d-69f3ac293733/code.php index c2242e1..0bc9151 100644 --- a/src/b80296eb-4718-4ed3-894d-69f3ac293733/code.php +++ b/src/b80296eb-4718-4ed3-894d-69f3ac293733/code.php @@ -12,7 +12,6 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model; -use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Registry; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\StringHelper; @@ -45,13 +44,13 @@ class Updatesql /** * Constructor * - * @param Registry|null $registry The compiler registry object. + * @param Registry $registry The compiler registry object. * * @since 3.2.0 */ - public function __construct(?Registry $registry = null) + public function __construct(Registry $registry) { - $this->registry = $registry ?: Compiler::_('Registry'); + $this->registry = $registry; } /** diff --git a/src/b80296eb-4718-4ed3-894d-69f3ac293733/code.power b/src/b80296eb-4718-4ed3-894d-69f3ac293733/code.power index d548723..ea18b2a 100644 --- a/src/b80296eb-4718-4ed3-894d-69f3ac293733/code.power +++ b/src/b80296eb-4718-4ed3-894d-69f3ac293733/code.power @@ -17,13 +17,13 @@ /** * Constructor * - * @param Registry|null $registry The compiler registry object. + * @param Registry $registry The compiler registry object. * * @since 3.2.0 */ - public function __construct(?Registry $registry = null) + public function __construct(Registry $registry) { - $this->registry = $registry ?: Compiler::_('Registry'); + $this->registry = $registry; } /** diff --git a/src/b80296eb-4718-4ed3-894d-69f3ac293733/settings.json b/src/b80296eb-4718-4ed3-894d-69f3ac293733/settings.json index 9ca7ce6..f572076 100644 --- a/src/b80296eb-4718-4ed3-894d-69f3ac293733/settings.json +++ b/src/b80296eb-4718-4ed3-894d-69f3ac293733/settings.json @@ -10,10 +10,6 @@ "system_name": "JCB.Compiler.Model.Updatesql", "type": "class", "use_selection": { - "use_selection0": { - "use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac", - "as": "Compiler" - }, "use_selection1": { "use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6", "as": "default" diff --git a/src/b836c1b1-b6b1-44f7-b8a2-9a763a4185b1/code.php b/src/b836c1b1-b6b1-44f7-b8a2-9a763a4185b1/code.php index 5cdee82..3909be3 100644 --- a/src/b836c1b1-b6b1-44f7-b8a2-9a763a4185b1/code.php +++ b/src/b836c1b1-b6b1-44f7-b8a2-9a763a4185b1/code.php @@ -492,7 +492,7 @@ class Power implements PowerInterface $this->active[$guid]->file_name = array_pop($src_array); // namespace array - $namespace_array = [...$path_array, ...$src_array]; + $namespace_array = array_merge($path_array, $src_array); } else { @@ -534,12 +534,12 @@ class Power implements PowerInterface // set the actual class namespace $this->active[$guid]->_namespace = implode('\\', $namespace_array); - // set global namespaces for autoloader - $this->namespace[implode('.', $path_array)] = $path_array; - // get the parent folder (the first value in array) $prefix_folder = implode('.', $path_array); + // set global namespaces for autoloader + $this->namespace[$prefix_folder] = $path_array; + // make sub folders if still found $sub_folder = ''; if (ArrayHelper::check($src_array)) diff --git a/src/b836c1b1-b6b1-44f7-b8a2-9a763a4185b1/code.power b/src/b836c1b1-b6b1-44f7-b8a2-9a763a4185b1/code.power index 1a2a41e..a07e9fd 100644 --- a/src/b836c1b1-b6b1-44f7-b8a2-9a763a4185b1/code.power +++ b/src/b836c1b1-b6b1-44f7-b8a2-9a763a4185b1/code.power @@ -454,7 +454,7 @@ $this->active[$guid]->file_name = array_pop($src_array); // namespace array - $namespace_array = [...$path_array, ...$src_array]; + $namespace_array = array_merge($path_array, $src_array); } else { @@ -496,12 +496,12 @@ // set the actual class namespace $this->active[$guid]->_namespace = implode('\\', $namespace_array); - // set global namespaces for autoloader - $this->namespace[implode('.', $path_array)] = $path_array; - // get the parent folder (the first value in array) $prefix_folder = implode('.', $path_array); + // set global namespaces for autoloader + $this->namespace[$prefix_folder] = $path_array; + // make sub folders if still found $sub_folder = ''; if (ArrayHelper::check($src_array)) diff --git a/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/README.md b/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/README.md index 6e6d97e..997a4ce 100644 --- a/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/README.md +++ b/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/README.md @@ -14,7 +14,7 @@ class Sql #Gold { # Dispenser $dispenser # Sqldump $dump - + __construct(?Dispenser $dispenser = null, ?Sqldump $dump = null) + + __construct(Dispenser $dispenser, Sqldump $dump) + set(object $item) : void } diff --git a/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/code.php b/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/code.php index ac2df63..ff794ed 100644 --- a/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/code.php +++ b/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/code.php @@ -12,7 +12,6 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model; -use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; use VDM\Joomla\Componentbuilder\Compiler\Model\Sqldump; @@ -43,15 +42,15 @@ class Sql /** * Constructor * - * @param Dispenser|null $dispenser The compiler customcode dispenser. - * @param Sqldump|null $dump The compiler SQL dump. + * @param Dispenser $dispenser The compiler customcode dispenser. + * @param Sqldump $dump The compiler SQL dump. * * @since 3.2.0 */ - public function __construct(?Dispenser $dispenser = null, ?Sqldump $dump = null) + public function __construct(Dispenser $dispenser, Sqldump $dump) { - $this->dispenser = $dispenser ?: Compiler::_('Customcode.Dispenser'); - $this->dump = $dump ?: Compiler::_('Model.Sqldump'); + $this->dispenser = $dispenser; + $this->dump = $dump; } /** @@ -91,7 +90,6 @@ class Sql unset($item->tables); unset($item->sql); - } - + } } diff --git a/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/code.power b/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/code.power index 5dcf419..73113bc 100644 --- a/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/code.power +++ b/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/code.power @@ -17,15 +17,15 @@ /** * Constructor * - * @param Dispenser|null $dispenser The compiler customcode dispenser. - * @param Sqldump|null $dump The compiler SQL dump. + * @param Dispenser $dispenser The compiler customcode dispenser. + * @param Sqldump $dump The compiler SQL dump. * * @since 3.2.0 */ - public function __construct(?Dispenser $dispenser = null, ?Sqldump $dump = null) + public function __construct(Dispenser $dispenser, Sqldump $dump) { - $this->dispenser = $dispenser ?: Compiler::_('Customcode.Dispenser'); - $this->dump = $dump ?: Compiler::_('Model.Sqldump'); + $this->dispenser = $dispenser; + $this->dump = $dump; } /** @@ -65,4 +65,4 @@ unset($item->tables); unset($item->sql); - } + } \ No newline at end of file diff --git a/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/settings.json b/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/settings.json index 57fb8f2..d28d7a5 100644 --- a/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/settings.json +++ b/src/d4b418a7-bf9b-4768-969d-e07c36916fd2/settings.json @@ -10,10 +10,6 @@ "system_name": "JCB.Compiler.Model.Sql", "type": "class", "use_selection": { - "use_selection0": { - "use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac", - "as": "Compiler" - }, "use_selection1": { "use": "f1dc6430-fb54-452e-aa53-ce32ae93db88", "as": "default" diff --git a/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/README.md b/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/README.md index e8c8798..42bcf91 100644 --- a/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/README.md +++ b/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/README.md @@ -13,7 +13,7 @@ @startuml class Sqltweaking #Gold { # Registry $registry - + __construct(?Registry $registry = null) + + __construct(Registry $registry) + set(object $item) : void # tweak(array $settings) : void } diff --git a/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/code.php b/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/code.php index 960f607..dfba9c9 100644 --- a/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/code.php +++ b/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/code.php @@ -12,7 +12,6 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model; -use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Registry; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; @@ -37,13 +36,13 @@ class Sqltweaking /** * Constructor * - * @param Registry|null $registry The compiler registry object. + * @param Registry $registry The compiler registry object. * * @since 3.2.0 */ - public function __construct(?Registry $registry = null) + public function __construct(Registry $registry) { - $this->registry = $registry ?: Compiler::_('Registry'); + $this->registry = $registry; } /** diff --git a/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/code.power b/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/code.power index 609ac30..6e335ed 100644 --- a/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/code.power +++ b/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/code.power @@ -9,13 +9,13 @@ /** * Constructor * - * @param Registry|null $registry The compiler registry object. + * @param Registry $registry The compiler registry object. * * @since 3.2.0 */ - public function __construct(?Registry $registry = null) + public function __construct(Registry $registry) { - $this->registry = $registry ?: Compiler::_('Registry'); + $this->registry = $registry; } /** diff --git a/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/settings.json b/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/settings.json index 91edaf4..863227f 100644 --- a/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/settings.json +++ b/src/e50cbac5-9c9d-4fd4-aa7a-5e830719ed26/settings.json @@ -10,10 +10,6 @@ "system_name": "JCB.Compiler.Model.Sqltweaking", "type": "class", "use_selection": { - "use_selection0": { - "use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac", - "as": "Compiler" - }, "use_selection1": { "use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6", "as": "default" diff --git a/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/README.md b/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/README.md index 98b9ad2..e712107 100644 --- a/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/README.md +++ b/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/README.md @@ -18,7 +18,7 @@ class Dispenser #Gold { # Gui $gui # Hash $hash # LockBase $base64 - + __construct(?Placeholder $placeholder = null, ?Customcode $customcode = null, ...) + + __construct(Placeholder $placeholder, Customcode $customcode, ...) + set(string $script, string $first, ...) : bool + get(string $first, string $second, ...) : mixed # initHub(string $first, ?string $second = null, ...) : void @@ -31,11 +31,11 @@ note right of Dispenser::__construct since: 3.2.0 arguments: - ?Placeholder $placeholder = null - ?Customcode $customcode = null - ?Gui $gui = null - ?Hash $hash = null - ?LockBase $base64 = null + Placeholder $placeholder + Customcode $customcode + Gui $gui + Hash $hash + LockBase $lockbase end note note right of Dispenser::set diff --git a/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/code.php b/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/code.php index ed919e2..73bd80d 100644 --- a/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/code.php +++ b/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/code.php @@ -12,13 +12,12 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Customcode; -use VDM\Joomla\Utilities\StringHelper; -use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; -use VDM\Joomla\Componentbuilder\Compiler\Customcode; use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Customcode; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Hash; use VDM\Joomla\Componentbuilder\Compiler\Customcode\LockBase; +use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Customcode\DispenserInterface; @@ -33,7 +32,7 @@ class Dispenser implements DispenserInterface * Customcode Dispenser Hub * * @var array - * @since 3.2.0 + * @since 3.2.0 **/ public array $hub; @@ -41,7 +40,7 @@ class Dispenser implements DispenserInterface * Compiler Placeholder * * @var Placeholder - * @since 3.2.0 + * @since 3.2.0 **/ protected Placeholder $placeholder; @@ -49,7 +48,7 @@ class Dispenser implements DispenserInterface * Compiler Customcode * * @var Customcode - * @since 3.2.0 + * @since 3.2.0 **/ protected Customcode $customcode; @@ -57,7 +56,7 @@ class Dispenser implements DispenserInterface * Compiler Customcode in Gui * * @var Gui - * @since 3.2.0 + * @since 3.2.0 **/ protected Gui $gui; @@ -65,7 +64,7 @@ class Dispenser implements DispenserInterface * Compiler Customcode to Hash * * @var Hash - * @since 3.2.0 + * @since 3.2.0 **/ protected Hash $hash; @@ -73,29 +72,29 @@ class Dispenser implements DispenserInterface * Compiler Customcode to LockBase * * @var LockBase - * @since 3.2.0 + * @since 3.2.0 **/ protected LockBase $base64; /** * Constructor. * - * @param Placeholder|null $placeholder The compiler placeholder object. - * @param Customcode|null $customcode The compiler customcode object. - * @param Gui|null $gui The compiler customcode gui object. - * @param Hash|null $hash The compiler customcode hash object. - * @param LockBase|null $base64 The compiler customcode lock base64 object. + * @param Placeholder $placeholder The Placeholder Class. + * @param Customcode $customcode The Customcode Class. + * @param Gui $gui The Gui Class. + * @param Hash $hash The Hash Class. + * @param LockBase $lockbase The LockBase Class. * * @since 3.2.0 */ - public function __construct(?Placeholder $placeholder = null, ?Customcode $customcode = null, - ?Gui $gui = null, ?Hash $hash = null, ?LockBase $base64 = null) + public function __construct(Placeholder $placeholder, Customcode $customcode, Gui $gui, + Hash $hash, LockBase $lockbase) { - $this->placeholder = $placeholder ?: Compiler::_('Placeholder'); - $this->customcode = $customcode ?: Compiler::_('Customcode'); - $this->gui = $gui ?: Compiler::_('Customcode.Gui'); - $this->hash = $hash ?: Compiler::_('Customcode.Hash'); - $this->base64 = $base64 ?: Compiler::_('Customcode.LockBase'); + $this->placeholder = $placeholder; + $this->customcode = $customcode; + $this->gui = $gui; + $this->hash = $hash; + $this->base64 = $lockbase; } /** @@ -114,7 +113,7 @@ class Dispenser implements DispenserInterface * default: false * * @return bool true on success - * @since 3.2.0 + * @since 3.2.0 */ public function set(&$script, string $first, ?string $second = null, ?string $third = null, array $config = [], bool $base64 = true, bool $dynamic = true, bool $add = false): bool @@ -177,7 +176,7 @@ class Dispenser implements DispenserInterface * @param string $suffix The suffix to add after the script if found * * @return mixed The string/script if found or the default value if not found - * @since 3.2.0 + * @since 3.2.0 */ public function get(string $first, string $second, string $prefix = '', ?string $note = null, bool $unset = false, $default = null, string $suffix = '') @@ -224,7 +223,7 @@ class Dispenser implements DispenserInterface * default: false * * @return void - * @since 3.2.0 + * @since 3.2.0 */ protected function initHub(string $first, ?string $second = null, ?string $third = null, bool $add = false) { @@ -255,7 +254,7 @@ class Dispenser implements DispenserInterface * default: false * * @return void - * @since 3.2.0 + * @since 3.2.0 */ protected function setHub(string $script, string $first, ?string $second = null, ?string $third = null, bool $add = false) { diff --git a/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/code.power b/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/code.power index ebfd838..4f641bd 100644 --- a/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/code.power +++ b/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/code.power @@ -2,7 +2,7 @@ * Customcode Dispenser Hub * * @var array - * @since 3.2.0 + * @since 3.2.0 **/ public array $hub; @@ -10,7 +10,7 @@ * Compiler Placeholder * * @var Placeholder - * @since 3.2.0 + * @since 3.2.0 **/ protected Placeholder $placeholder; @@ -18,7 +18,7 @@ * Compiler Customcode * * @var Customcode - * @since 3.2.0 + * @since 3.2.0 **/ protected Customcode $customcode; @@ -26,7 +26,7 @@ * Compiler Customcode in Gui * * @var Gui - * @since 3.2.0 + * @since 3.2.0 **/ protected Gui $gui; @@ -34,7 +34,7 @@ * Compiler Customcode to Hash * * @var Hash - * @since 3.2.0 + * @since 3.2.0 **/ protected Hash $hash; @@ -42,29 +42,29 @@ * Compiler Customcode to LockBase * * @var LockBase - * @since 3.2.0 + * @since 3.2.0 **/ protected LockBase $base64; /** * Constructor. * - * @param Placeholder|null $placeholder The compiler placeholder object. - * @param Customcode|null $customcode The compiler customcode object. - * @param Gui|null $gui The compiler customcode gui object. - * @param Hash|null $hash The compiler customcode hash object. - * @param LockBase|null $base64 The compiler customcode lock base64 object. + * @param Placeholder $placeholder The Placeholder Class. + * @param Customcode $customcode The Customcode Class. + * @param Gui $gui The Gui Class. + * @param Hash $hash The Hash Class. + * @param LockBase $lockbase The LockBase Class. * * @since 3.2.0 */ - public function __construct(?Placeholder $placeholder = null, ?Customcode $customcode = null, - ?Gui $gui = null, ?Hash $hash = null, ?LockBase $base64 = null) + public function __construct(Placeholder $placeholder, Customcode $customcode, Gui $gui, + Hash $hash, LockBase $lockbase) { - $this->placeholder = $placeholder ?: Compiler::_('Placeholder'); - $this->customcode = $customcode ?: Compiler::_('Customcode'); - $this->gui = $gui ?: Compiler::_('Customcode.Gui'); - $this->hash = $hash ?: Compiler::_('Customcode.Hash'); - $this->base64 = $base64 ?: Compiler::_('Customcode.LockBase'); + $this->placeholder = $placeholder; + $this->customcode = $customcode; + $this->gui = $gui; + $this->hash = $hash; + $this->base64 = $lockbase; } /** @@ -83,7 +83,7 @@ * default: false * * @return bool true on success - * @since 3.2.0 + * @since 3.2.0 */ public function set(&$script, string $first, ?string $second = null, ?string $third = null, array $config = [], bool $base64 = true, bool $dynamic = true, bool $add = false): bool @@ -146,7 +146,7 @@ * @param string $suffix The suffix to add after the script if found * * @return mixed The string/script if found or the default value if not found - * @since 3.2.0 + * @since 3.2.0 */ public function get(string $first, string $second, string $prefix = '', ?string $note = null, bool $unset = false, $default = null, string $suffix = '') @@ -193,7 +193,7 @@ * default: false * * @return void - * @since 3.2.0 + * @since 3.2.0 */ protected function initHub(string $first, ?string $second = null, ?string $third = null, bool $add = false) { @@ -224,7 +224,7 @@ * default: false * * @return void - * @since 3.2.0 + * @since 3.2.0 */ protected function setHub(string $script, string $first, ?string $second = null, ?string $third = null, bool $add = false) { diff --git a/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/settings.json b/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/settings.json index b429622..741dd99 100644 --- a/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/settings.json +++ b/src/f1dc6430-fb54-452e-aa53-ce32ae93db88/settings.json @@ -13,32 +13,28 @@ "type": "class", "use_selection": { "use_selection0": { - "use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef", - "as": "default" - }, - "use_selection1": { - "use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac", - "as": "Compiler" - }, - "use_selection2": { - "use": "313b43c4-98c3-4f62-9177-2d73ec8eba31", - "as": "default" - }, - "use_selection3": { "use": "06453ada-e370-49f0-b262-e3f5a8ed0c2c", "as": "default" }, - "use_selection4": { + "use_selection1": { + "use": "313b43c4-98c3-4f62-9177-2d73ec8eba31", + "as": "default" + }, + "use_selection2": { "use": "1bd48df2-4f7e-4581-9fe9-4b54e59105e3", "as": "default" }, - "use_selection5": { + "use_selection3": { "use": "797579e8-b272-41ed-91de-428cb0b3e089", "as": "default" }, - "use_selection6": { + "use_selection4": { "use": "7c07c9d6-34cd-4491-934a-ef0a83f414c0", "as": "default" + }, + "use_selection5": { + "use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef", + "as": "default" } }, "extendsinterfaces": null, diff --git a/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.php b/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.php index 8c1e61f..1c23e07 100644 --- a/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.php +++ b/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.php @@ -543,14 +543,7 @@ class Config extends BaseConfig */ protected function getRemovelinebreaks(): bool { - // get posted value - $value = $this->input->post->get('remove_line_breaks', 2, 'INT'); - // get global - if ($value > 1) - { - return (bool) GetHelper::var('joomla_component', $this->component_id, 'id', 'remove_line_breaks'); - } - return (bool) $value; + return (bool) true; } /** diff --git a/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.power b/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.power index 1c45c10..adfbe24 100644 --- a/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.power +++ b/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.power @@ -507,14 +507,7 @@ */ protected function getRemovelinebreaks(): bool { - // get posted value - $value = $this->input->post->get('remove_line_breaks', 2, 'INT'); - // get global - if ($value > 1) - { - return (bool) GetHelper::var('joomla_component', $this->component_id, 'id', 'remove_line_breaks'); - } - return (bool) $value; + return (bool) true; } /**