From 5bd1fceb32cd77d863be1dc9f0032d8121f71893 Mon Sep 17 00:00:00 2001 From: aB0t Date: Wed, 31 May 2023 16:47:30 +0200 Subject: [PATCH 1/2] update 2023-05-31 16:47:30 --- README.md | 5 +- .../README.md | 101 ------------------ .../code.php | 92 ---------------- .../code.power | 68 ------------ .../settings.json | 18 ---- .../README.md | 89 --------------- .../code.php | 90 ---------------- .../code.power | 68 ------------ .../settings.json | 18 ---- .../code.php | 2 +- .../code.php | 6 +- .../code.php | 4 +- .../README.md | 23 ++-- .../code.php | 64 +++++++++++ .../code.power | 33 ++++++ .../settings.json | 32 ++++++ .../code.php | 42 -------- .../code.power | 17 --- .../settings.json | 18 ---- .../code.php | 2 +- super-powers.json | 33 ++---- 21 files changed, 158 insertions(+), 667 deletions(-) delete mode 100644 src/2ad31f74-f579-499d-b98b-c4f54fd615dd/README.md delete mode 100644 src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.php delete mode 100644 src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.power delete mode 100644 src/2ad31f74-f579-499d-b98b-c4f54fd615dd/settings.json delete mode 100644 src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/README.md delete mode 100644 src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.php delete mode 100644 src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.power delete mode 100644 src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/settings.json rename src/{caf33c5d-858c-4f9a-894f-ab302ec5445a => 9769f3b2-17bf-4f20-b54b-3a4ebe572b36}/README.md (74%) create mode 100644 src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/code.php create mode 100644 src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/code.power create mode 100644 src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/settings.json delete mode 100644 src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.php delete mode 100644 src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.power delete mode 100644 src/caf33c5d-858c-4f9a-894f-ab302ec5445a/settings.json diff --git a/README.md b/README.md index 3db1645..de69962 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ This repository contains an index (see below) of all the approved powers within # Index of powers +- **Namespace**: [VDM\Joomla\Componentbuilder\Abstraction](#vdm-joomla-componentbuilder-abstraction) + + - **abstract class BaseConfig** | [Details](src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36) | [Code](src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/code.php) | [Settings](src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/settings.json) | Super__9769f3b2_17bf_4f20_b54b_3a4ebe572b36__Power - **Namespace**: [VDM\Joomla\Componentbuilder\Compiler](#vdm-joomla-componentbuilder-compiler) - **abstract class Factory** | [Details](src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac) | [Code](src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/code.php) | [Settings](src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/settings.json) | Super__d910d8b8_4c23_4f3e_8cda_438f2d2bd7ac__Power @@ -38,11 +41,9 @@ This repository contains an index (see below) of all the approved powers within - **Namespace**: [VDM\Joomla\Componentbuilder\Interfaces](#vdm-joomla-componentbuilder-interfaces) - **interface Cryptinterface** | [Details](src/81de8f57-dd9c-4a17-964f-848cd4a0743b) | [Code](src/81de8f57-dd9c-4a17-964f-848cd4a0743b/code.php) | [Settings](src/81de8f57-dd9c-4a17-964f-848cd4a0743b/settings.json) | Super__81de8f57_dd9c_4a17_964f_848cd4a0743b__Power - - **interface LoadInterface** | [Details](src/2ad31f74-f579-499d-b98b-c4f54fd615dd) | [Code](src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.php) | [Settings](src/2ad31f74-f579-499d-b98b-c4f54fd615dd/settings.json) | Super__2ad31f74_f579_499d_b98b_c4f54fd615dd__Power - **interface Mapperdoubleinterface** | [Details](src/fbc58009-fa16-4d49-a0dd-419c3b62d42f) | [Code](src/fbc58009-fa16-4d49-a0dd-419c3b62d42f/code.php) | [Settings](src/fbc58009-fa16-4d49-a0dd-419c3b62d42f/settings.json) | Super__fbc58009_fa16_4d49_a0dd_419c3b62d42f__Power - **interface Mappersingleinterface** | [Details](src/78527c29-24ad-4735-ad4c-ec33a4952d9b) | [Code](src/78527c29-24ad-4735-ad4c-ec33a4952d9b/code.php) | [Settings](src/78527c29-24ad-4735-ad4c-ec33a4952d9b/settings.json) | Super__78527c29_24ad_4735_ad4c_ec33a4952d9b__Power - **interface Serverinterface** | [Details](src/86ac0760-26f5-4746-9c7f-ce77860f80f8) | [Code](src/86ac0760-26f5-4746-9c7f-ce77860f80f8/code.php) | [Settings](src/86ac0760-26f5-4746-9c7f-ce77860f80f8/settings.json) | Super__86ac0760_26f5_4746_9c7f_ce77860f80f8__Power - - **interface Tableinterface** | [Details](src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf) | [Code](src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.php) | [Settings](src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/settings.json) | Super__2da6d6c4_eb29_4d69_8bc2_36d96e916adf__Power - **Namespace**: [VDM\Joomla\Componentbuilder\Power](#vdm-joomla-componentbuilder-power) - **final class Grep** | [Details](src/6784dd52-0909-451a-a872-9a942a023c68) | [Code](src/6784dd52-0909-451a-a872-9a942a023c68/code.php) | [Settings](src/6784dd52-0909-451a-a872-9a942a023c68/settings.json) | Super__6784dd52_0909_451a_a872_9a942a023c68__Power diff --git a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/README.md b/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/README.md deleted file mode 100644 index 3ec6565..0000000 --- a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/README.md +++ /dev/null @@ -1,101 +0,0 @@ -``` -██████╗ ██████╗ ██╗ ██╗███████╗██████╗ -██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ -██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ -██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ -██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ -╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ -``` -# interface LoadInterface (Details) -> namespace: **VDM\Joomla\Componentbuilder\Interfaces** -```uml -@startuml -interface LoadInterface #Lavender { - + rows(array $select, array $tables, ...) : ?array - + items(array $select, array $tables, ...) : ?array - + row(array $select, array $tables, ...) : ?array - + item(array $select, array $tables, ...) : ?object - + value(array $select, array $tables, ...) : mixed -} - -note right of LoadInterface::rows - Load data rows as an array of associated arrays - - since: 3.2.0 - return: ?array - - arguments: - array $select - array $tables - ?array $where = null - ?array $order = null - ?int $limit = null -end note - -note right of LoadInterface::items - Load data rows as an array of objects - - since: 3.2.0 - return: ?array - - arguments: - array $select - array $tables - ?array $where = null - ?array $order = null - ?int $limit = null -end note - -note right of LoadInterface::row - Load data row as an associated array - - since: 3.2.0 - return: ?array - - arguments: - array $select - array $tables - ?array $where = null - ?array $order = null -end note - -note right of LoadInterface::item - Load data row as an object - - since: 3.2.0 - return: ?object - - arguments: - array $select - array $tables - ?array $where = null - ?array $order = null -end note - -note right of LoadInterface::value - Load one value from a row - - since: 3.2.0 - return: mixed - - arguments: - array $select - array $tables - ?array $where = null - ?array $order = null -end note - -@enduml -``` - ---- -``` - ██╗ ██████╗██████╗ - ██║██╔════╝██╔══██╗ - ██║██║ ██████╔╝ -██ ██║██║ ██╔══██╗ -╚█████╔╝╚██████╗██████╔╝ - ╚════╝ ╚═════╝╚═════╝ -``` -> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) - diff --git a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.php b/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.php deleted file mode 100644 index e8c4418..0000000 --- a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.php +++ /dev/null @@ -1,92 +0,0 @@ - - * @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\Interfaces; - - -/** - * Database Load Interface - * - * @since 3.2.0 - */ -interface LoadInterface -{ - /** - * Load data rows as an array of associated arrays - * - * @param array $select Array of selection keys - * @param array $tables Array of tables to search - * @param array|null $where Array of where key=>value match exist - * @param array|null $order Array of how to order the data - * @param int|null $limit Limit the number of values returned - * - * @return array|null - * @since 3.2.0 - **/ - public function rows(array $select, array $tables, ?array $where = null, - ?array $order = null, ?int $limit = null): ?array; - - /** - * Load data rows as an array of objects - * - * @param array $select Array of selection keys - * @param array $tables Array of tables to search - * @param array|null $where Array of where key=>value match exist - * @param array|null $order Array of how to order the data - * @param int|null $limit Limit the number of values returned - * - * @return array|null - * @since 3.2.0 - **/ - public function items(array $select, array $tables, ?array $where = null, - ?array $order = null, ?int $limit = null): ?array; - - /** - * Load data row as an associated array - * - * @param array $select Array of selection keys - * @param array $tables Array of tables to search - * @param array|null $where Array of where key=>value match exist - * @param array|null $order Array of how to order the data - * - * @return array|null - * @since 3.2.0 - **/ - public function row(array $select, array $tables, ?array $where = null, ?array $order = null): ?array; - - /** - * Load data row as an object - * - * @param array $select Array of selection keys - * @param array $tables Array of tables to search - * @param array|null $where Array of where key=>value match exist - * @param array|null $order Array of how to order the data - * - * @return object|null - * @since 3.2.0 - **/ - public function item(array $select, array $tables, ?array $where = null, ?array $order = null): ?object; - - /** - * Load one value from a row - * - * @param array $select Array of selection keys - * @param array $tables Array of tables to search - * @param array|null $where Array of where key=>value match exist - * @param array|null $order Array of how to order the data - * - * @return mixed - * @since 3.2.0 - **/ - public function value(array $select, array $tables, ?array $where = null, ?array $order = null); - -} - diff --git a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.power b/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.power deleted file mode 100644 index bee23d7..0000000 --- a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.power +++ /dev/null @@ -1,68 +0,0 @@ - /** - * Load data rows as an array of associated arrays - * - * @param array $select Array of selection keys - * @param array $tables Array of tables to search - * @param array|null $where Array of where key=>value match exist - * @param array|null $order Array of how to order the data - * @param int|null $limit Limit the number of values returned - * - * @return array|null - * @since 3.2.0 - **/ - public function rows(array $select, array $tables, ?array $where = null, - ?array $order = null, ?int $limit = null): ?array; - - /** - * Load data rows as an array of objects - * - * @param array $select Array of selection keys - * @param array $tables Array of tables to search - * @param array|null $where Array of where key=>value match exist - * @param array|null $order Array of how to order the data - * @param int|null $limit Limit the number of values returned - * - * @return array|null - * @since 3.2.0 - **/ - public function items(array $select, array $tables, ?array $where = null, - ?array $order = null, ?int $limit = null): ?array; - - /** - * Load data row as an associated array - * - * @param array $select Array of selection keys - * @param array $tables Array of tables to search - * @param array|null $where Array of where key=>value match exist - * @param array|null $order Array of how to order the data - * - * @return array|null - * @since 3.2.0 - **/ - public function row(array $select, array $tables, ?array $where = null, ?array $order = null): ?array; - - /** - * Load data row as an object - * - * @param array $select Array of selection keys - * @param array $tables Array of tables to search - * @param array|null $where Array of where key=>value match exist - * @param array|null $order Array of how to order the data - * - * @return object|null - * @since 3.2.0 - **/ - public function item(array $select, array $tables, ?array $where = null, ?array $order = null): ?object; - - /** - * Load one value from a row - * - * @param array $select Array of selection keys - * @param array $tables Array of tables to search - * @param array|null $where Array of where key=>value match exist - * @param array|null $order Array of how to order the data - * - * @return mixed - * @since 3.2.0 - **/ - public function value(array $select, array $tables, ?array $where = null, ?array $order = null); diff --git a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/settings.json b/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/settings.json deleted file mode 100644 index 24ebf4b..0000000 --- a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/settings.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "add_head": "0", - "add_licensing_template": "2", - "extends": "0", - "guid": "2ad31f74-f579-499d-b98b-c4f54fd615dd", - "implements": null, - "load_selection": null, - "name": "LoadInterface", - "power_version": "1.0.0", - "system_name": "JCB.Interfaces.LoadInterface", - "type": "interface", - "use_selection": null, - "namespace": "VDM\\Joomla\\Componentbuilder.Interfaces.LoadInterface", - "description": "Database Load Interface\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": "", - "composer": "" -} \ No newline at end of file diff --git a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/README.md b/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/README.md deleted file mode 100644 index 9cc1960..0000000 --- a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/README.md +++ /dev/null @@ -1,89 +0,0 @@ -``` -██████╗ ██████╗ ██╗ ██╗███████╗██████╗ -██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ -██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ -██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ -██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ -╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ -``` -# interface Tableinterface (Details) -> namespace: **VDM\Joomla\Componentbuilder\Interfaces** -```uml -@startuml -interface Tableinterface #Lavender { - + get(string $table, ?string $field = null, ...) : mixed - + title(string $table) : ?array - + titleName(string $table) : string - + tables() : array - + exist(string $table, ?string $field = null) : bool - + fields(string $table, bool $default = false) : ?array -} - -note right of Tableinterface::get - Get any value from a item/field/column of an area/view/table -Example: $this->get('table_name', 'field_name', 'value_key'); -Get an item/field/column of an area/view/table -Example: $this->get('table_name', 'field_name'); -Get all items/fields/columns of an area/view/table -Example: $this->get('table_name'); -Get all areas/views/tables with all their item/field/column details -Example: $this->get(); - - since: 3.2.0 - return: mixed - - arguments: - string $table - ?string $field = null - ?string $key = null -end note - -note right of Tableinterface::title - Get title field from an area/view/table - - since: 3.2.0 - return: ?array -end note - -note right of Tableinterface::titleName - Get title field name - - since: 3.2.0 - return: string -end note - -note right of Tableinterface::tables - Get all tables - - since: 3.2.0 - return: array -end note - -note right of Tableinterface::exist - Check if a table (and field) exist - - since: 3.2.0 - return: bool -end note - -note right of Tableinterface::fields - Get all fields of an area/view/table - - since: 3.2.0 - return: ?array -end note - -@enduml -``` - ---- -``` - ██╗ ██████╗██████╗ - ██║██╔════╝██╔══██╗ - ██║██║ ██████╔╝ -██ ██║██║ ██╔══██╗ -╚█████╔╝╚██████╗██████╔╝ - ╚════╝ ╚═════╝╚═════╝ -``` -> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) - diff --git a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.php b/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.php deleted file mode 100644 index 51b5ceb..0000000 --- a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.php +++ /dev/null @@ -1,90 +0,0 @@ - - * @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\Interfaces; - - -/** - * The Core JCB Table Interface - */ -interface Tableinterface -{ - /** - * Get any value from a item/field/column of an area/view/table - * Example: $this->get('table_name', 'field_name', 'value_key'); - * Get an item/field/column of an area/view/table - * Example: $this->get('table_name', 'field_name'); - * Get all items/fields/columns of an area/view/table - * Example: $this->get('table_name'); - * Get all areas/views/tables with all their item/field/column details - * Example: $this->get(); - * - * @param string $table The table - * @param string|null $field The field - * @param string|null $key The value key - * - * @return mixed - * @since 3.2.0 - */ - public function get(string $table, ?string $field = null, ?string $key = null); - - /** - * Get title field from an area/view/table - * - * @param string|null $table The area - * - * @return ?array - * @since 3.2.0 - */ - public function title(string $table): ?array; - - /** - * Get title field name - * - * @param string|null $table The area - * - * @return string - * @since 3.2.0 - */ - public function titleName(string $table): string; - - /** - * Get all tables - * - * @return array - * @since 3.2.0 - */ - public function tables(): array; - - /** - * Check if a table (and field) exist - * - * @param string|null $table The area - * @param string|null $field The area - * - * @return bool - * @since 3.2.0 - */ - public function exist(string $table, ?string $field = null): bool; - - /** - * Get all fields of an area/view/table - * - * @param string $table The area - * @param bool $default Add the default fields - * - * @return array|null On success an array of fields - * @since 3.2.0 - */ - public function fields(string $table, bool $default = false): ?array; - -} - diff --git a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.power b/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.power deleted file mode 100644 index a85f73a..0000000 --- a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.power +++ /dev/null @@ -1,68 +0,0 @@ - /** - * Get any value from a item/field/column of an area/view/table - * Example: $this->get('table_name', 'field_name', 'value_key'); - * Get an item/field/column of an area/view/table - * Example: $this->get('table_name', 'field_name'); - * Get all items/fields/columns of an area/view/table - * Example: $this->get('table_name'); - * Get all areas/views/tables with all their item/field/column details - * Example: $this->get(); - * - * @param string $table The table - * @param string|null $field The field - * @param string|null $key The value key - * - * @return mixed - * @since 3.2.0 - */ - public function get(string $table, ?string $field = null, ?string $key = null); - - /** - * Get title field from an area/view/table - * - * @param string|null $table The area - * - * @return ?array - * @since 3.2.0 - */ - public function title(string $table): ?array; - - /** - * Get title field name - * - * @param string|null $table The area - * - * @return string - * @since 3.2.0 - */ - public function titleName(string $table): string; - - /** - * Get all tables - * - * @return array - * @since 3.2.0 - */ - public function tables(): array; - - /** - * Check if a table (and field) exist - * - * @param string|null $table The area - * @param string|null $field The area - * - * @return bool - * @since 3.2.0 - */ - public function exist(string $table, ?string $field = null): bool; - - /** - * Get all fields of an area/view/table - * - * @param string $table The area - * @param bool $default Add the default fields - * - * @return array|null On success an array of fields - * @since 3.2.0 - */ - public function fields(string $table, bool $default = false): ?array; diff --git a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/settings.json b/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/settings.json deleted file mode 100644 index 3c3f56b..0000000 --- a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/settings.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "add_head": "0", - "add_licensing_template": "2", - "extends": "0", - "guid": "2da6d6c4-eb29-4d69-8bc2-36d96e916adf", - "implements": null, - "load_selection": null, - "name": "Tableinterface", - "power_version": "1.0.0", - "system_name": "JCB.Interfaces.Tableinterface", - "type": "interface", - "use_selection": null, - "namespace": "VDM\\Joomla\\Componentbuilder.Interfaces.Tableinterface", - "description": "The Core JCB Table Interface", - "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": "", - "composer": "" -} \ No newline at end of file diff --git a/src/380bb7a3-cdcc-4336-a699-5070cbf521a5/code.php b/src/380bb7a3-cdcc-4336-a699-5070cbf521a5/code.php index e0b0edb..e39b8dd 100644 --- a/src/380bb7a3-cdcc-4336-a699-5070cbf521a5/code.php +++ b/src/380bb7a3-cdcc-4336-a699-5070cbf521a5/code.php @@ -13,7 +13,7 @@ namespace VDM\Joomla\Componentbuilder\Power\Database; use VDM\Joomla\Componentbuilder\Power\Model as Model; -use VDM\Joomla\Componentbuilder\Database\Insert as Database; +use VDM\Joomla\Database\Insert as Database; /** diff --git a/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.php b/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.php index c0dcc20..8475099 100644 --- a/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.php +++ b/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.php @@ -14,9 +14,9 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; -use VDM\Joomla\Componentbuilder\Database\Load; -use VDM\Joomla\Componentbuilder\Database\Insert; -use VDM\Joomla\Componentbuilder\Database\Update; +use VDM\Joomla\Database\Load; +use VDM\Joomla\Database\Insert; +use VDM\Joomla\Database\Update; /** diff --git a/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.php b/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.php index 0e76951..09ae48e 100644 --- a/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.php +++ b/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.php @@ -12,11 +12,11 @@ namespace VDM\Joomla\Componentbuilder\Power; -use VDM\Joomla\Componentbuilder\Abstraction\Model as AbstractionModel; +use VDM\Joomla\Abstraction\Model as AbstractionModel; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\ObjectHelper; -use VDM\Joomla\Componentbuilder\Interfaces\ModelInterface; +use VDM\Joomla\Interfaces\ModelInterface; /** diff --git a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/README.md b/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/README.md similarity index 74% rename from src/caf33c5d-858c-4f9a-894f-ab302ec5445a/README.md rename to src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/README.md index eeb3a5f..87012fb 100644 --- a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/README.md +++ b/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/README.md @@ -6,27 +6,20 @@ ██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` -# interface FactoryInterface (Details) -> namespace: **VDM\Joomla\Componentbuilder\Interfaces** +# abstract class BaseConfig (Details) +> namespace: **VDM\Joomla\Componentbuilder\Abstraction** ```uml @startuml -interface FactoryInterface #Lavender { - + {static} _(string $key) : Mixed - + {static} getContainer() : Container +abstract BaseConfig #Orange { + # Input $input + # JoomlaRegistry $params + + __construct(?Input $input = null, ?JoomlaRegistry $params = null) } -note right of FactoryInterface::_ - Get any class from the container +note right of BaseConfig::__construct + Constructor since: 3.2.0 - return: Mixed -end note - -note right of FactoryInterface::getContainer - Get the global container - - since: 3.2.0 - return: Container end note @enduml diff --git a/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/code.php b/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/code.php new file mode 100644 index 0000000..1319d2c --- /dev/null +++ b/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/code.php @@ -0,0 +1,64 @@ + + * @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 Joomla\Registry\Registry as JoomlaRegistry; +use Joomla\CMS\Factory; +use Joomla\Input\Input; +use VDM\Joomla\Abstraction\BaseConfig as Config; +use VDM\Joomla\Utilities\Component\Helper; +use VDM\Joomla\Utilities\String\ClassfunctionHelper; + + +/** + * Config + * + * @since 3.2.0 + */ +abstract class BaseConfig extends Config +{ + /** + * Hold a JInput object for easier access to the input variables. + * + * @var Input + * @since 3.2.0 + */ + protected Input $input; + + /** + * The Params + * + * @var JoomlaRegistry + * @since 3.2.0 + */ + protected JoomlaRegistry $params; + + /** + * Constructor + * + * @param Input|null $input Input + * @param Registry|null $params The component parameters + * + * @throws \Exception + * @since 3.2.0 + */ + public function __construct(?Input $input = null, ?JoomlaRegistry $params = null) + { + $this->input = $input ?: Factory::getApplication()->input; + $this->params = $params ?: Helper::getParams('com_componentbuilder'); + + // run parent constructor + parent::__construct(); + } +} + diff --git a/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/code.power b/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/code.power new file mode 100644 index 0000000..86a86ff --- /dev/null +++ b/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/code.power @@ -0,0 +1,33 @@ + /** + * Hold a JInput object for easier access to the input variables. + * + * @var Input + * @since 3.2.0 + */ + protected Input $input; + + /** + * The Params + * + * @var JoomlaRegistry + * @since 3.2.0 + */ + protected JoomlaRegistry $params; + + /** + * Constructor + * + * @param Input|null $input Input + * @param Registry|null $params The component parameters + * + * @throws \Exception + * @since 3.2.0 + */ + public function __construct(?Input $input = null, ?JoomlaRegistry $params = null) + { + $this->input = $input ?: Factory::getApplication()->input; + $this->params = $params ?: Helper::getParams('com_componentbuilder'); + + // run parent constructor + parent::__construct(); + } \ No newline at end of file diff --git a/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/settings.json b/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/settings.json new file mode 100644 index 0000000..06dbf88 --- /dev/null +++ b/src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/settings.json @@ -0,0 +1,32 @@ +{ + "add_head": "1", + "add_licensing_template": "2", + "extends": "-1", + "guid": "9769f3b2-17bf-4f20-b54b-3a4ebe572b36", + "implements": null, + "load_selection": null, + "name": "BaseConfig", + "power_version": "1.0.0", + "system_name": "JCB.Abstraction.BaseConfig", + "type": "abstract class", + "use_selection": { + "use_selection0": { + "use": "ffbd4e1f-a342-4080-ab7d-1de3741bf319", + "as": "Config" + }, + "use_selection1": { + "use": "640b5352-fb09-425f-a26e-cd44eda03f15", + "as": "default" + }, + "use_selection2": { + "use": "30c5b4c2-f75f-4d15-869a-f8bfedd87358", + "as": "default" + } + }, + "namespace": "VDM\\Joomla\\Componentbuilder.Abstraction.BaseConfig", + "description": "Config\r\n\r\n@since 3.2.0", + "extends_custom": "Config", + "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": "use Joomla\\Registry\\Registry as JoomlaRegistry;\r\nuse Joomla\\CMS\\Factory;\r\nuse Joomla\\Input\\Input;", + "composer": "" +} \ No newline at end of file diff --git a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.php b/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.php deleted file mode 100644 index aff5406..0000000 --- a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @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\Interfaces; - - -use Joomla\DI\Container; - - -/** - * The Container Factory Interface - */ -interface FactoryInterface -{ - /** - * Get any class from the container - * - * @param string $key The container class key - * - * @return Mixed - * @since 3.2.0 - */ - public static function _(string $key); - - /** - * Get the global container - * - * @return Container - * @since 3.2.0 - */ - public static function getContainer(): Container; - -} - diff --git a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.power b/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.power deleted file mode 100644 index 5a394fe..0000000 --- a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.power +++ /dev/null @@ -1,17 +0,0 @@ - /** - * Get any class from the container - * - * @param string $key The container class key - * - * @return Mixed - * @since 3.2.0 - */ - public static function _(string $key); - - /** - * Get the global container - * - * @return Container - * @since 3.2.0 - */ - public static function getContainer(): Container; diff --git a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/settings.json b/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/settings.json deleted file mode 100644 index d1a52a8..0000000 --- a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/settings.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "add_head": "1", - "add_licensing_template": "2", - "extends": "0", - "guid": "caf33c5d-858c-4f9a-894f-ab302ec5445a", - "implements": null, - "load_selection": null, - "name": "FactoryInterface", - "power_version": "1.0.0", - "system_name": "JCB.Interfaces.FactoryInterface", - "type": "interface", - "use_selection": null, - "namespace": "VDM\\Joomla\\Componentbuilder.Interfaces.FactoryInterface", - "description": "The Container Factory Interface", - "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": "use Joomla\\DI\\Container;", - "composer": "" -} \ No newline at end of file diff --git a/src/e543c123-b1d9-4a0b-83b2-a9d371da5ff3/code.php b/src/e543c123-b1d9-4a0b-83b2-a9d371da5ff3/code.php index 2d5f0e7..e9d5bf4 100644 --- a/src/e543c123-b1d9-4a0b-83b2-a9d371da5ff3/code.php +++ b/src/e543c123-b1d9-4a0b-83b2-a9d371da5ff3/code.php @@ -13,7 +13,7 @@ namespace VDM\Joomla\Componentbuilder\Power\Database; use VDM\Joomla\Componentbuilder\Power\Model as Model; -use VDM\Joomla\Componentbuilder\Database\Update as Database; +use VDM\Joomla\Database\Update as Database; /** diff --git a/super-powers.json b/super-powers.json index d433161..d3b6528 100644 --- a/super-powers.json +++ b/super-powers.json @@ -318,17 +318,6 @@ "spk": "Super__295186de_5954_4a65_a4c1_2f79ef305743__Power", "guid": "295186de-5954-4a65-a4c1-2f79ef305743" }, - "2ad31f74-f579-499d-b98b-c4f54fd615dd": { - "name": "LoadInterface", - "type": "interface", - "namespace": "VDM\\Joomla\\Componentbuilder\\Interfaces", - "code": "src\/2ad31f74-f579-499d-b98b-c4f54fd615dd\/code.php", - "power": "src\/2ad31f74-f579-499d-b98b-c4f54fd615dd\/code.power", - "settings": "src\/2ad31f74-f579-499d-b98b-c4f54fd615dd\/settings.json", - "path": "src\/2ad31f74-f579-499d-b98b-c4f54fd615dd", - "spk": "Super__2ad31f74_f579_499d_b98b_c4f54fd615dd__Power", - "guid": "2ad31f74-f579-499d-b98b-c4f54fd615dd" - }, "2b5c9989-1d4e-4f59-8b95-5cd2f72f82d9": { "name": "Mysql", "type": "class", @@ -362,17 +351,6 @@ "spk": "Super__2cc8517d_1105_4697_9743_048b4b7c089c__Power", "guid": "2cc8517d-1105-4697-9743-048b4b7c089c" }, - "2da6d6c4-eb29-4d69-8bc2-36d96e916adf": { - "name": "Tableinterface", - "type": "interface", - "namespace": "VDM\\Joomla\\Componentbuilder\\Interfaces", - "code": "src\/2da6d6c4-eb29-4d69-8bc2-36d96e916adf\/code.php", - "power": "src\/2da6d6c4-eb29-4d69-8bc2-36d96e916adf\/code.power", - "settings": "src\/2da6d6c4-eb29-4d69-8bc2-36d96e916adf\/settings.json", - "path": "src\/2da6d6c4-eb29-4d69-8bc2-36d96e916adf", - "spk": "Super__2da6d6c4_eb29_4d69_8bc2_36d96e916adf__Power", - "guid": "2da6d6c4-eb29-4d69-8bc2-36d96e916adf" - }, "2dd1289a-4000-43cc-8c62-77ff32de56bf": { "name": "Adminview", "type": "class", @@ -1000,6 +978,17 @@ "spk": "Super__97698747_c2ce_4e09_a470_acf6d8e86281__Power", "guid": "97698747-c2ce-4e09-a470-acf6d8e86281" }, + "9769f3b2-17bf-4f20-b54b-3a4ebe572b36": { + "name": "BaseConfig", + "type": "abstract class", + "namespace": "VDM\\Joomla\\Componentbuilder\\Abstraction", + "code": "src\/9769f3b2-17bf-4f20-b54b-3a4ebe572b36\/code.php", + "power": "src\/9769f3b2-17bf-4f20-b54b-3a4ebe572b36\/code.power", + "settings": "src\/9769f3b2-17bf-4f20-b54b-3a4ebe572b36\/settings.json", + "path": "src\/9769f3b2-17bf-4f20-b54b-3a4ebe572b36", + "spk": "Super__9769f3b2_17bf_4f20_b54b_3a4ebe572b36__Power", + "guid": "9769f3b2-17bf-4f20-b54b-3a4ebe572b36" + }, "99368a6f-2f64-4d4e-ad3a-544d4020ecc6": { "name": "DatabaseName", "type": "class", -- 2.45.2 From 456258b95ac2554f2a024e15a1e98ce19d53d677 Mon Sep 17 00:00:00 2001 From: aB0t Date: Fri, 2 Jun 2023 04:47:53 +0200 Subject: [PATCH 2/2] update 2023-06-02 04:47:47 --- src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/code.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/code.php b/src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/code.php index 6bdd6ce..f8a5bb6 100644 --- a/src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/code.php +++ b/src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/code.php @@ -47,7 +47,7 @@ use VDM\Joomla\Gitea\Service\Issue as GiteaIssue; use VDM\Joomla\Gitea\Service\Notifications as GiteNotifi; use VDM\Joomla\Gitea\Service\Miscellaneous as GiteaMisc; use VDM\Joomla\Gitea\Service\Admin as GiteaAdmin; -use VDM\Joomla\Componentbuilder\Interfaces\FactoryInterface; +use VDM\Joomla\Interfaces\FactoryInterface; /** -- 2.45.2