diff --git a/src/01a89ba8-f8bb-435c-93de-0a8f3fa9432a/code.php b/src/01a89ba8-f8bb-435c-93de-0a8f3fa9432a/code.php index 8d02dd6..a12ee8c 100644 --- a/src/01a89ba8-f8bb-435c-93de-0a8f3fa9432a/code.php +++ b/src/01a89ba8-f8bb-435c-93de-0a8f3fa9432a/code.php @@ -17,7 +17,7 @@ use VDM\Joomla\Componentbuilder\Search\Service\Search; use VDM\Joomla\Componentbuilder\Search\Service\Model; use VDM\Joomla\Componentbuilder\Search\Service\Database; use VDM\Joomla\Componentbuilder\Search\Service\Agent; -use VDM\Joomla\Componentbuilder\Interfaces\FactoryInterface; +use VDM\Joomla\Interfaces\FactoryInterface; /** diff --git a/src/02efe40a-7792-4c82-9444-7d0377243483/code.php b/src/02efe40a-7792-4c82-9444-7d0377243483/code.php index d4e32be..88dd614 100644 --- a/src/02efe40a-7792-4c82-9444-7d0377243483/code.php +++ b/src/02efe40a-7792-4c82-9444-7d0377243483/code.php @@ -16,8 +16,8 @@ use VDM\Joomla\Componentbuilder\Search\Factory; use VDM\Joomla\Componentbuilder\Table; use VDM\Joomla\Componentbuilder\Search\Config; use VDM\Joomla\Utilities\ArrayHelper; -use VDM\Joomla\Componentbuilder\Interfaces\ModelInterface; -use VDM\Joomla\Componentbuilder\Abstraction\Model; +use VDM\Joomla\Interfaces\ModelInterface; +use VDM\Joomla\Abstraction\Model; /** diff --git a/src/2dabfb4a-64cd-4c04-9772-4a75f9f3b710/code.php b/src/2dabfb4a-64cd-4c04-9772-4a75f9f3b710/code.php index 4dbefc3..646fb0e 100644 --- a/src/2dabfb4a-64cd-4c04-9772-4a75f9f3b710/code.php +++ b/src/2dabfb4a-64cd-4c04-9772-4a75f9f3b710/code.php @@ -17,7 +17,7 @@ use VDM\Joomla\Componentbuilder\Search\Factory; use VDM\Joomla\Componentbuilder\Search\Config; use VDM\Joomla\Componentbuilder\Table; use VDM\Joomla\Componentbuilder\Search\Model\Load as Model; -use VDM\Joomla\Componentbuilder\Database\Load as Database; +use VDM\Joomla\Database\Load as Database; use VDM\Joomla\Componentbuilder\Search\Interfaces\LoadInterface; diff --git a/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/README.md b/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/README.md index 0700b36..a95785b 100644 --- a/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/README.md +++ b/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/README.md @@ -11,6 +11,8 @@ ```uml @startuml class Config #Gold { + # Input $input + + __construct(?Input $input = null) # getTypesearch() : ?int # getSearchvalue() : ?string # getReplacevalue() : string @@ -27,98 +29,104 @@ class Config #Gold { # getMarkerend() : string } -note right of Config::getTypesearch +note right of Config::__construct + Constructor + + since: 3.2.0 +end note + +note left of Config::getTypesearch get type search being preformed since: 3.2.0 return: ?int end note -note left of Config::getSearchvalue +note right of Config::getSearchvalue get posted search value since: 3.2.0 return: ?string end note -note right of Config::getReplacevalue +note left of Config::getReplacevalue get posted replace value since: 3.2.0 return: string end note -note left of Config::getMatchcase +note right of Config::getMatchcase get posted search match case since: 3.2.0 return: int end note -note right of Config::getWholeword +note left of Config::getWholeword get posted search whole word since: 3.2.0 return: int end note -note left of Config::getRegexsearch +note right of Config::getRegexsearch get posted search regex since: 3.2.0 return: int end note -note right of Config::getComponentid +note left of Config::getComponentid get posted component since: 3.2.0 return: int end note -note left of Config::getTablename +note right of Config::getTablename get posted area/table since: 3.2.0 return: ?string end note -note right of Config::getFieldname +note left of Config::getFieldname get posted field since: 3.2.0 return: ?string end note -note left of Config::getItemid +note right of Config::getItemid get posted item id since: 3.2.0 return: int end note -note right of Config::getFieldcounter +note left of Config::getFieldcounter get field counter since: 3.2.0 return: int end note -note left of Config::getLinecounter +note right of Config::getLinecounter get line counter since: 3.2.0 return: int end note -note right of Config::getMarkerstart +note left of Config::getMarkerstart get the start marker since: 3.2.0 return: string end note -note left of Config::getMarkerend +note right of Config::getMarkerend get the end marker since: 3.2.0 diff --git a/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/code.php b/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/code.php index 004d4c7..ecb35d9 100644 --- a/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/code.php +++ b/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/code.php @@ -12,7 +12,9 @@ namespace VDM\Joomla\Componentbuilder\Search; -use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; +use Joomla\CMS\Factory; +use Joomla\Input\Input; +use VDM\Joomla\Abstraction\BaseConfig; /** @@ -22,6 +24,30 @@ use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; */ class Config extends BaseConfig { + /** + * Hold a JInput object for easier access to the input variables. + * + * @var Input + * @since 3.2.0 + */ + protected Input $input; + + /** + * Constructor + * + * @param Input|null $input Input + * + * @throws \Exception + * @since 3.2.0 + */ + public function __construct(?Input $input = null) + { + $this->input = $input ?: Factory::getApplication()->input; + + // run parent constructor + parent::__construct(); + } + /** * get type search being preformed * diff --git a/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/code.power b/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/code.power index 6275792..e571999 100644 --- a/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/code.power +++ b/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/code.power @@ -1,3 +1,27 @@ + /** + * Hold a JInput object for easier access to the input variables. + * + * @var Input + * @since 3.2.0 + */ + protected Input $input; + + /** + * Constructor + * + * @param Input|null $input Input + * + * @throws \Exception + * @since 3.2.0 + */ + public function __construct(?Input $input = null) + { + $this->input = $input ?: Factory::getApplication()->input; + + // run parent constructor + parent::__construct(); + } + /** * get type search being preformed * diff --git a/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/settings.json b/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/settings.json index 3faf8e7..87a9693 100644 --- a/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/settings.json +++ b/src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/settings.json @@ -1,7 +1,7 @@ { - "add_head": "0", + "add_head": "1", "add_licensing_template": "2", - "extends": "9769f3b2-17bf-4f20-b54b-3a4ebe572b36", + "extends": "ffbd4e1f-a342-4080-ab7d-1de3741bf319", "guid": "6e2ca779-f70e-4871-a138-0ee5eaec6a97", "implements": null, "load_selection": null, @@ -13,6 +13,6 @@ "namespace": "VDM\\Joomla\\Componentbuilder.Search.Config", "description": "Search Configurations\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\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": "", + "head": "use Joomla\\CMS\\Factory;\r\nuse Joomla\\Input\\Input;", "composer": "" } \ No newline at end of file diff --git a/src/d5de47ce-9a9e-4e76-a5c6-61ed74842ea3/code.php b/src/d5de47ce-9a9e-4e76-a5c6-61ed74842ea3/code.php index cd0aece..24f9bce 100644 --- a/src/d5de47ce-9a9e-4e76-a5c6-61ed74842ea3/code.php +++ b/src/d5de47ce-9a9e-4e76-a5c6-61ed74842ea3/code.php @@ -14,7 +14,7 @@ namespace VDM\Joomla\Componentbuilder\Search\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; -use VDM\Joomla\Componentbuilder\Database\Load; +use VDM\Joomla\Database\Load; use VDM\Joomla\Componentbuilder\Search\Database\Load as LoadDatabase; use VDM\Joomla\Componentbuilder\Search\Database\Insert as InsertDatabase; diff --git a/src/f523ab49-907a-4356-b064-51c85a187fbd/code.php b/src/f523ab49-907a-4356-b064-51c85a187fbd/code.php index 41ae10c..07dd04b 100644 --- a/src/f523ab49-907a-4356-b064-51c85a187fbd/code.php +++ b/src/f523ab49-907a-4356-b064-51c85a187fbd/code.php @@ -18,8 +18,8 @@ use VDM\Joomla\Componentbuilder\Search\Config; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\StringHelper; -use VDM\Joomla\Componentbuilder\Interfaces\ModelInterface; -use VDM\Joomla\Componentbuilder\Abstraction\Model; +use VDM\Joomla\Interfaces\ModelInterface; +use VDM\Joomla\Abstraction\Model; /**