Update 2024-06-21 14:01:13

This commit is contained in:
Robot 2024-06-21 14:01:19 +02:00
parent 7d75b2e8de
commit f2eb3a484a
Signed by untrusted user: Robot
GPG Key ID: 14DECD44E7E1BB95
250 changed files with 10520 additions and 1310 deletions

View File

@ -23,7 +23,7 @@ This repository contains an index (see below) of all the approved powers within
# Index of powers # Index of powers
- **Namespace**: [VastDevelopmentMethod\Joomla\Abstraction](#vastdevelopmentmethod-joomla-abstraction) - **Namespace**: [VDM\Joomla\Abstraction](#vdm-joomla-abstraction)
- **abstract class ActiveRegistry** | [Details](src/43134867-5cb8-4280-9be8-309fd2fd135f) | [Code](src/43134867-5cb8-4280-9be8-309fd2fd135f/code.php) | [Settings](src/43134867-5cb8-4280-9be8-309fd2fd135f/settings.json) | Super__43134867_5cb8_4280_9be8_309fd2fd135f__Power - **abstract class ActiveRegistry** | [Details](src/43134867-5cb8-4280-9be8-309fd2fd135f) | [Code](src/43134867-5cb8-4280-9be8-309fd2fd135f/code.php) | [Settings](src/43134867-5cb8-4280-9be8-309fd2fd135f/settings.json) | Super__43134867_5cb8_4280_9be8_309fd2fd135f__Power
- **abstract class BaseConfig** | [Details](src/ffbd4e1f-a342-4080-ab7d-1de3741bf319) | [Code](src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/code.php) | [Settings](src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/settings.json) | Super__ffbd4e1f_a342_4080_ab7d_1de3741bf319__Power - **abstract class BaseConfig** | [Details](src/ffbd4e1f-a342-4080-ab7d-1de3741bf319) | [Code](src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/code.php) | [Settings](src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/settings.json) | Super__ffbd4e1f_a342_4080_ab7d_1de3741bf319__Power
@ -33,17 +33,25 @@ This repository contains an index (see below) of all the approved powers within
- **abstract class Model** | [Details](src/584747d1-3a86-453d-b7a3-a2219de8d777) | [Code](src/584747d1-3a86-453d-b7a3-a2219de8d777/code.php) | [Settings](src/584747d1-3a86-453d-b7a3-a2219de8d777/settings.json) | Super__584747d1_3a86_453d_b7a3_a2219de8d777__Power - **abstract class Model** | [Details](src/584747d1-3a86-453d-b7a3-a2219de8d777) | [Code](src/584747d1-3a86-453d-b7a3-a2219de8d777/code.php) | [Settings](src/584747d1-3a86-453d-b7a3-a2219de8d777/settings.json) | Super__584747d1_3a86_453d_b7a3_a2219de8d777__Power
- **abstract class Registry** | [Details](src/7e822c03-1b20-41d1-9427-f5b8d5836af7) | [Code](src/7e822c03-1b20-41d1-9427-f5b8d5836af7/code.php) | [Settings](src/7e822c03-1b20-41d1-9427-f5b8d5836af7/settings.json) | Super__7e822c03_1b20_41d1_9427_f5b8d5836af7__Power - **abstract class Registry** | [Details](src/7e822c03-1b20-41d1-9427-f5b8d5836af7) | [Code](src/7e822c03-1b20-41d1-9427-f5b8d5836af7/code.php) | [Settings](src/7e822c03-1b20-41d1-9427-f5b8d5836af7/settings.json) | Super__7e822c03_1b20_41d1_9427_f5b8d5836af7__Power
- **abstract class Schema** | [Details](src/f3c04c28-bce4-422e-be93-7d163e4e342b) | [Code](src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.php) | [Settings](src/f3c04c28-bce4-422e-be93-7d163e4e342b/settings.json) | Super__f3c04c28_bce4_422e_be93_7d163e4e342b__Power - **abstract class Schema** | [Details](src/f3c04c28-bce4-422e-be93-7d163e4e342b) | [Code](src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.php) | [Settings](src/f3c04c28-bce4-422e-be93-7d163e4e342b/settings.json) | Super__f3c04c28_bce4_422e_be93_7d163e4e342b__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Componentbuilder](#vastdevelopmentmethod-joomla-componentbuilder) - **Namespace**: [VDM\Joomla\Componentbuilder](#vdm-joomla-componentbuilder)
- **class Table** | [Details](src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8) | [Code](src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.php) | [Settings](src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/settings.json) | Super__bfd1d6d5_56c1_4fe9_9fee_1c5910e1f5d8__Power - **class Table** | [Details](src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8) | [Code](src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.php) | [Settings](src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/settings.json) | Super__bfd1d6d5_56c1_4fe9_9fee_1c5910e1f5d8__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Database](#vastdevelopmentmethod-joomla-database) - **Namespace**: [VDM\Joomla\Data](#vdm-joomla-data)
- **final class Item** | [Details](src/9206082e-a3f7-472e-98b2-de90d06cbdcd) | [Code](src/9206082e-a3f7-472e-98b2-de90d06cbdcd/code.php) | [Settings](src/9206082e-a3f7-472e-98b2-de90d06cbdcd/settings.json) | Super__9206082e_a3f7_472e_98b2_de90d06cbdcd__Power
- **final class Items** | [Details](src/21bca8a4-5b28-41c4-843e-8097f0ba7cca) | [Code](src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/code.php) | [Settings](src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/settings.json) | Super__21bca8a4_5b28_41c4_843e_8097f0ba7cca__Power
- **class Remote** | [Details](src/728ee726-3f0f-4762-899d-f8c9430cee58) | [Code](src/728ee726-3f0f-4762-899d-f8c9430cee58/code.php) | [Settings](src/728ee726-3f0f-4762-899d-f8c9430cee58/settings.json) | Super__728ee726_3f0f_4762_899d_f8c9430cee58__Power
- **class Subform** | [Details](src/85785701-07b2-4f81-bc1e-0f423700c254) | [Code](src/85785701-07b2-4f81-bc1e-0f423700c254/code.php) | [Settings](src/85785701-07b2-4f81-bc1e-0f423700c254/settings.json) | Super__85785701_07b2_4f81_bc1e_0f423700c254__Power
- **Namespace**: [VDM\Joomla\Database](#vdm-joomla-database)
- **final class Delete** | [Details](src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1) | [Code](src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/code.php) | [Settings](src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/settings.json) | Super__92291f1f_f248_4ec0_9f2a_3d47c49eeac1__Power
- **final class Insert** | [Details](src/524eb8f6-38d4-47dc-92ad-98b94e099ac0) | [Code](src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/code.php) | [Settings](src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/settings.json) | Super__524eb8f6_38d4_47dc_92ad_98b94e099ac0__Power - **final class Insert** | [Details](src/524eb8f6-38d4-47dc-92ad-98b94e099ac0) | [Code](src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/code.php) | [Settings](src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/settings.json) | Super__524eb8f6_38d4_47dc_92ad_98b94e099ac0__Power
- **final class Load** | [Details](src/06f8eada-d59b-441c-b287-0aea1793da5a) | [Code](src/06f8eada-d59b-441c-b287-0aea1793da5a/code.php) | [Settings](src/06f8eada-d59b-441c-b287-0aea1793da5a/settings.json) | Super__06f8eada_d59b_441c_b287_0aea1793da5a__Power - **final class Load** | [Details](src/06f8eada-d59b-441c-b287-0aea1793da5a) | [Code](src/06f8eada-d59b-441c-b287-0aea1793da5a/code.php) | [Settings](src/06f8eada-d59b-441c-b287-0aea1793da5a/settings.json) | Super__06f8eada_d59b_441c_b287_0aea1793da5a__Power
- **final class Update** | [Details](src/cce56585-58b0-4f72-a92c-e2635ea52d83) | [Code](src/cce56585-58b0-4f72-a92c-e2635ea52d83/code.php) | [Settings](src/cce56585-58b0-4f72-a92c-e2635ea52d83/settings.json) | Super__cce56585_58b0_4f72_a92c_e2635ea52d83__Power - **final class Update** | [Details](src/cce56585-58b0-4f72-a92c-e2635ea52d83) | [Code](src/cce56585-58b0-4f72-a92c-e2635ea52d83/code.php) | [Settings](src/cce56585-58b0-4f72-a92c-e2635ea52d83/settings.json) | Super__cce56585_58b0_4f72_a92c_e2635ea52d83__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Interfaces](#vastdevelopmentmethod-joomla-interfaces) - **Namespace**: [VDM\Joomla\Interfaces](#vdm-joomla-interfaces)
- **interface Activeregistryinterface** | [Details](src/af0eedbe-603b-4671-8e5a-28165d88254b) | [Code](src/af0eedbe-603b-4671-8e5a-28165d88254b/code.php) | [Settings](src/af0eedbe-603b-4671-8e5a-28165d88254b/settings.json) | Super__af0eedbe_603b_4671_8e5a_28165d88254b__Power - **interface Activeregistryinterface** | [Details](src/af0eedbe-603b-4671-8e5a-28165d88254b) | [Code](src/af0eedbe-603b-4671-8e5a-28165d88254b/code.php) | [Settings](src/af0eedbe-603b-4671-8e5a-28165d88254b/settings.json) | Super__af0eedbe_603b_4671_8e5a_28165d88254b__Power
- **interface DeleteInterface** | [Details](src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9) | [Code](src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/code.php) | [Settings](src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/settings.json) | Super__9c3aa650_e536_4eea_a2d4_73cc3e184aa9__Power
- **interface FactoryInterface** | [Details](src/caf33c5d-858c-4f9a-894f-ab302ec5445a) | [Code](src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.php) | [Settings](src/caf33c5d-858c-4f9a-894f-ab302ec5445a/settings.json) | Super__caf33c5d_858c_4f9a_894f_ab302ec5445a__Power - **interface FactoryInterface** | [Details](src/caf33c5d-858c-4f9a-894f-ab302ec5445a) | [Code](src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.php) | [Settings](src/caf33c5d-858c-4f9a-894f-ab302ec5445a/settings.json) | Super__caf33c5d_858c_4f9a_894f_ab302ec5445a__Power
- **interface GrepInterface** | [Details](src/c182506a-ab84-439c-b962-1e606b58d545) | [Code](src/c182506a-ab84-439c-b962-1e606b58d545/code.php) | [Settings](src/c182506a-ab84-439c-b962-1e606b58d545/settings.json) | Super__c182506a_ab84_439c_b962_1e606b58d545__Power - **interface GrepInterface** | [Details](src/c182506a-ab84-439c-b962-1e606b58d545) | [Code](src/c182506a-ab84-439c-b962-1e606b58d545/code.php) | [Settings](src/c182506a-ab84-439c-b962-1e606b58d545/settings.json) | Super__c182506a_ab84_439c_b962_1e606b58d545__Power
- **interface InsertInterface** | [Details](src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48) | [Code](src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/code.php) | [Settings](src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/settings.json) | Super__ad12ca1c_d3ce_4e7f_88c5_c6c92bdedc48__Power - **interface InsertInterface** | [Details](src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48) | [Code](src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/code.php) | [Settings](src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/settings.json) | Super__ad12ca1c_d3ce_4e7f_88c5_c6c92bdedc48__Power
@ -53,7 +61,16 @@ This repository contains an index (see below) of all the approved powers within
- **interface SchemaInterface** | [Details](src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa) | [Code](src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/code.php) | [Settings](src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/settings.json) | Super__4dd11b9b_3c64_460b_aaa6_62ba467db7aa__Power - **interface SchemaInterface** | [Details](src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa) | [Code](src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/code.php) | [Settings](src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/settings.json) | Super__4dd11b9b_3c64_460b_aaa6_62ba467db7aa__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 - **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
- **interface UpdateInterface** | [Details](src/7179fde6-1e51-4b51-8545-7ca18f74a0f4) | [Code](src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/code.php) | [Settings](src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/settings.json) | Super__7179fde6_1e51_4b51_8545_7ca18f74a0f4__Power - **interface UpdateInterface** | [Details](src/7179fde6-1e51-4b51-8545-7ca18f74a0f4) | [Code](src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/code.php) | [Settings](src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/settings.json) | Super__7179fde6_1e51_4b51_8545_7ca18f74a0f4__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Utilities](#vastdevelopmentmethod-joomla-utilities) - **Namespace**: [VDM\Joomla\Model](#vdm-joomla-model)
- **final class Load** | [Details](src/bb29a833-73f7-4283-9327-bc7e41f0723b) | [Code](src/bb29a833-73f7-4283-9327-bc7e41f0723b/code.php) | [Settings](src/bb29a833-73f7-4283-9327-bc7e41f0723b/settings.json) | Super__bb29a833_73f7_4283_9327_bc7e41f0723b__Power
- **final class Upsert** | [Details](src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5) | [Code](src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.php) | [Settings](src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/settings.json) | Super__7c1fb50f_8fb1_4627_8705_6fedf7182ca5__Power
- **Namespace**: [VDM\Joomla\Service](#vdm-joomla-service)
- **class Data** | [Details](src/a5daf189-3345-4b13-8716-c51f686f545b) | [Code](src/a5daf189-3345-4b13-8716-c51f686f545b/code.php) | [Settings](src/a5daf189-3345-4b13-8716-c51f686f545b/settings.json) | Super__a5daf189_3345_4b13_8716_c51f686f545b__Power
- **class Database** | [Details](src/4815e1c7-a433-443d-a112-d1e03d7df84b) | [Code](src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.php) | [Settings](src/4815e1c7-a433-443d-a112-d1e03d7df84b/settings.json) | Super__4815e1c7_a433_443d_a112_d1e03d7df84b__Power
- **class Model** | [Details](src/2dcedd6c-c95b-4a37-9cac-95d28faedca3) | [Code](src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/code.php) | [Settings](src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/settings.json) | Super__2dcedd6c_c95b_4a37_9cac_95d28faedca3__Power
- **Namespace**: [VDM\Joomla\Utilities](#vdm-joomla-utilities)
- **abstract class ArrayHelper** | [Details](src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a) | [Code](src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/code.php) | [Settings](src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/settings.json) | Super__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a__Power - **abstract class ArrayHelper** | [Details](src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a) | [Code](src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/code.php) | [Settings](src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/settings.json) | Super__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a__Power
- **abstract class Base64Helper** | [Details](src/64a6ff6c-069c-4a11-a76b-db5e36c27690) | [Code](src/64a6ff6c-069c-4a11-a76b-db5e36c27690/code.php) | [Settings](src/64a6ff6c-069c-4a11-a76b-db5e36c27690/settings.json) | Super__64a6ff6c_069c_4a11_a76b_db5e36c27690__Power - **abstract class Base64Helper** | [Details](src/64a6ff6c-069c-4a11-a76b-db5e36c27690) | [Code](src/64a6ff6c-069c-4a11-a76b-db5e36c27690/code.php) | [Settings](src/64a6ff6c-069c-4a11-a76b-db5e36c27690/settings.json) | Super__64a6ff6c_069c_4a11_a76b_db5e36c27690__Power
@ -66,22 +83,35 @@ This repository contains an index (see below) of all the approved powers within
- **abstract class MathHelper** | [Details](src/152c8793-8b75-4715-996a-257b9f65451c) | [Code](src/152c8793-8b75-4715-996a-257b9f65451c/code.php) | [Settings](src/152c8793-8b75-4715-996a-257b9f65451c/settings.json) | Super__152c8793_8b75_4715_996a_257b9f65451c__Power - **abstract class MathHelper** | [Details](src/152c8793-8b75-4715-996a-257b9f65451c) | [Code](src/152c8793-8b75-4715-996a-257b9f65451c/code.php) | [Settings](src/152c8793-8b75-4715-996a-257b9f65451c/settings.json) | Super__152c8793_8b75_4715_996a_257b9f65451c__Power
- **abstract class ObjectHelper** | [Details](src/91004529-94a9-4590-b842-e7c6b624ecf5) | [Code](src/91004529-94a9-4590-b842-e7c6b624ecf5/code.php) | [Settings](src/91004529-94a9-4590-b842-e7c6b624ecf5/settings.json) | Super__91004529_94a9_4590_b842_e7c6b624ecf5__Power - **abstract class ObjectHelper** | [Details](src/91004529-94a9-4590-b842-e7c6b624ecf5) | [Code](src/91004529-94a9-4590-b842-e7c6b624ecf5/code.php) | [Settings](src/91004529-94a9-4590-b842-e7c6b624ecf5/settings.json) | Super__91004529_94a9_4590_b842_e7c6b624ecf5__Power
- **abstract class StringHelper** | [Details](src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef) | [Code](src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/code.php) | [Settings](src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/settings.json) | Super__1f28cb53_60d9_4db1_b517_3c7dc6b429ef__Power - **abstract class StringHelper** | [Details](src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef) | [Code](src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/code.php) | [Settings](src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/settings.json) | Super__1f28cb53_60d9_4db1_b517_3c7dc6b429ef__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Componentbuilder\Abstraction](#vastdevelopmentmethod-joomla-componentbuilder-abstraction) - **Namespace**: [VDM\Joomla\Componentbuilder\Abstraction](#vdm-joomla-componentbuilder-abstraction)
- **abstract class BaseRegistry** | [Details](src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c) | [Code](src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/code.php) | [Settings](src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/settings.json) | Super__b84e947d_2a13_44f7_ac0f_3902ae55ae0c__Power - **abstract class BaseRegistry** | [Details](src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c) | [Code](src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/code.php) | [Settings](src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/settings.json) | Super__b84e947d_2a13_44f7_ac0f_3902ae55ae0c__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Componentbuilder\Service](#vastdevelopmentmethod-joomla-componentbuilder-service) - **Namespace**: [VDM\Joomla\Componentbuilder\Table](#vdm-joomla-componentbuilder-table)
- **class Database** | [Details](src/4815e1c7-a433-443d-a112-d1e03d7df84b) | [Code](src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.php) | [Settings](src/4815e1c7-a433-443d-a112-d1e03d7df84b/settings.json) | Super__4815e1c7_a433_443d_a112_d1e03d7df84b__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Componentbuilder\Table](#vastdevelopmentmethod-joomla-componentbuilder-table)
- **final class Schema** | [Details](src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce) | [Code](src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/code.php) | [Settings](src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/settings.json) | Super__b3d2ec33_76d4_4c3b_bb2c_86ac14a221ce__Power - **final class Schema** | [Details](src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce) | [Code](src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/code.php) | [Settings](src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/settings.json) | Super__b3d2ec33_76d4_4c3b_bb2c_86ac14a221ce__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Componentbuilder\Utilities](#vastdevelopmentmethod-joomla-componentbuilder-utilities) - **Namespace**: [VDM\Joomla\Componentbuilder\Utilities](#vdm-joomla-componentbuilder-utilities)
- **abstract class FilterHelper** | [Details](src/cddcac51-9a46-47c4-ba59-105c70453bd6) | [Code](src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.php) | [Settings](src/cddcac51-9a46-47c4-ba59-105c70453bd6/settings.json) | Super__cddcac51_9a46_47c4_ba59_105c70453bd6__Power - **abstract class FilterHelper** | [Details](src/cddcac51-9a46-47c4-ba59-105c70453bd6) | [Code](src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.php) | [Settings](src/cddcac51-9a46-47c4-ba59-105c70453bd6/settings.json) | Super__cddcac51_9a46_47c4_ba59_105c70453bd6__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Utilities\Component](#vastdevelopmentmethod-joomla-utilities-component) - **Namespace**: [VDM\Joomla\Data\Action](#vdm-joomla-data-action)
- **class Delete** | [Details](src/3fc72954-a303-4cac-b53c-554be38b85e7) | [Code](src/3fc72954-a303-4cac-b53c-554be38b85e7/code.php) | [Settings](src/3fc72954-a303-4cac-b53c-554be38b85e7/settings.json) | Super__3fc72954_a303_4cac_b53c_554be38b85e7__Power
- **class Insert** | [Details](src/a455d916-cfe4-41df-9245-bafb709aacdb) | [Code](src/a455d916-cfe4-41df-9245-bafb709aacdb/code.php) | [Settings](src/a455d916-cfe4-41df-9245-bafb709aacdb/settings.json) | Super__a455d916_cfe4_41df_9245_bafb709aacdb__Power
- **class Load** | [Details](src/008d111c-9d43-427c-8dd4-2653e8b74be8) | [Code](src/008d111c-9d43-427c-8dd4-2653e8b74be8/code.php) | [Settings](src/008d111c-9d43-427c-8dd4-2653e8b74be8/settings.json) | Super__008d111c_9d43_427c_8dd4_2653e8b74be8__Power
- **class Update** | [Details](src/8f83fb79-f92b-4f1f-952b-325f6c22d11e) | [Code](src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/code.php) | [Settings](src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/settings.json) | Super__8f83fb79_f92b_4f1f_952b_325f6c22d11e__Power
- **Namespace**: [VDM\Joomla\Interfaces\Data](#vdm-joomla-interfaces-data)
- **interface DeleteInterface** | [Details](src/d8f9ba53-c490-4e8b-8e9f-6757224e069c) | [Code](src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/code.php) | [Settings](src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/settings.json) | Super__d8f9ba53_c490_4e8b_8e9f_6757224e069c__Power
- **interface InsertInterface** | [Details](src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13) | [Code](src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/code.php) | [Settings](src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/settings.json) | Super__03bbc8d5_86e8_4d2f_ae5f_0d44a4f7af13__Power
- **interface ItemInterface** | [Details](src/05744dd3-4030-4cf8-8dda-a93ab809b473) | [Code](src/05744dd3-4030-4cf8-8dda-a93ab809b473/code.php) | [Settings](src/05744dd3-4030-4cf8-8dda-a93ab809b473/settings.json) | Super__05744dd3_4030_4cf8_8dda_a93ab809b473__Power
- **interface ItemsInterface** | [Details](src/7212e4db-371f-4cfd-8122-32e9bb100d83) | [Code](src/7212e4db-371f-4cfd-8122-32e9bb100d83/code.php) | [Settings](src/7212e4db-371f-4cfd-8122-32e9bb100d83/settings.json) | Super__7212e4db_371f_4cfd_8122_32e9bb100d83__Power
- **interface LoadInterface** | [Details](src/c548640c-a461-4424-9ac5-8dfb5ed06d8d) | [Code](src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/code.php) | [Settings](src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/settings.json) | Super__c548640c_a461_4424_9ac5_8dfb5ed06d8d__Power
- **interface RemoteInterface** | [Details](src/51de80f2-2868-4c2c-8198-ef79349e9bd7) | [Code](src/51de80f2-2868-4c2c-8198-ef79349e9bd7/code.php) | [Settings](src/51de80f2-2868-4c2c-8198-ef79349e9bd7/settings.json) | Super__51de80f2_2868_4c2c_8198_ef79349e9bd7__Power
- **interface SubformInterface** | [Details](src/34959721-415b-4b5e-8002-3d1fc84b3b2b) | [Code](src/34959721-415b-4b5e-8002-3d1fc84b3b2b/code.php) | [Settings](src/34959721-415b-4b5e-8002-3d1fc84b3b2b/settings.json) | Super__34959721_415b_4b5e_8002_3d1fc84b3b2b__Power
- **interface UpdateInterface** | [Details](src/68a41264-64c0-441a-a3d8-8a5e557b1883) | [Code](src/68a41264-64c0-441a-a3d8-8a5e557b1883/code.php) | [Settings](src/68a41264-64c0-441a-a3d8-8a5e557b1883/settings.json) | Super__68a41264_64c0_441a_a3d8_8a5e557b1883__Power
- **Namespace**: [VDM\Joomla\Utilities\Component](#vdm-joomla-utilities-component)
- **abstract class Helper** | [Details](src/640b5352-fb09-425f-a26e-cd44eda03f15) | [Code](src/640b5352-fb09-425f-a26e-cd44eda03f15/code.php) | [Settings](src/640b5352-fb09-425f-a26e-cd44eda03f15/settings.json) | Super__640b5352_fb09_425f_a26e_cd44eda03f15__Power - **abstract class Helper** | [Details](src/640b5352-fb09-425f-a26e-cd44eda03f15) | [Code](src/640b5352-fb09-425f-a26e-cd44eda03f15/code.php) | [Settings](src/640b5352-fb09-425f-a26e-cd44eda03f15/settings.json) | Super__640b5352_fb09_425f_a26e_cd44eda03f15__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Utilities\String](#vastdevelopmentmethod-joomla-utilities-string) - **Namespace**: [VDM\Joomla\Utilities\String](#vdm-joomla-utilities-string)
- **abstract class ClassfunctionHelper** | [Details](src/30c5b4c2-f75f-4d15-869a-f8bfedd87358) | [Code](src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/code.php) | [Settings](src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/settings.json) | Super__30c5b4c2_f75f_4d15_869a_f8bfedd87358__Power - **abstract class ClassfunctionHelper** | [Details](src/30c5b4c2-f75f-4d15-869a-f8bfedd87358) | [Code](src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/code.php) | [Settings](src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/settings.json) | Super__30c5b4c2_f75f_4d15_869a_f8bfedd87358__Power
- **abstract class ComponentCodeNameHelper** | [Details](src/491dbe41-f26c-4de9-8a95-fcf87b35b56f) | [Code](src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/code.php) | [Settings](src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/settings.json) | Super__491dbe41_f26c_4de9_8a95_fcf87b35b56f__Power - **abstract class ComponentCodeNameHelper** | [Details](src/491dbe41-f26c-4de9-8a95-fcf87b35b56f) | [Code](src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/code.php) | [Settings](src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/settings.json) | Super__491dbe41_f26c_4de9_8a95_fcf87b35b56f__Power
@ -89,7 +119,7 @@ This repository contains an index (see below) of all the approved powers within
- **abstract class NamespaceHelper** | [Details](src/ce8cf834-6bac-44fb-941c-861f7e046cc0) | [Code](src/ce8cf834-6bac-44fb-941c-861f7e046cc0/code.php) | [Settings](src/ce8cf834-6bac-44fb-941c-861f7e046cc0/settings.json) | Super__ce8cf834_6bac_44fb_941c_861f7e046cc0__Power - **abstract class NamespaceHelper** | [Details](src/ce8cf834-6bac-44fb-941c-861f7e046cc0) | [Code](src/ce8cf834-6bac-44fb-941c-861f7e046cc0/code.php) | [Settings](src/ce8cf834-6bac-44fb-941c-861f7e046cc0/settings.json) | Super__ce8cf834_6bac_44fb_941c_861f7e046cc0__Power
- **abstract class PluginHelper** | [Details](src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6) | [Code](src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/code.php) | [Settings](src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/settings.json) | Super__3cf76fbf_fd95_4a33_878e_7aff6d36b7f6__Power - **abstract class PluginHelper** | [Details](src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6) | [Code](src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/code.php) | [Settings](src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/settings.json) | Super__3cf76fbf_fd95_4a33_878e_7aff6d36b7f6__Power
- **abstract class TypeHelper** | [Details](src/a8935cbe-7701-40dc-bfd5-675f2d600954) | [Code](src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php) | [Settings](src/a8935cbe-7701-40dc-bfd5-675f2d600954/settings.json) | Super__a8935cbe_7701_40dc_bfd5_675f2d600954__Power - **abstract class TypeHelper** | [Details](src/a8935cbe-7701-40dc-bfd5-675f2d600954) | [Code](src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php) | [Settings](src/a8935cbe-7701-40dc-bfd5-675f2d600954/settings.json) | Super__a8935cbe_7701_40dc_bfd5_675f2d600954__Power
- **Namespace**: [VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits](#vastdevelopmentmethod-joomla-abstraction-registry-traits) - **Namespace**: [VDM\Joomla\Abstraction\Registry\Traits](#vdm-joomla-abstraction-registry-traits)
- **trait Count** | [Details](src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8) | [Code](src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/code.php) | [Settings](src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/settings.json) | Super__11572d9b_e3d5_4b29_904c_9618d8f2bfd8__Power - **trait Count** | [Details](src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8) | [Code](src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/code.php) | [Settings](src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/settings.json) | Super__11572d9b_e3d5_4b29_904c_9618d8f2bfd8__Power
- **trait GetString** | [Details](src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b) | [Code](src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/code.php) | [Settings](src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/settings.json) | Super__59b1a2ea_d77e_4040_ac8c_e65cd8743e9b__Power - **trait GetString** | [Details](src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b) | [Code](src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/code.php) | [Settings](src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/settings.json) | Super__59b1a2ea_d77e_4040_ac8c_e65cd8743e9b__Power

View File

@ -0,0 +1,112 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# class Load (Details)
> namespace: **VDM\Joomla\Data\Action**
> extends: ****
```uml
@startuml
class Load #Gold {
# Model $model
# Database $load
# string $table
+ __construct(Model $model, Database $load, ...)
+ table(?string $table) : self
+ value(array $keys, string $field) : mixed
+ item(array $keys) : ?object
+ items(array $keys) : ?array
+ getTable() : string
- prefix(array $keys) : array
}
note right of Load::__construct
Constructor
since: 2.0.1
arguments:
Model $model
Database $load
?string $table = null
end note
note right of Load::table
Set the current active table
since: 3.2.2
return: self
end note
note right of Load::value
Get a value from a given table
Example: $this->value(
[
'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
], 'value_key'
);
since: 2.0.1
return: mixed
end note
note right of Load::item
Get values from a given table
Example: $this->item(
[
'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
]
);
since: 2.0.1
return: ?object
end note
note right of Load::items
Get values from a given table
Example: $this->items(
[
'guid' => [
'operator' => 'IN',
'value' => [''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'', ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'']
]
]
);
Example: $this->items($ids);
since: 2.0.1
return: ?array
end note
note right of Load::getTable
Get the current active table
since: 3.2.2
return: string
end note
note right of Load::prefix
Add prefix to the keys
since: 2.0.1
return: array
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,197 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/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\Data\Action;
use VDM\Joomla\Interfaces\ModelInterface as Model;
use VDM\Joomla\Interfaces\LoadInterface as Database;
use VDM\Joomla\Interfaces\Data\LoadInterface;
/**
* Data Load (GUID)
*
* @since 3.2.2
*/
class Load implements LoadInterface
{
/**
* Model Load
*
* @var Model
* @since 2.0.1
*/
protected Model $model;
/**
* Database Load
*
* @var Database
* @since 2.0.1
*/
protected Database $load;
/**
* Table Name
*
* @var string
* @since 3.2.1
*/
protected string $table;
/**
* Constructor
*
* @param Model $model The model object.
* @param Database $load The database object.
* @param string|null $table The table name.
*
* @since 2.0.1
*/
public function __construct(Model $model, Database $load, ?string $table = null)
{
$this->model = $model;
$this->load = $load;
if ($table !== null)
{
$this->table = $table;
}
}
/**
* Set the current active table
*
* @param string|null $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(?string $table): self
{
if ($table !== null)
{
$this->table = $table;
}
return $this;
}
/**
* Get a value from a given table
* Example: $this->value(
* [
* 'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
* ], 'value_key'
* );
*
* @param array $keys The item keys
* @param string $field The field key
*
* @return mixed
* @since 2.0.1
*/
public function value(array $keys, string $field)
{
return $this->model->value(
$this->load->value(
["a.{$field}" => $field],
['a' => $this->getTable()],
$this->prefix($keys)
),
$field,
$this->getTable()
);
}
/**
* Get values from a given table
* Example: $this->item(
* [
* 'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
* ]
* );
*
* @param array $keys The item keys
*
* @return object|null
* @since 2.0.1
*/
public function item(array $keys): ?object
{
return $this->model->item(
$this->load->item(
['all' => 'a.*'],
['a' => $this->getTable()],
$this->prefix($keys)
),
$this->getTable()
);
}
/**
* Get values from a given table
* Example: $this->items(
* [
* 'guid' => [
* 'operator' => 'IN',
* 'value' => [''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'', ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'']
* ]
* ]
* );
* Example: $this->items($ids);
*
* @param array $keys The item keys
*
* @return array|null
* @since 2.0.1
*/
public function items(array $keys): ?array
{
return $this->model->items(
$this->load->items(
['all' => 'a.*'], ['a' => $this->getTable()], $this->prefix($keys)
),
$this->getTable()
);
}
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string
{
return $this->table;
}
/**
* Add prefix to the keys
*
* @param array $keys The query keys
*
* @return array
* @since 2.0.1
*/
private function prefix(array &$keys): array
{
// update the key values
$bucket = [];
foreach ($keys as $k => $v)
{
$bucket['a.' . $k] = $v;
}
return $bucket;
}
}

View File

@ -0,0 +1,169 @@
/**
* Model Load
*
* @var Model
* @since 2.0.1
*/
protected Model $model;
/**
* Database Load
*
* @var Database
* @since 2.0.1
*/
protected Database $load;
/**
* Table Name
*
* @var string
* @since 3.2.1
*/
protected string $table;
/**
* Constructor
*
* @param Model $model The model object.
* @param Database $load The database object.
* @param string|null $table The table name.
*
* @since 2.0.1
*/
public function __construct(Model $model, Database $load, ?string $table = null)
{
$this->model = $model;
$this->load = $load;
if ($table !== null)
{
$this->table = $table;
}
}
/**
* Set the current active table
*
* @param string|null $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(?string $table): self
{
if ($table !== null)
{
$this->table = $table;
}
return $this;
}
/**
* Get a value from a given table
* Example: $this->value(
* [
* 'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
* ], 'value_key'
* );
*
* @param array $keys The item keys
* @param string $field The field key
*
* @return mixed
* @since 2.0.1
*/
public function value(array $keys, string $field)
{
return $this->model->value(
$this->load->value(
["a.{$field}" => $field],
['a' => $this->getTable()],
$this->prefix($keys)
),
$field,
$this->getTable()
);
}
/**
* Get values from a given table
* Example: $this->item(
* [
* 'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
* ]
* );
*
* @param array $keys The item keys
*
* @return object|null
* @since 2.0.1
*/
public function item(array $keys): ?object
{
return $this->model->item(
$this->load->item(
['all' => 'a.*'],
['a' => $this->getTable()],
$this->prefix($keys)
),
$this->getTable()
);
}
/**
* Get values from a given table
* Example: $this->items(
* [
* 'guid' => [
* 'operator' => 'IN',
* 'value' => [''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'', ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'']
* ]
* ]
* );
* Example: $this->items($ids);
*
* @param array $keys The item keys
*
* @return array|null
* @since 2.0.1
*/
public function items(array $keys): ?array
{
return $this->model->items(
$this->load->items(
['all' => 'a.*'], ['a' => $this->getTable()], $this->prefix($keys)
),
$this->getTable()
);
}
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string
{
return $this->table;
}
/**
* Add prefix to the keys
*
* @param array $keys The query keys
*
* @return array
* @since 2.0.1
*/
private function prefix(array &$keys): array
{
// update the key values
$bucket = [];
foreach ($keys as $k => $v)
{
$bucket['a.' . $k] = $v;
}
return $bucket;
}

View File

@ -0,0 +1,30 @@
{
"add_head": "0",
"add_licensing_template": "2",
"extends": "",
"guid": "008d111c-9d43-427c-8dd4-2653e8b74be8",
"implements": [
"c548640c-a461-4424-9ac5-8dfb5ed06d8d"
],
"load_selection": null,
"name": "Load",
"power_version": "1.0.0",
"system_name": "VDM.Data.Action.Load",
"type": "class",
"use_selection": {
"use_selection0": {
"use": "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff",
"as": "Model"
},
"use_selection1": {
"use": "2ad31f74-f579-499d-b98b-c4f54fd615dd",
"as": "Database"
}
},
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Data.Action.Load",
"description": "Data Load (GUID)\r\n\r\n@since 3.2.2",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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": ""
}

View File

@ -0,0 +1,97 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# interface InsertInterface (Details)
> namespace: **VDM\Joomla\Interfaces\Data**
> extends: ****
```uml
@startuml
interface InsertInterface #Lavender {
+ table(?string $table) : self
+ value(mixed $value, string $field, ...) : bool
+ row(array $item) : bool
+ rows(?array $items) : bool
+ item(object $item) : bool
+ items(?array $items) : bool
+ getTable() : string
}
note right of InsertInterface::table
Set the current active table
since: 3.2.2
return: self
end note
note right of InsertInterface::value
Insert a value to a given table
Example: $this->value(Value, 'value_key', 'GUID');
since: 3.2.0
return: bool
arguments:
mixed $value
string $field
string $keyValue
string $key = 'guid'
end note
note right of InsertInterface::row
Insert single row with multiple values to a given table
Example: $this->item(Array);
since: 3.2.0
return: bool
end note
note right of InsertInterface::rows
Insert multiple rows to a given table
Example: $this->items(Array);
since: 3.2.0
return: bool
end note
note right of InsertInterface::item
Insert single item with multiple values to a given table
Example: $this->item(Object);
since: 3.2.0
return: bool
end note
note right of InsertInterface::items
Insert multiple items to a given table
Example: $this->items(Array);
since: 3.2.0
return: bool
end note
note right of InsertInterface::getTable
Get the current active table
since: 3.2.2
return: string
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,98 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/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\Interfaces\Data;
/**
* Data Insert
*
* @since 3.2.2
*/
interface InsertInterface
{
/**
* Set the current active table
*
* @param string|null $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(?string $table): self;
/**
* Insert a value to a given table
* Example: $this->value(Value, 'value_key', 'GUID');
*
* @param mixed $value The field value
* @param string $field The field key
* @param string $keyValue The key value
* @param string $key The key name
*
* @return bool
* @since 3.2.0
*/
public function value($value, string $field, string $keyValue, string $key = 'guid'): bool;
/**
* Insert single row with multiple values to a given table
* Example: $this->item(Array);
*
* @param array $item The item to save
*
* @return bool
* @since 3.2.0
*/
public function row(array $item): bool;
/**
* Insert multiple rows to a given table
* Example: $this->items(Array);
*
* @param array|null $items The items updated in database (array of arrays)
*
* @return bool
* @since 3.2.0
*/
public function rows(?array $items): bool;
/**
* Insert single item with multiple values to a given table
* Example: $this->item(Object);
*
* @param object $item The item to save
*
* @return bool
* @since 3.2.0
*/
public function item(object $item): bool;
/**
* Insert multiple items to a given table
* Example: $this->items(Array);
*
* @param array|null $items The items updated in database (array of objects)
*
* @return bool
* @since 3.2.0
*/
public function items(?array $items): bool;
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string;
}

View File

@ -0,0 +1,75 @@
/**
* Set the current active table
*
* @param string|null $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(?string $table): self;
/**
* Insert a value to a given table
* Example: $this->value(Value, 'value_key', 'GUID');
*
* @param mixed $value The field value
* @param string $field The field key
* @param string $keyValue The key value
* @param string $key The key name
*
* @return bool
* @since 3.2.0
*/
public function value($value, string $field, string $keyValue, string $key = 'guid'): bool;
/**
* Insert single row with multiple values to a given table
* Example: $this->item(Array);
*
* @param array $item The item to save
*
* @return bool
* @since 3.2.0
*/
public function row(array $item): bool;
/**
* Insert multiple rows to a given table
* Example: $this->items(Array);
*
* @param array|null $items The items updated in database (array of arrays)
*
* @return bool
* @since 3.2.0
*/
public function rows(?array $items): bool;
/**
* Insert single item with multiple values to a given table
* Example: $this->item(Object);
*
* @param object $item The item to save
*
* @return bool
* @since 3.2.0
*/
public function item(object $item): bool;
/**
* Insert multiple items to a given table
* Example: $this->items(Array);
*
* @param array|null $items The items updated in database (array of objects)
*
* @return bool
* @since 3.2.0
*/
public function items(?array $items): bool;
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string;

View File

@ -0,0 +1,19 @@
{
"add_head": "0",
"add_licensing_template": "2",
"extends": "",
"guid": "03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13",
"implements": null,
"load_selection": null,
"name": "InsertInterface",
"power_version": "1.0.0",
"system_name": "VDM.Interfaces.Data.InsertInterface",
"type": "interface",
"use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Data.InsertInterface",
"description": "Data Insert\r\n\r\n@since 3.2.2",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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": ""
}

View File

@ -0,0 +1,88 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# interface ItemInterface (Details)
> namespace: **VDM\Joomla\Interfaces\Data**
> extends: ****
```uml
@startuml
interface ItemInterface #Lavender {
+ table(string $table) : self
+ get(string $value, string $key = 'guid') : ?object
+ value(string $value, string $key = 'guid', ...) : mixed
+ set(object $item, string $key = 'guid', ...) : bool
+ delete(string $value, string $key = 'guid') : bool
+ getTable() : string
}
note right of ItemInterface::table
Set the current active table
since: 3.2.2
return: self
end note
note right of ItemInterface::get
Get an item
since: 3.2.2
return: ?object
end note
note right of ItemInterface::value
Get the value
since: 3.2.2
return: mixed
arguments:
string $value
string $key = 'guid'
string $get = 'id'
end note
note right of ItemInterface::set
Set an item
since: 3.2.2
return: bool
arguments:
object $item
string $key = 'guid'
?string $action = null
end note
note right of ItemInterface::delete
Delete an item
since: 3.2.2
return: bool
end note
note right of ItemInterface::getTable
Get the current active table
since: 3.2.2
return: string
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,86 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/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\Interfaces\Data;
/**
* Data Item Interface
*
* @since 3.2.2
*/
interface ItemInterface
{
/**
* Set the current active table
*
* @param string $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(string $table): self;
/**
* Get an item
*
* @param string $value The item key value
* @param string $key The item key
*
* @return object|null The item object or null
* @since 3.2.2
*/
public function get(string $value, string $key = 'guid'): ?object;
/**
* Get the value
*
* @param string $value The item key value
* @param string $key The item key
* @param string $get The key of the values we want back
*
* @return mixed
* @since 3.2.2
*/
public function value(string $value, string $key = 'guid', string $get = 'id');
/**
* Set an item
*
* @param object $item The item
* @param string $key The item key
* @param string|null $action The action to load power
*
* @return bool
* @since 3.2.2
*/
public function set(object $item, string $key = 'guid', ?string $action = null): bool;
/**
* Delete an item
*
* @param string $value The item key value
* @param string $key The item key
*
* @return bool
* @since 3.2.2
*/
public function delete(string $value, string $key = 'guid'): bool;
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string;
}

View File

@ -0,0 +1,63 @@
/**
* Set the current active table
*
* @param string $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(string $table): self;
/**
* Get an item
*
* @param string $value The item key value
* @param string $key The item key
*
* @return object|null The item object or null
* @since 3.2.2
*/
public function get(string $value, string $key = 'guid'): ?object;
/**
* Get the value
*
* @param string $value The item key value
* @param string $key The item key
* @param string $get The key of the values we want back
*
* @return mixed
* @since 3.2.2
*/
public function value(string $value, string $key = 'guid', string $get = 'id');
/**
* Set an item
*
* @param object $item The item
* @param string $key The item key
* @param string|null $action The action to load power
*
* @return bool
* @since 3.2.2
*/
public function set(object $item, string $key = 'guid', ?string $action = null): bool;
/**
* Delete an item
*
* @param string $value The item key value
* @param string $key The item key
*
* @return bool
* @since 3.2.2
*/
public function delete(string $value, string $key = 'guid'): bool;
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string;

View File

@ -0,0 +1,19 @@
{
"add_head": "0",
"add_licensing_template": "2",
"extends": "",
"guid": "05744dd3-4030-4cf8-8dda-a93ab809b473",
"implements": null,
"load_selection": null,
"name": "ItemInterface",
"power_version": "1.0.0",
"system_name": "VDM.Interfaces.Data.ItemInterface",
"type": "interface",
"use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Data.ItemInterface",
"description": "Data Item Interface\r\n\r\n@since 3.2.2",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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": ""
}

View File

@ -7,7 +7,7 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# final class Load (Details) # final class Load (Details)
> namespace: **VastDevelopmentMethod\Joomla\Database** > namespace: **VDM\Joomla\Database**
> extends: **Database** > extends: **Database**
```uml ```uml
@startuml @startuml
@ -22,6 +22,7 @@ class Load << (F,LightGreen) >> #RoyalBlue {
# many(array $select, array $tables, ...) : bool # many(array $select, array $tables, ...) : bool
# one(array $select, array $tables, ...) : bool # one(array $select, array $tables, ...) : bool
# query(array $select, array $tables, ...) : ?object # query(array $select, array $tables, ...) : ?object
# getKey(array $select) : ?string
} }
note right of Load::rows note right of Load::rows
@ -150,6 +151,15 @@ note left of Load::query
?array $order = null ?array $order = null
?int $limit = null ?int $limit = null
end note end note
note right of Load::getKey
Get the key from the selection array.
This function retrieves a key from the provided selection array.
The key is removed from the array after being retrieved.
since: 3.2.2
return: ?string
end note
@enduml @enduml
``` ```

View File

@ -9,12 +9,12 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Database; namespace VDM\Joomla\Database;
use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\ArrayHelper;
use VastDevelopmentMethod\Joomla\Interfaces\LoadInterface; use VDM\Joomla\Interfaces\LoadInterface;
use VastDevelopmentMethod\Joomla\Abstraction\Database; use VDM\Joomla\Abstraction\Database;
/** /**
@ -40,15 +40,7 @@ final class Load extends Database implements LoadInterface
?array $order = null, ?int $limit = null): ?array ?array $order = null, ?int $limit = null): ?array
{ {
// set key if found // set key if found
$key = ''; $key = $this->getKey($select);
if (isset($select['key']))
{
if (is_string($select['key']))
{
$key = $select['key'];
}
unset($select['key']);
}
// check if we can get many rows // check if we can get many rows
if ($this->many($select, $tables, $where, $order, $limit)) if ($this->many($select, $tables, $where, $order, $limit))
@ -77,15 +69,7 @@ final class Load extends Database implements LoadInterface
?array $order = null, ?int $limit = null): ?array ?array $order = null, ?int $limit = null): ?array
{ {
// set key if found // set key if found
$key = ''; $key = $this->getKey($select);
if (isset($select['key']))
{
if (is_string($select['key']))
{
$key = $select['key'];
}
unset($select['key']);
}
// check if we can get many rows // check if we can get many rows
if ($this->many($select, $tables, $where, $order, $limit)) if ($this->many($select, $tables, $where, $order, $limit))
@ -464,6 +448,30 @@ final class Load extends Database implements LoadInterface
return $query; return $query;
} }
/**
* Get the key from the selection array.
*
* This function retrieves a key from the provided selection array.
* The key is removed from the array after being retrieved.
*
* @param array $select Array of selection keys.
*
* @return string|null The key, or null if no key is found.
* @since 3.2.2
**/
protected function getKey(array &$select): ?string
{
$key = null;
// Check for 'key' first and ensure it's a string.
if (isset($select['key']) && is_string($select['key']))
{
$key = $select['key'];
unset($select['key']); // Remove 'key' from the array.
}
return $key;
}
} }

View File

@ -14,15 +14,7 @@
?array $order = null, ?int $limit = null): ?array ?array $order = null, ?int $limit = null): ?array
{ {
// set key if found // set key if found
$key = ''; $key = $this->getKey($select);
if (isset($select['key']))
{
if (is_string($select['key']))
{
$key = $select['key'];
}
unset($select['key']);
}
// check if we can get many rows // check if we can get many rows
if ($this->many($select, $tables, $where, $order, $limit)) if ($this->many($select, $tables, $where, $order, $limit))
@ -51,15 +43,7 @@
?array $order = null, ?int $limit = null): ?array ?array $order = null, ?int $limit = null): ?array
{ {
// set key if found // set key if found
$key = ''; $key = $this->getKey($select);
if (isset($select['key']))
{
if (is_string($select['key']))
{
$key = $select['key'];
}
unset($select['key']);
}
// check if we can get many rows // check if we can get many rows
if ($this->many($select, $tables, $where, $order, $limit)) if ($this->many($select, $tables, $where, $order, $limit))
@ -438,3 +422,28 @@
return $query; return $query;
} }
/**
* Get the key from the selection array.
*
* This function retrieves a key from the provided selection array.
* The key is removed from the array after being retrieved.
*
* @param array $select Array of selection keys.
*
* @return string|null The key, or null if no key is found.
* @since 3.2.2
**/
protected function getKey(array &$select): ?string
{
$key = null;
// Check for 'key' first and ensure it's a string.
if (isset($select['key']) && is_string($select['key']))
{
$key = $select['key'];
unset($select['key']); // Remove 'key' from the array.
}
return $key;
}

View File

@ -17,6 +17,7 @@
"as": "default" "as": "default"
} }
}, },
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Database.Load", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Database.Load",
"description": "Database Load\r\n\r\n@since 3.2.0", "description": "Database Load\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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class ArrayHelper (Details) # abstract class ArrayHelper (Details)
> namespace: **VastDevelopmentMethod\Joomla\Utilities** > namespace: **VDM\Joomla\Utilities**
> extends: ****
```uml ```uml
@startuml @startuml
abstract ArrayHelper #Orange { abstract ArrayHelper #Orange {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Utilities; namespace VDM\Joomla\Utilities;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a", "guid": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -10,6 +10,7 @@
"system_name": "Utilities Array Helper", "system_name": "Utilities Array Helper",
"type": "abstract class", "type": "abstract class",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.ArrayHelper", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.ArrayHelper",
"description": "Some array tricks helper\r\n\r\n@since 3.0.9", "description": "Some array tricks helper\r\n\r\n@since 3.0.9",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# trait Count (Details) # trait Count (Details)
> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** > namespace: **VDM\Joomla\Abstraction\Registry\Traits**
> extends: ****
```uml ```uml
@startuml @startuml
class Count << (T,Orange) >> #Turquoise { class Count << (T,Orange) >> #Turquoise {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits; namespace VDM\Joomla\Abstraction\Registry\Traits;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "11572d9b-e3d5-4b29-904c-9618d8f2bfd8", "guid": "11572d9b-e3d5-4b29-904c-9618d8f2bfd8",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -10,6 +10,7 @@
"system_name": "VDM.Abstraction.Registry.Traits.Count", "system_name": "VDM.Abstraction.Registry.Traits.Count",
"type": "trait", "type": "trait",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.Count", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.Count",
"description": "Count Values\r\n\r\n@since 3.2.0", "description": "Count Values\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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class FormHelper (Details) # abstract class FormHelper (Details)
> namespace: **VastDevelopmentMethod\Joomla\Utilities** > namespace: **VDM\Joomla\Utilities**
> extends: ****
```uml ```uml
@startuml @startuml
abstract FormHelper #Orange { abstract FormHelper #Orange {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Utilities; namespace VDM\Joomla\Utilities;
use Joomla\CMS\Form\FormHelper as JoomlaFormHelper; use Joomla\CMS\Form\FormHelper as JoomlaFormHelper;

View File

@ -1,7 +1,7 @@
{ {
"add_head": "1", "add_head": "1",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "1198aecf-84c6-45d2-aea8-d531aa4afdfa", "guid": "1198aecf-84c6-45d2-aea8-d531aa4afdfa",
"implements": null, "implements": null,
"load_selection": { "load_selection": {
@ -14,6 +14,7 @@
"system_name": "Utilities FormHelper", "system_name": "Utilities FormHelper",
"type": "abstract class", "type": "abstract class",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.FormHelper", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.FormHelper",
"description": "Form Helper\r\n\r\n@since 3.2.0", "description": "Form Helper\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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class Grep (Details) # abstract class Grep (Details)
> namespace: **VastDevelopmentMethod\Joomla\Abstraction** > namespace: **VDM\Joomla\Abstraction**
> extends: ****
```uml ```uml
@startuml @startuml
abstract Grep #Orange { abstract Grep #Orange {
@ -16,12 +17,12 @@ abstract Grep #Orange {
# array $order # array $order
# Contents $contents # Contents $contents
# CMSApplication $app # CMSApplication $app
+ __construct(string $path, array $paths, ...) + __construct(Contents $contents, array $paths, ...)
+ getRemotePowersGuid() : ?array + getRemotePowersGuid() : ?array
+ get(string $guid, ?array $order = null) : ?object + get(string $guid, ?array $order = null) : ?object
# {abstract} remoteIndex(object $path) : void # {abstract} remoteIndex(object $path) : void
# getFunctionName(string $name) : ?string # getFunctionName(string $name) : ?string
- init() : void # init() : void
} }
note right of Grep::__construct note right of Grep::__construct
@ -30,9 +31,9 @@ note right of Grep::__construct
since: 3.2.0 since: 3.2.0
arguments: arguments:
string $path
array $paths
Contents $contents Contents $contents
array $paths
?string $path = null
?CMSApplication $app = null ?CMSApplication $app = null
end note end note

View File

@ -9,17 +9,14 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Abstraction; namespace VDM\Joomla\Abstraction;
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\Folder; use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Application\CMSApplication; use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text; use VDM\Joomla\Gitea\Repository\Contents;
use VastDevelopmentMethod\Joomla\Gitea\Repository\Contents; use VDM\Joomla\Interfaces\GrepInterface;
use VastDevelopmentMethod\Joomla\Utilities\FileHelper;
use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
use VastDevelopmentMethod\Joomla\Interfaces\GrepInterface;
/** /**
@ -77,19 +74,19 @@ abstract class Grep implements GrepInterface
/** /**
* Constructor. * Constructor.
* *
* @param string $path The local path
* @param array $paths The approved paths
* @param Contents $contents The Gitea Repository Contents object. * @param Contents $contents The Gitea Repository Contents object.
* @param array $paths The approved paths
* @param string|null $path The local path
* @param CMSApplication|null $app The CMS Application object. * @param CMSApplication|null $app The CMS Application object.
* *
* @throws \Exception * @throws \Exception
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(string $path, array $paths, Contents $contents, ?CMSApplication $app = null) public function __construct(Contents $contents, array $paths, ?string $path = null, ?CMSApplication $app = null)
{ {
$this->path = $path;
$this->paths = $paths; $this->paths = $paths;
$this->contents = $contents; $this->contents = $contents;
$this->path = $path;
$this->app = $app ?: Factory::getApplication(); $this->app = $app ?: Factory::getApplication();
$this->init(); $this->init();
@ -186,22 +183,28 @@ abstract class Grep implements GrepInterface
* @return void * @return void
* @since 3.2.0 * @since 3.2.0
*/ */
private function init(): void protected function init(): void
{ {
if (is_array($this->paths) && $this->paths !== []) if (is_array($this->paths) && $this->paths !== [])
{ {
foreach ($this->paths as $n => &$path) foreach ($this->paths as $n => &$path)
{ {
if (isset($path->owner) && strlen($path->owner) > 1 && if (isset($path->organisation) && strlen($path->organisation) > 1 &&
isset($path->repo) && strlen($path->repo) > 1) isset($path->repository) && strlen($path->repository) > 1)
{ {
// build the path // build the path
$path->path = trim($path->owner) . '/' . trim($path->repo); $path->path = trim($path->organisation) . '/' . trim($path->repository);
// update the branch // update the branch
if ($path->branch === 'default' || empty($path->branch)) if ($path->read_branch === 'default' || empty($path->read_branch))
{ {
$path->branch = null; $path->read_branch = null;
}
// only update the write branch if set
if (isset($path->write_branch) && ($path->write_branch === 'default' || empty($path->write_branch)))
{
$path->write_branch = null;
} }
// set local path // set local path

View File

@ -41,19 +41,19 @@
/** /**
* Constructor. * Constructor.
* *
* @param string $path The local path
* @param array $paths The approved paths
* @param Contents $contents The Gitea Repository Contents object. * @param Contents $contents The Gitea Repository Contents object.
* @param array $paths The approved paths
* @param string|null $path The local path
* @param CMSApplication|null $app The CMS Application object. * @param CMSApplication|null $app The CMS Application object.
* *
* @throws \Exception * @throws \Exception
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(string $path, array $paths, Contents $contents, ?CMSApplication $app = null) public function __construct(Contents $contents, array $paths, ?string $path = null, ?CMSApplication $app = null)
{ {
$this->path = $path;
$this->paths = $paths; $this->paths = $paths;
$this->contents = $contents; $this->contents = $contents;
$this->path = $path;
$this->app = $app ?: Factory::getApplication(); $this->app = $app ?: Factory::getApplication();
$this->init(); $this->init();
@ -150,22 +150,28 @@
* @return void * @return void
* @since 3.2.0 * @since 3.2.0
*/ */
private function init(): void protected function init(): void
{ {
if (is_array($this->paths) && $this->paths !== []) if (is_array($this->paths) && $this->paths !== [])
{ {
foreach ($this->paths as $n => &$path) foreach ($this->paths as $n => &$path)
{ {
if (isset($path->owner) && strlen($path->owner) > 1 && if (isset($path->organisation) && strlen($path->organisation) > 1 &&
isset($path->repo) && strlen($path->repo) > 1) isset($path->repository) && strlen($path->repository) > 1)
{ {
// build the path // build the path
$path->path = trim($path->owner) . '/' . trim($path->repo); $path->path = trim($path->organisation) . '/' . trim($path->repository);
// update the branch // update the branch
if ($path->branch === 'default' || empty($path->branch)) if ($path->read_branch === 'default' || empty($path->read_branch))
{ {
$path->branch = null; $path->read_branch = null;
}
// only update the write branch if set
if (isset($path->write_branch) && ($path->write_branch === 'default' || empty($path->write_branch)))
{
$path->write_branch = null;
} }
// set local path // set local path

View File

@ -1,7 +1,7 @@
{ {
"add_head": "1", "add_head": "1",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "1401a167-0ce4-4f4a-afee-2d8b02ed339b", "guid": "1401a167-0ce4-4f4a-afee-2d8b02ed339b",
"implements": [ "implements": [
"c182506a-ab84-439c-b962-1e606b58d545" "c182506a-ab84-439c-b962-1e606b58d545"
@ -15,19 +15,12 @@
"use_selection0": { "use_selection0": {
"use": "8d1baef6-fcad-49a9-848f-428009cdb989", "use": "8d1baef6-fcad-49a9-848f-428009cdb989",
"as": "default" "as": "default"
},
"use_selection1": {
"use": "a223b31e-ea1d-4cdf-92ae-5f9becffaff0",
"as": "default"
},
"use_selection2": {
"use": "4b225c51-d293-48e4-b3f6-5136cf5c3f18",
"as": "default"
} }
}, },
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Grep", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Grep",
"description": "Global Resource Empowerment Platform\r\n\r\n The Grep feature will try to find your power in the repositories listed in the global\r\n Options of JCB in the super powers tab, and if it can't be found there will try the global core\r\n Super powers of JCB. All searches are performed according the the [algorithm:cascading]\r\n See documentation for more details: https:\/\/git.vdm.dev\/joomla\/super-powers\/wiki\r\n\r\n@since 3.2.1", "description": "Global Resource Empowerment Platform\r\n\r\n The Grep feature will try to find your power in the repositories listed in the global\r\n Options of JCB in the super powers tab, and if it can't be found there will try the global core\r\n Super powers of JCB. All searches are performed according the the [algorithm:cascading]\r\n See documentation for more details: https:\/\/git.vdm.dev\/joomla\/super-powers\/wiki\r\n\r\n@since 3.2.1",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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\\Factory;\r\nuse Joomla\\CMS\\Filesystem\\Folder;\r\nuse Joomla\\CMS\\Application\\CMSApplication;\r\nuse Joomla\\CMS\\Language\\Text;", "head": "use Joomla\\CMS\\Factory;\r\nuse Joomla\\CMS\\Filesystem\\Folder;\r\nuse Joomla\\CMS\\Application\\CMSApplication;",
"composer": "" "composer": ""
} }

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class MathHelper (Details) # abstract class MathHelper (Details)
> namespace: **VastDevelopmentMethod\Joomla\Utilities** > namespace: **VDM\Joomla\Utilities**
> extends: ****
```uml ```uml
@startuml @startuml
abstract MathHelper #Orange { abstract MathHelper #Orange {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Utilities; namespace VDM\Joomla\Utilities;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "152c8793-8b75-4715-996a-257b9f65451c", "guid": "152c8793-8b75-4715-996a-257b9f65451c",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -10,6 +10,7 @@
"system_name": "Utilities Math Helper", "system_name": "Utilities Math Helper",
"type": "abstract class", "type": "abstract class",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.MathHelper", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.MathHelper",
"description": "Basic Math Helper\r\n\r\n@since 3.0.9", "description": "Basic Math Helper\r\n\r\n@since 3.0.9",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class StringHelper (Details) # abstract class StringHelper (Details)
> namespace: **VastDevelopmentMethod\Joomla\Utilities** > namespace: **VDM\Joomla\Utilities**
> extends: ****
```uml ```uml
@startuml @startuml
abstract StringHelper #Orange { abstract StringHelper #Orange {

View File

@ -9,12 +9,12 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Utilities; namespace VDM\Joomla\Utilities;
use Joomla\Filter\InputFilter; use Joomla\Filter\InputFilter;
use Joomla\CMS\Language\Language; use Joomla\CMS\Language\Language;
use VastDevelopmentMethod\Joomla\Utilities\Component\Helper; use VDM\Joomla\Utilities\Component\Helper;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "1", "add_head": "1",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef", "guid": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef",
"implements": null, "implements": null,
"load_selection": { "load_selection": {
@ -19,6 +19,7 @@
"as": "default" "as": "default"
} }
}, },
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.StringHelper", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.StringHelper",
"description": "Some string tricks\r\n\r\n@since 3.0.9", "description": "Some string tricks\r\n\r\n@since 3.0.9",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# trait InArray (Details) # trait InArray (Details)
> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** > namespace: **VDM\Joomla\Abstraction\Registry\Traits**
> extends: ****
```uml ```uml
@startuml @startuml
class InArray << (T,Orange) >> #Turquoise { class InArray << (T,Orange) >> #Turquoise {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits; namespace VDM\Joomla\Abstraction\Registry\Traits;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "215b35ac-1b26-4838-bbcf-d1fdbbd9353f", "guid": "215b35ac-1b26-4838-bbcf-d1fdbbd9353f",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -10,6 +10,7 @@
"system_name": "VDM.Abstraction.Registry.Traits.InArray", "system_name": "VDM.Abstraction.Registry.Traits.InArray",
"type": "trait", "type": "trait",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.InArray", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.InArray",
"description": "Check if a value is in an array\r\n\r\n@since 3.2.0", "description": "Check if a value is in an array\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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -0,0 +1,152 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# final class Items (Details)
> namespace: **VDM\Joomla\Data**
> extends: ****
```uml
@startuml
class Items << (F,LightGreen) >> #RoyalBlue {
# Load $load
# Insert $insert
# Update $update
# Delete $delete
# Database $database
# string $table
+ __construct(Load $load, Insert $insert, ...)
+ table(string $table) : self
+ get(array $values, string $key = 'guid') : ?array
+ values(array $values, string $key = 'guid', ...) : ?array
+ set(array $items, string $key = 'guid') : bool
+ delete(string $values, string $key = 'guid') : bool
+ getTable() : string
- insert(array $items) : bool
- update(array $items, string $key) : bool
- sort(array $items, string $key) : ?array
- extractValues(array $items, string $key) : ?array
- extractSet(array $items, array $set, ...) : ?array
}
note right of Items::__construct
Constructor.
since: 3.2.2
arguments:
Load $load
Insert $insert
Update $update
Delete $delete
Database $database
?string $table = null
end note
note left of Items::table
Set the current active table
since: 3.2.2
return: self
end note
note right of Items::get
Get list of items
since: 3.2.2
return: ?array
end note
note left of Items::values
Get the values
since: 3.2.2
return: ?array
arguments:
array $values
string $key = 'guid'
string $get = 'id'
end note
note right of Items::set
Set items
since: 3.2.2
return: bool
end note
note left of Items::delete
Delete items
since: 3.2.2
return: bool
end note
note right of Items::getTable
Get the current active table
since: 3.2.2
return: string
end note
note left of Items::insert
Insert a item
since: 3.2.2
return: bool
end note
note right of Items::update
Update a item
since: 3.2.2
return: bool
end note
note left of Items::sort
Sort items between insert and update.
since: 3.2.2
return: ?array
end note
note right of Items::extractValues
Extracts values for a given key from an array of items.
Items can be either arrays or objects.
since: 3.2.2
return: ?array
end note
note left of Items::extractSet
Extracts items from an array of items based on a set.
Items can be either arrays or objects.
since: 3.2.2
return: ?array
arguments:
array $items
array $set
string $key
bool $inverse = false
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,351 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/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\Data;
use VDM\Joomla\Interfaces\Data\LoadInterface as Load;
use VDM\Joomla\Interfaces\Data\InsertInterface as Insert;
use VDM\Joomla\Interfaces\Data\UpdateInterface as Update;
use VDM\Joomla\Interfaces\Data\DeleteInterface as Delete;
use VDM\Joomla\Interfaces\LoadInterface as Database;
use VDM\Joomla\Interfaces\Data\ItemsInterface;
/**
* Data Items
*
* @since 3.2.2
*/
final class Items implements ItemsInterface
{
/**
* The LoadInterface Class.
*
* @var Load
* @since 3.2.2
*/
protected Load $load;
/**
* The InsertInterface Class.
*
* @var Insert
* @since 3.2.2
*/
protected Insert $insert;
/**
* The UpdateInterface Class.
*
* @var Update
* @since 3.2.2
*/
protected Update $update;
/**
* The DeleteInterface Class.
*
* @var Delete
* @since 3.2.2
*/
protected Delete $delete;
/**
* The Load Class.
*
* @var Database
* @since 3.2.2
*/
protected Database $database;
/**
* Table Name
*
* @var string
* @since 3.2.1
*/
protected string $table;
/**
* Constructor.
*
* @param Load $load The LoadInterface Class.
* @param Insert $insert The InsertInterface Class.
* @param Update $update The UpdateInterface Class.
* @param Delete $delete The DeleteInterface Class.
* @param Database $database The Database Load Class.
* @param string|null $table The table name.
*
* @since 3.2.2
*/
public function __construct(Load $load, Insert $insert, Update $update, Delete $delete,
Database $database, ?string $table = null)
{
$this->load = $load;
$this->insert = $insert;
$this->update = $update;
$this->delete = $delete;
$this->database = $database;
if ($table !== null)
{
$this->table = $table;
}
}
/**
* Set the current active table
*
* @param string $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(string $table): self
{
$this->table = $table;
return $this;
}
/**
* Get list of items
*
* @param array $values The ids of the items
* @param string $key The key of the values
*
* @return array|null The item object or null
* @since 3.2.2
*/
public function get(array $values, string $key = 'guid'): ?array
{
return $this->load->table($this->getTable())->items([
$key => [
'operator' => 'IN',
'value' => array_values($values)
]
]);
}
/**
* Get the values
*
* @param array $values The list of values (to search by).
* @param string $key The key on which the values being searched.
* @param string $get The key of the values we want back
*
* @return array|null The array of found values.
* @since 3.2.2
*/
public function values(array $values, string $key = 'guid', string $get = 'id'): ?array
{
// Perform the database query
$rows = $this->database->rows(
["a.$get" => $get],
["a" => $this->getTable()],
["a.$key" => ['operator' => 'IN', 'value' => $values]]
);
// Check if rows are found
if ($rows !== null)
{
// Return the values from the found rows
return array_values(
array_map(
fn($row) => $row[$get],
$rows
)
);
}
// Return null if no rows are found
return null;
}
/**
* Set items
*
* @param array $items The list of items
* @param string $key The key on which the items should be set
*
* @return bool
* @since 3.2.2
*/
public function set(array $items, string $key = 'guid'): bool
{
if (($sets = $this->sort($items, $key)) !== null)
{
foreach ($sets as $action => $items)
{
$this->{$action}($items, $key);
}
return true;
}
return false;
}
/**
* Delete items
*
* @param array $values The item key value
* @param string $key The item key
*
* @return bool
* @since 3.2.2
*/
public function delete(string $values, string $key = 'guid'): bool
{
return $this->delete->table($this->getTable())->items([$key => ['operator' => 'IN', 'value' => $values]]);
}
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string
{
return $this->table;
}
/**
* Insert a item
*
* @param array $items The item
*
* @return bool
* @since 3.2.2
*/
private function insert(array $items): bool
{
return $this->insert->table($this->getTable())->rows($items);
}
/**
* Update a item
*
* @param object $item The item
* @param string $key The item key
*
* @return bool
* @since 3.2.2
*/
private function update(array $items, string $key): bool
{
return $this->update->table($this->getTable())->rows($items, $key);
}
/**
* Sort items between insert and update.
*
* @param array $items The list of items.
* @param string $key The key on which the items should be sorted.
*
* @return array|null The sorted sets.
* @since 3.2.2
*/
private function sort(array $items, string $key): ?array
{
// Extract relevant items based on the key.
$values = $this->extractValues($items, $key);
if ($values === null)
{
return null;
}
$sets = [
'insert' => [],
'update' => []
];
// Check for existing items.
$existingItems = $this->values($values, $key, $key);
if ($existingItems !== null)
{
$sets['update'] = $this->extractSet($items, $existingItems, $key) ?? [];
$sets['insert'] = $this->extractSet($items, $existingItems, $key, true) ?? [];
}
else
{
$sets['insert'] = $items;
}
// If either set is empty, remove it from the result.
$sets = array_filter($sets);
return !empty($sets) ? $sets : null;
}
/**
* Extracts values for a given key from an array of items.
* Items can be either arrays or objects.
*
* @param array $items Array of items (arrays or objects)
* @param string $key The key to extract values for
*
* @return array|null Extracted values
* @since 3.2.2
*/
private function extractValues(array $items, string $key): ?array
{
$result = [];
foreach ($items as $item)
{
if (is_array($item) && !empty($item[$key]))
{
$result[] = $item[$key];
}
elseif (is_object($item) && !empty($item->{$key}))
{
$result[] = $item->{$key};
}
}
return ($result === []) ? null : $result;
}
/**
* Extracts items from an array of items based on a set.
* Items can be either arrays or objects.
*
* @param array $items Array of items (arrays or objects)
* @param array $set The set to match values against
* @param string $key The key of the set values
* @param bool $inverse Whether to extract items not in the set
*
* @return array|null Extracted values
* @since 3.2.2
*/
private function extractSet(array $items, array $set, string $key, bool $inverse = false): ?array
{
$result = [];
foreach ($items as $item)
{
$value = is_array($item) ? ($item[$key] ?? null) : ($item->{$key} ?? null);
if ($value !== null)
{
$inSet = in_array($value, $set);
if (($inSet && !$inverse) || (!$inSet && $inverse))
{
$result[] = is_array($item) ? $item : (array) $item; // convert all to arrays
}
}
}
return empty($result) ? null : $result;
}
}

View File

@ -0,0 +1,320 @@
/**
* The LoadInterface Class.
*
* @var Load
* @since 3.2.2
*/
protected Load $load;
/**
* The InsertInterface Class.
*
* @var Insert
* @since 3.2.2
*/
protected Insert $insert;
/**
* The UpdateInterface Class.
*
* @var Update
* @since 3.2.2
*/
protected Update $update;
/**
* The DeleteInterface Class.
*
* @var Delete
* @since 3.2.2
*/
protected Delete $delete;
/**
* The Load Class.
*
* @var Database
* @since 3.2.2
*/
protected Database $database;
/**
* Table Name
*
* @var string
* @since 3.2.1
*/
protected string $table;
/**
* Constructor.
*
* @param Load $load The LoadInterface Class.
* @param Insert $insert The InsertInterface Class.
* @param Update $update The UpdateInterface Class.
* @param Delete $delete The DeleteInterface Class.
* @param Database $database The Database Load Class.
* @param string|null $table The table name.
*
* @since 3.2.2
*/
public function __construct(Load $load, Insert $insert, Update $update, Delete $delete,
Database $database, ?string $table = null)
{
$this->load = $load;
$this->insert = $insert;
$this->update = $update;
$this->delete = $delete;
$this->database = $database;
if ($table !== null)
{
$this->table = $table;
}
}
/**
* Set the current active table
*
* @param string $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(string $table): self
{
$this->table = $table;
return $this;
}
/**
* Get list of items
*
* @param array $values The ids of the items
* @param string $key The key of the values
*
* @return array|null The item object or null
* @since 3.2.2
*/
public function get(array $values, string $key = 'guid'): ?array
{
return $this->load->table($this->getTable())->items([
$key => [
'operator' => 'IN',
'value' => array_values($values)
]
]);
}
/**
* Get the values
*
* @param array $values The list of values (to search by).
* @param string $key The key on which the values being searched.
* @param string $get The key of the values we want back
*
* @return array|null The array of found values.
* @since 3.2.2
*/
public function values(array $values, string $key = 'guid', string $get = 'id'): ?array
{
// Perform the database query
$rows = $this->database->rows(
["a.$get" => $get],
["a" => $this->getTable()],
["a.$key" => ['operator' => 'IN', 'value' => $values]]
);
// Check if rows are found
if ($rows !== null)
{
// Return the values from the found rows
return array_values(
array_map(
fn($row) => $row[$get],
$rows
)
);
}
// Return null if no rows are found
return null;
}
/**
* Set items
*
* @param array $items The list of items
* @param string $key The key on which the items should be set
*
* @return bool
* @since 3.2.2
*/
public function set(array $items, string $key = 'guid'): bool
{
if (($sets = $this->sort($items, $key)) !== null)
{
foreach ($sets as $action => $items)
{
$this->{$action}($items, $key);
}
return true;
}
return false;
}
/**
* Delete items
*
* @param array $values The item key value
* @param string $key The item key
*
* @return bool
* @since 3.2.2
*/
public function delete(string $values, string $key = 'guid'): bool
{
return $this->delete->table($this->getTable())->items([$key => ['operator' => 'IN', 'value' => $values]]);
}
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string
{
return $this->table;
}
/**
* Insert a item
*
* @param array $items The item
*
* @return bool
* @since 3.2.2
*/
private function insert(array $items): bool
{
return $this->insert->table($this->getTable())->rows($items);
}
/**
* Update a item
*
* @param object $item The item
* @param string $key The item key
*
* @return bool
* @since 3.2.2
*/
private function update(array $items, string $key): bool
{
return $this->update->table($this->getTable())->rows($items, $key);
}
/**
* Sort items between insert and update.
*
* @param array $items The list of items.
* @param string $key The key on which the items should be sorted.
*
* @return array|null The sorted sets.
* @since 3.2.2
*/
private function sort(array $items, string $key): ?array
{
// Extract relevant items based on the key.
$values = $this->extractValues($items, $key);
if ($values === null)
{
return null;
}
$sets = [
'insert' => [],
'update' => []
];
// Check for existing items.
$existingItems = $this->values($values, $key, $key);
if ($existingItems !== null)
{
$sets['update'] = $this->extractSet($items, $existingItems, $key) ?? [];
$sets['insert'] = $this->extractSet($items, $existingItems, $key, true) ?? [];
}
else
{
$sets['insert'] = $items;
}
// If either set is empty, remove it from the result.
$sets = array_filter($sets);
return !empty($sets) ? $sets : null;
}
/**
* Extracts values for a given key from an array of items.
* Items can be either arrays or objects.
*
* @param array $items Array of items (arrays or objects)
* @param string $key The key to extract values for
*
* @return array|null Extracted values
* @since 3.2.2
*/
private function extractValues(array $items, string $key): ?array
{
$result = [];
foreach ($items as $item)
{
if (is_array($item) && !empty($item[$key]))
{
$result[] = $item[$key];
}
elseif (is_object($item) && !empty($item->{$key}))
{
$result[] = $item->{$key};
}
}
return ($result === []) ? null : $result;
}
/**
* Extracts items from an array of items based on a set.
* Items can be either arrays or objects.
*
* @param array $items Array of items (arrays or objects)
* @param array $set The set to match values against
* @param string $key The key of the set values
* @param bool $inverse Whether to extract items not in the set
*
* @return array|null Extracted values
* @since 3.2.2
*/
private function extractSet(array $items, array $set, string $key, bool $inverse = false): ?array
{
$result = [];
foreach ($items as $item)
{
$value = is_array($item) ? ($item[$key] ?? null) : ($item->{$key} ?? null);
if ($value !== null)
{
$inSet = in_array($value, $set);
if (($inSet && !$inverse) || (!$inSet && $inverse))
{
$result[] = is_array($item) ? $item : (array) $item; // convert all to arrays
}
}
}
return empty($result) ? null : $result;
}

View File

@ -0,0 +1,42 @@
{
"add_head": "0",
"add_licensing_template": "2",
"extends": "",
"guid": "21bca8a4-5b28-41c4-843e-8097f0ba7cca",
"implements": [
"7212e4db-371f-4cfd-8122-32e9bb100d83"
],
"load_selection": null,
"name": "Items",
"power_version": "1.0.0",
"system_name": "VDM.Data.Items",
"type": "final class",
"use_selection": {
"use_selection0": {
"use": "c548640c-a461-4424-9ac5-8dfb5ed06d8d",
"as": "Load"
},
"use_selection1": {
"use": "03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13",
"as": "Insert"
},
"use_selection2": {
"use": "68a41264-64c0-441a-a3d8-8a5e557b1883",
"as": "Update"
},
"use_selection3": {
"use": "d8f9ba53-c490-4e8b-8e9f-6757224e069c",
"as": "Delete"
},
"use_selection4": {
"use": "2ad31f74-f579-499d-b98b-c4f54fd615dd",
"as": "Database"
}
},
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Data.Items",
"description": "Data Items\r\n\r\n@since 3.2.2",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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": ""
}

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# interface LoadInterface (Details) # interface LoadInterface (Details)
> namespace: **VastDevelopmentMethod\Joomla\Interfaces** > namespace: **VDM\Joomla\Interfaces**
> extends: ****
```uml ```uml
@startuml @startuml
interface LoadInterface #Lavender { interface LoadInterface #Lavender {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Interfaces; namespace VDM\Joomla\Interfaces;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "2ad31f74-f579-499d-b98b-c4f54fd615dd", "guid": "2ad31f74-f579-499d-b98b-c4f54fd615dd",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -10,6 +10,7 @@
"system_name": "VDM.Interfaces.LoadInterface", "system_name": "VDM.Interfaces.LoadInterface",
"type": "interface", "type": "interface",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.LoadInterface", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.LoadInterface",
"description": "Database Load Interface\r\n\r\n@since 3.2.0", "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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# interface Tableinterface (Details) # interface Tableinterface (Details)
> namespace: **VastDevelopmentMethod\Joomla\Interfaces** > namespace: **VDM\Joomla\Interfaces**
> extends: ****
```uml ```uml
@startuml @startuml
interface Tableinterface #Lavender { interface Tableinterface #Lavender {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Interfaces; namespace VDM\Joomla\Interfaces;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "2da6d6c4-eb29-4d69-8bc2-36d96e916adf", "guid": "2da6d6c4-eb29-4d69-8bc2-36d96e916adf",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -10,6 +10,7 @@
"system_name": "VDM.Interfaces.Tableinterface", "system_name": "VDM.Interfaces.Tableinterface",
"type": "interface", "type": "interface",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Tableinterface", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Tableinterface",
"description": "The VDM Core Table Interface", "description": "The VDM Core 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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -0,0 +1,54 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# class Model (Details)
> namespace: **VDM\Joomla\Service**
> extends: ****
```uml
@startuml
class Model #Gold {
+ register(Container $container) : void
+ getLoad(Container $container) : Load
+ getUpsert(Container $container) : Upsert
}
note right of Model::register
Registers the service provider with a DI container.
since: 3.2.0
return: void
end note
note right of Model::getLoad
Get The Load Class.
since: 3.2.0
return: Load
end note
note right of Model::getUpsert
Get The Upsert Class.
since: 3.2.0
return: Upsert
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,75 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/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\Service;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use VDM\Joomla\Model\Load;
use VDM\Joomla\Model\Upsert;
/**
* Model Service Provider
*
* @since 3.2.0
*/
class Model implements ServiceProviderInterface
{
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
* @since 3.2.0
*/
public function register(Container $container)
{
$container->alias(Load::class, 'Model.Load')
->share('Model.Load', [$this, 'getLoad'], true);
$container->alias(Upsert::class, 'Model.Upsert')
->share('Model.Upsert', [$this, 'getUpsert'], true);
}
/**
* Get The Load Class.
*
* @param Container $container The DI container.
*
* @return Load
* @since 3.2.0
*/
public function getLoad(Container $container): Load
{
return new Load(
$container->get('Table')
);
}
/**
* Get The Upsert Class.
*
* @param Container $container The DI container.
*
* @return Upsert
* @since 3.2.0
*/
public function getUpsert(Container $container): Upsert
{
return new Upsert(
$container->get('Table')
);
}
}

View File

@ -0,0 +1,46 @@
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
* @since 3.2.0
*/
public function register(Container $container)
{
$container->alias(Load::class, 'Model.Load')
->share('Model.Load', [$this, 'getLoad'], true);
$container->alias(Upsert::class, 'Model.Upsert')
->share('Model.Upsert', [$this, 'getUpsert'], true);
}
/**
* Get The Load Class.
*
* @param Container $container The DI container.
*
* @return Load
* @since 3.2.0
*/
public function getLoad(Container $container): Load
{
return new Load(
$container->get('Table')
);
}
/**
* Get The Upsert Class.
*
* @param Container $container The DI container.
*
* @return Upsert
* @since 3.2.0
*/
public function getUpsert(Container $container): Upsert
{
return new Upsert(
$container->get('Table')
);
}

View File

@ -0,0 +1,31 @@
{
"add_head": "1",
"add_licensing_template": "2",
"extends": "",
"guid": "2dcedd6c-c95b-4a37-9cac-95d28faedca3",
"implements": [
"-1"
],
"load_selection": null,
"name": "Model",
"power_version": "1.0.0",
"system_name": "VDM.Service.Model",
"type": "class",
"use_selection": {
"use_selection0": {
"use": "bb29a833-73f7-4283-9327-bc7e41f0723b",
"as": "default"
},
"use_selection1": {
"use": "7c1fb50f-8fb1-4627-8705-6fedf7182ca5",
"as": "default"
}
},
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Service.Model",
"description": "Model Service Provider\r\n\r\n@since 3.2.0",
"implements_custom": "ServiceProviderInterface",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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;\r\nuse Joomla\\DI\\ServiceProviderInterface;",
"composer": ""
}

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class ClassfunctionHelper (Details) # abstract class ClassfunctionHelper (Details)
> namespace: **VastDevelopmentMethod\Joomla\Utilities\String** > namespace: **VDM\Joomla\Utilities\String**
> extends: ****
```uml ```uml
@startuml @startuml
abstract ClassfunctionHelper #Orange { abstract ClassfunctionHelper #Orange {

View File

@ -9,10 +9,10 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Utilities\String; namespace VDM\Joomla\Utilities\String;
use VastDevelopmentMethod\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\StringHelper;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "30c5b4c2-f75f-4d15-869a-f8bfedd87358", "guid": "30c5b4c2-f75f-4d15-869a-f8bfedd87358",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -15,6 +15,7 @@
"as": "default" "as": "default"
} }
}, },
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.ClassfunctionHelper", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.ClassfunctionHelper",
"description": "Control the naming of a class and function\r\n\r\n@since 3.0.9", "description": "Control the naming of a class and function\r\n\r\n@since 3.0.9",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -0,0 +1,68 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# interface SubformInterface (Details)
> namespace: **VDM\Joomla\Interfaces\Data**
> extends: ****
```uml
@startuml
interface SubformInterface #Lavender {
+ table(string $table) : self
+ get(string $value, string $key, ...) : ?array
+ set(array $items, string $key) : bool
+ getTable() : string
}
note right of SubformInterface::table
Set the current active table
since: 3.2.2
return: self
end note
note right of SubformInterface::get
Get a subform items
since: 3.2.2
return: ?array
arguments:
string $value
string $key
string $field
array $set
end note
note right of SubformInterface::set
Set a subform items
since: 3.2.2
return: bool
end note
note right of SubformInterface::getTable
Get the current active table
since: 3.2.2
return: string
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,64 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/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\Interfaces\Data;
/**
* Data Subform Interface
*
* @since 3.2.2
*/
interface SubformInterface
{
/**
* Set the current active table
*
* @param string $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(string $table): self;
/**
* Get a subform items
*
* @param string $value The ids/values of the parent
* @param string $key The parent key on which the items are linked
* @param string $field The parent field name of the subform
* @param array $set The array SET of the keys of each row in the subform
*
* @return array|null The subform
* @since 3.2.2
*/
public function get(string $value, string $key, string $field, array $set): ?array;
/**
* Set a subform items
*
* @param array $items The list of items to set
* @param string $key The child key on which the items should be linked
*
* @return bool
* @since 3.2.2
*/
public function set(array $items, string $key): bool;
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string;
}

View File

@ -0,0 +1,41 @@
/**
* Set the current active table
*
* @param string $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(string $table): self;
/**
* Get a subform items
*
* @param string $value The ids/values of the parent
* @param string $key The parent key on which the items are linked
* @param string $field The parent field name of the subform
* @param array $set The array SET of the keys of each row in the subform
*
* @return array|null The subform
* @since 3.2.2
*/
public function get(string $value, string $key, string $field, array $set): ?array;
/**
* Set a subform items
*
* @param array $items The list of items to set
* @param string $key The child key on which the items should be linked
*
* @return bool
* @since 3.2.2
*/
public function set(array $items, string $key): bool;
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string;

View File

@ -0,0 +1,19 @@
{
"add_head": "0",
"add_licensing_template": "2",
"extends": "",
"guid": "34959721-415b-4b5e-8002-3d1fc84b3b2b",
"implements": null,
"load_selection": null,
"name": "SubformInterface",
"power_version": "1.0.0",
"system_name": "VDM.Interfaces.Data.SubformInterface",
"type": "interface",
"use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Data.SubformInterface",
"description": "Data Subform Interface\r\n\r\n@since 3.2.2",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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": ""
}

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class PluginHelper (Details) # abstract class PluginHelper (Details)
> namespace: **VastDevelopmentMethod\Joomla\Utilities\String** > namespace: **VDM\Joomla\Utilities\String**
> extends: ****
```uml ```uml
@startuml @startuml
abstract PluginHelper #Orange { abstract PluginHelper #Orange {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Utilities\String; namespace VDM\Joomla\Utilities\String;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "3cf76fbf-fd95-4a33-878e-7aff6d36b7f6", "guid": "3cf76fbf-fd95-4a33-878e-7aff6d36b7f6",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -10,6 +10,7 @@
"system_name": "String Plugin Helper", "system_name": "String Plugin Helper",
"type": "abstract class", "type": "abstract class",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.PluginHelper", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.PluginHelper",
"description": "Control the naming of a plugin\r\n\r\n@since 3.0.9", "description": "Control the naming of a plugin\r\n\r\n@since 3.0.9",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -0,0 +1,71 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# class Delete (Details)
> namespace: **VDM\Joomla\Data\Action**
> extends: ****
```uml
@startuml
class Delete #Gold {
# Database $database
# string $table
+ __construct(Database $database, ?string $table = null)
+ table(?string $table) : self
+ items(array $conditions) : bool
+ truncate() : void
+ getTable() : string
}
note right of Delete::__construct
Constructor.
since: 3.2.2
end note
note right of Delete::table
Set the current active table
since: 3.2.2
return: self
end note
note right of Delete::items
Delete all items in the database that match these conditions
since: 3.2.2
return: bool
end note
note right of Delete::truncate
Truncate a table
since: 3.2.2
return: void
end note
note right of Delete::getTable
Get the current active table
since: 3.2.2
return: string
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,112 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/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\Data\Action;
use VDM\Joomla\Interfaces\DeleteInterface as Database;
use VDM\Joomla\Interfaces\Data\DeleteInterface;
/**
* Data Delete
*
* @since 3.2.2
*/
class Delete implements DeleteInterface
{
/**
* The Delete Class.
*
* @var Database
* @since 3.2.2
*/
protected Database $database;
/**
* Table Name
*
* @var string
* @since 3.2.2
*/
protected string $table;
/**
* Constructor.
*
* @param Database $database The Delete Class.
* @param string|null $table The table name.
*
* @since 3.2.2
*/
public function __construct(Database $database, ?string $table = null)
{
$this->database = $database;
if ($table !== null)
{
$this->table = $table;
}
}
/**
* Set the current active table
*
* @param string|null $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(?string $table): self
{
if ($table !== null)
{
$this->table = $table;
}
return $this;
}
/**
* Delete all items in the database that match these conditions
*
* @param array $conditions Conditions by which to delete the data in database [array of arrays (key => value)]
*
* @return bool
* @since 3.2.2
**/
public function items(array $conditions): bool
{
return $this->database->items($conditions, $this->getTable());
}
/**
* Truncate a table
*
* @return void
* @since 3.2.2
**/
public function truncate(): void
{
$this->database->truncate($this->getTable());
}
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string
{
return $this->table;
}
}

View File

@ -0,0 +1,85 @@
/**
* The Delete Class.
*
* @var Database
* @since 3.2.2
*/
protected Database $database;
/**
* Table Name
*
* @var string
* @since 3.2.2
*/
protected string $table;
/**
* Constructor.
*
* @param Database $database The Delete Class.
* @param string|null $table The table name.
*
* @since 3.2.2
*/
public function __construct(Database $database, ?string $table = null)
{
$this->database = $database;
if ($table !== null)
{
$this->table = $table;
}
}
/**
* Set the current active table
*
* @param string|null $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(?string $table): self
{
if ($table !== null)
{
$this->table = $table;
}
return $this;
}
/**
* Delete all items in the database that match these conditions
*
* @param array $conditions Conditions by which to delete the data in database [array of arrays (key => value)]
*
* @return bool
* @since 3.2.2
**/
public function items(array $conditions): bool
{
return $this->database->items($conditions, $this->getTable());
}
/**
* Truncate a table
*
* @return void
* @since 3.2.2
**/
public function truncate(): void
{
$this->database->truncate($this->getTable());
}
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string
{
return $this->table;
}

View File

@ -0,0 +1,26 @@
{
"add_head": "0",
"add_licensing_template": "2",
"extends": "",
"guid": "3fc72954-a303-4cac-b53c-554be38b85e7",
"implements": [
"d8f9ba53-c490-4e8b-8e9f-6757224e069c"
],
"load_selection": null,
"name": "Delete",
"power_version": "1.0.0",
"system_name": "VDM.Data.Action.Delete",
"type": "class",
"use_selection": {
"use_selection0": {
"use": "9c3aa650-e536-4eea-a2d4-73cc3e184aa9",
"as": "Database"
}
},
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Data.Action.Delete",
"description": "Data Delete\r\n\r\n@since 3.2.2",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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": ""
}

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class ActiveRegistry (Details) # abstract class ActiveRegistry (Details)
> namespace: **VastDevelopmentMethod\Joomla\Abstraction** > namespace: **VDM\Joomla\Abstraction**
> extends: ****
```uml ```uml
@startuml @startuml
abstract ActiveRegistry #Orange { abstract ActiveRegistry #Orange {

View File

@ -9,10 +9,10 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Abstraction; namespace VDM\Joomla\Abstraction;
use VastDevelopmentMethod\Joomla\Interfaces\Activeregistryinterface; use VDM\Joomla\Interfaces\Activeregistryinterface;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "43134867-5cb8-4280-9be8-309fd2fd135f", "guid": "43134867-5cb8-4280-9be8-309fd2fd135f",
"implements": [ "implements": [
"af0eedbe-603b-4671-8e5a-28165d88254b" "af0eedbe-603b-4671-8e5a-28165d88254b"
@ -12,6 +12,7 @@
"system_name": "VDM.Abstraction.ActiveRegistry", "system_name": "VDM.Abstraction.ActiveRegistry",
"type": "abstract class", "type": "abstract class",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.ActiveRegistry", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.ActiveRegistry",
"description": "Active Storage Registry.\r\n\r\nDon't use this beyond 10 dimensional depth for best performance.\r\n\r\n@since 3.2.0", "description": "Active Storage Registry.\r\n\r\nDon't use this beyond 10 dimensional depth for best performance.\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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# class Database (Details) # class Database (Details)
> namespace: **VastDevelopmentMethod\Joomla\Componentbuilder\Service** > namespace: **VDM\Joomla\Service**
> extends: ****
```uml ```uml
@startuml @startuml
class Database #Gold { class Database #Gold {
@ -15,6 +16,7 @@ class Database #Gold {
+ getLoad(Container $container) : Load + getLoad(Container $container) : Load
+ getInsert(Container $container) : Insert + getInsert(Container $container) : Insert
+ getUpdate(Container $container) : Update + getUpdate(Container $container) : Update
+ getDelete(Container $container) : Delete
} }
note right of Database::register note right of Database::register
@ -44,6 +46,13 @@ note right of Database::getUpdate
since: 3.2.0 since: 3.2.0
return: Update return: Update
end note end note
note right of Database::getDelete
Get the Core Delete Database
since: 3.2.2
return: Delete
end note
@enduml @enduml
``` ```

View File

@ -9,14 +9,15 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Componentbuilder\Service; namespace VDM\Joomla\Service;
use Joomla\DI\Container; use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface; use Joomla\DI\ServiceProviderInterface;
use VastDevelopmentMethod\Joomla\Database\Load; use VDM\Joomla\Database\Load;
use VastDevelopmentMethod\Joomla\Database\Insert; use VDM\Joomla\Database\Insert;
use VastDevelopmentMethod\Joomla\Database\Update; use VDM\Joomla\Database\Update;
use VDM\Joomla\Database\Delete;
/** /**
@ -44,6 +45,9 @@ class Database implements ServiceProviderInterface
$container->alias(Update::class, 'Update') $container->alias(Update::class, 'Update')
->share('Update', [$this, 'getUpdate'], true); ->share('Update', [$this, 'getUpdate'], true);
$container->alias(Delete::class, 'Delete')
->share('Delete', [$this, 'getDelete'], true);
} }
/** /**
@ -83,6 +87,19 @@ class Database implements ServiceProviderInterface
public function getUpdate(Container $container): Update public function getUpdate(Container $container): Update
{ {
return new Update(); return new Update();
}
/**
* Get the Core Delete Database
*
* @param Container $container The DI container.
*
* @return Delete
* @since 3.2.2
*/
public function getDelete(Container $container): Delete
{
return new Delete();
} }
} }

View File

@ -16,6 +16,9 @@
$container->alias(Update::class, 'Update') $container->alias(Update::class, 'Update')
->share('Update', [$this, 'getUpdate'], true); ->share('Update', [$this, 'getUpdate'], true);
$container->alias(Delete::class, 'Delete')
->share('Delete', [$this, 'getDelete'], true);
} }
/** /**
@ -55,4 +58,17 @@
public function getUpdate(Container $container): Update public function getUpdate(Container $container): Update
{ {
return new Update(); return new Update();
}
/**
* Get the Core Delete Database
*
* @param Container $container The DI container.
*
* @return Delete
* @since 3.2.2
*/
public function getDelete(Container $container): Delete
{
return new Delete();
} }

View File

@ -1,7 +1,7 @@
{ {
"add_head": "1", "add_head": "1",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "4815e1c7-a433-443d-a112-d1e03d7df84b", "guid": "4815e1c7-a433-443d-a112-d1e03d7df84b",
"implements": [ "implements": [
"-1" "-1"
@ -23,9 +23,14 @@
"use_selection2": { "use_selection2": {
"use": "cce56585-58b0-4f72-a92c-e2635ea52d83", "use": "cce56585-58b0-4f72-a92c-e2635ea52d83",
"as": "default" "as": "default"
},
"use_selection3": {
"use": "92291f1f-f248-4ec0-9f2a-3d47c49eeac1",
"as": "default"
} }
}, },
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Componentbuilder.Service.Database", "extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Service.Database",
"description": "Database Service Provider\r\n\r\n@since 3.2.0", "description": "Database Service Provider\r\n\r\n@since 3.2.0",
"implements_custom": "ServiceProviderInterface", "implements_custom": "ServiceProviderInterface",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class ComponentCodeNameHelper (Details) # abstract class ComponentCodeNameHelper (Details)
> namespace: **VastDevelopmentMethod\Joomla\Utilities\String** > namespace: **VDM\Joomla\Utilities\String**
> extends: ****
```uml ```uml
@startuml @startuml
abstract ComponentCodeNameHelper #Orange { abstract ComponentCodeNameHelper #Orange {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Utilities\String; namespace VDM\Joomla\Utilities\String;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "491dbe41-f26c-4de9-8a95-fcf87b35b56f", "guid": "491dbe41-f26c-4de9-8a95-fcf87b35b56f",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -10,6 +10,7 @@
"system_name": "String ComponentCodeName Helper", "system_name": "String ComponentCodeName Helper",
"type": "abstract class", "type": "abstract class",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.ComponentCodeNameHelper", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.ComponentCodeNameHelper",
"description": "Control the naming of a component code name\r\n\r\n@since 3.2.1", "description": "Control the naming of a component code name\r\n\r\n@since 3.2.1",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class JsonHelper (Details) # abstract class JsonHelper (Details)
> namespace: **VastDevelopmentMethod\Joomla\Utilities** > namespace: **VDM\Joomla\Utilities**
> extends: ****
```uml ```uml
@startuml @startuml
abstract JsonHelper #Orange { abstract JsonHelper #Orange {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Utilities; namespace VDM\Joomla\Utilities;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "4b225c51-d293-48e4-b3f6-5136cf5c3f18", "guid": "4b225c51-d293-48e4-b3f6-5136cf5c3f18",
"implements": null, "implements": null,
"load_selection": { "load_selection": {
@ -20,6 +20,7 @@
"system_name": "Utilities Json Helper", "system_name": "Utilities Json Helper",
"type": "abstract class", "type": "abstract class",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.JsonHelper", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.JsonHelper",
"description": "The json checker\r\n\r\n@since 3.0.9", "description": "The json checker\r\n\r\n@since 3.0.9",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# interface SchemaInterface (Details) # interface SchemaInterface (Details)
> namespace: **VastDevelopmentMethod\Joomla\Interfaces** > namespace: **VDM\Joomla\Interfaces**
> extends: ****
```uml ```uml
@startuml @startuml
interface SchemaInterface #Lavender { interface SchemaInterface #Lavender {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Interfaces; namespace VDM\Joomla\Interfaces;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "4dd11b9b-3c64-460b-aaa6-62ba467db7aa", "guid": "4dd11b9b-3c64-460b-aaa6-62ba467db7aa",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -10,6 +10,7 @@
"system_name": "VDM.SchemaInterface", "system_name": "VDM.SchemaInterface",
"type": "interface", "type": "interface",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.SchemaInterface", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.SchemaInterface",
"description": "Schema Checking Interface\r\n\r\n@since 3.2.1", "description": "Schema Checking Interface\r\n\r\n@since 3.2.1",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -0,0 +1,70 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# interface RemoteInterface (Details)
> namespace: **VDM\Joomla\Interfaces\Data**
> extends: ****
```uml
@startuml
interface RemoteInterface #Lavender {
+ table(string $table) : self
+ init() : bool
+ reset(array $items) : bool
+ load(string $guid, array $order = ['remote', 'local']) : bool
+ getTable() : string
}
note right of RemoteInterface::table
Set the current active table
since: 3.2.2
return: self
end note
note right of RemoteInterface::init
Init all items not found in database
since: 3.2.0
return: bool
end note
note right of RemoteInterface::reset
Reset the items
since: 3.2.0
return: bool
end note
note right of RemoteInterface::load
Load a item
since: 3.2.2
return: bool
end note
note right of RemoteInterface::getTable
Get the current active table
since: 3.2.2
return: string
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,69 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/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\Interfaces\Data;
/**
* Load data based on global unique ids from remote system
*
* @since 3.2.2
*/
interface RemoteInterface
{
/**
* Set the current active table
*
* @param string $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(string $table): self;
/**
* Init all items not found in database
*
* @return bool
* @since 3.2.0
*/
public function init(): bool;
/**
* Reset the items
*
* @param array $items The global unique ids of the items
*
* @return bool
* @since 3.2.0
*/
public function reset(array $items): bool;
/**
* Load a item
*
* @param string $guid The global unique id of the item
* @param array $order The search order
*
* @return bool
* @since 3.2.2
*/
public function load(string $guid, array $order = ['remote', 'local']): bool;
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string;
}

View File

@ -0,0 +1,46 @@
/**
* Set the current active table
*
* @param string $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(string $table): self;
/**
* Init all items not found in database
*
* @return bool
* @since 3.2.0
*/
public function init(): bool;
/**
* Reset the items
*
* @param array $items The global unique ids of the items
*
* @return bool
* @since 3.2.0
*/
public function reset(array $items): bool;
/**
* Load a item
*
* @param string $guid The global unique id of the item
* @param array $order The search order
*
* @return bool
* @since 3.2.2
*/
public function load(string $guid, array $order = ['remote', 'local']): bool;
/**
* Get the current active table
*
* @return string
* @since 3.2.2
*/
public function getTable(): string;

View File

@ -0,0 +1,19 @@
{
"add_head": "0",
"add_licensing_template": "2",
"extends": "",
"guid": "51de80f2-2868-4c2c-8198-ef79349e9bd7",
"implements": null,
"load_selection": null,
"name": "RemoteInterface",
"power_version": "1.0.0",
"system_name": "JCB.Interfaces.Remote",
"type": "interface",
"use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Data.RemoteInterface",
"description": "Load data based on global unique ids from remote system\r\n\r\n@since 3.2.2",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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": ""
}

View File

@ -7,7 +7,7 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# final class Insert (Details) # final class Insert (Details)
> namespace: **VastDevelopmentMethod\Joomla\Database** > namespace: **VDM\Joomla\Database**
> extends: **Database** > extends: **Database**
```uml ```uml
@startuml @startuml

View File

@ -9,13 +9,13 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Database; namespace VDM\Joomla\Database;
use Joomla\CMS\Date\Date; use Joomla\CMS\Date\Date;
use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\ArrayHelper;
use VastDevelopmentMethod\Joomla\Interfaces\InsertInterface; use VDM\Joomla\Interfaces\InsertInterface;
use VastDevelopmentMethod\Joomla\Abstraction\Database; use VDM\Joomla\Abstraction\Database;
/** /**

View File

@ -17,6 +17,7 @@
"as": "default" "as": "default"
} }
}, },
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Database.Insert", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Database.Insert",
"description": "Database Insert Class\r\n\r\n@since 3.2.0", "description": "Database Insert Class\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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# trait VarExport (Details) # trait VarExport (Details)
> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** > namespace: **VDM\Joomla\Abstraction\Registry\Traits**
> extends: ****
```uml ```uml
@startuml @startuml
class VarExport << (T,Orange) >> #Turquoise { class VarExport << (T,Orange) >> #Turquoise {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits; namespace VDM\Joomla\Abstraction\Registry\Traits;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "52a1d14f-304a-431c-8fa4-411179942db5", "guid": "52a1d14f-304a-431c-8fa4-411179942db5",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -15,6 +15,7 @@
"as": "default" "as": "default"
} }
}, },
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.VarExport", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.VarExport",
"description": "Var Export Values\r\n\r\n@since 3.2.0", "description": "Var Export Values\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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,32 +7,51 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# abstract class Model (Details) # abstract class Model (Details)
> namespace: **VastDevelopmentMethod\Joomla\Abstraction** > namespace: **VDM\Joomla\Abstraction**
> extends: ****
```uml ```uml
@startuml @startuml
abstract Model #Orange { abstract Model #Orange {
# array $last # array $last
# Table $table # Table $table
+ __construct(Table $table) # string $tableName
# bool $allowEmpty
+ __construct(Table $table, ?string $tableName = null, ...)
+ table(string $table) : self
+ {abstract} value(mixed $value, string $field, ...) : mixed + {abstract} value(mixed $value, string $field, ...) : mixed
+ item(?object $item, ?string $table = null) : ?object + item(?object $item, ?string $table = null) : ?object
+ items(?array $items = null, ?string $table = null) : ?array + items(?array $items = null, ?string $table = null) : ?array
+ row(?array $item, ?string $table = null) : ?array + row(?array $item, ?string $table = null) : ?array
+ rows(?array $items = null, ?string $table = null) : ?array + rows(?array $items = null, ?string $table = null) : ?array
+ last(?string $table = null) : ?int + last(?string $table = null) : ?int
+ setTable(string $tableName) : void
+ setAllowEmpty(bool $allowEmpty) : void
# getTable() : string
# getAllowEmpty() : bool
# getTableFields(string $table, bool $default = false) : ?array # getTableFields(string $table, bool $default = false) : ?array
# {abstract} validateBefore(mixed $value, ?string $field = null, ...) : bool # {abstract} validateBefore(mixed $value, ?string $field = null, ...) : bool
# {abstract} validateAfter(mixed $value, ?string $field = null, ...) : bool # {abstract} validateAfter(mixed $value, ?string $field = null, ...) : bool
# {abstract} getTable() : string
} }
note right of Model::__construct note right of Model::__construct
Constructor Constructor
since: 3.2.0 since: 3.2.0
arguments:
Table $table
?string $tableName = null
bool $allowEmpty = null
end note end note
note left of Model::value note left of Model::table
Set the current active table
since: 3.2.2
return: self
end note
note right of Model::value
Model the value Model the value
Example: $this->value(value, 'value_key', 'table_name'); Example: $this->value(value, 'value_key', 'table_name');
@ -45,7 +64,7 @@ Example: $this->value(value, 'value_key', 'table_name');
?string $table = null ?string $table = null
end note end note
note right of Model::item note left of Model::item
Model the values of an item Model the values of an item
Example: $this->item(Object, 'table_name'); Example: $this->item(Object, 'table_name');
@ -53,7 +72,7 @@ Example: $this->item(Object, 'table_name');
return: ?object return: ?object
end note end note
note left of Model::items note right of Model::items
Model the values of multiple items Model the values of multiple items
Example: $this->items(Array, 'table_name'); Example: $this->items(Array, 'table_name');
@ -61,7 +80,7 @@ Example: $this->items(Array, 'table_name');
return: ?array return: ?array
end note end note
note right of Model::row note left of Model::row
Model the values of an row Model the values of an row
Example: $this->item(Array, 'table_name'); Example: $this->item(Array, 'table_name');
@ -69,7 +88,7 @@ Example: $this->item(Array, 'table_name');
return: ?array return: ?array
end note end note
note left of Model::rows note right of Model::rows
Model the values of multiple rows Model the values of multiple rows
Example: $this->items(Array, 'table_name'); Example: $this->items(Array, 'table_name');
@ -77,7 +96,7 @@ Example: $this->items(Array, 'table_name');
return: ?array return: ?array
end note end note
note right of Model::last note left of Model::last
Get last modeled ID Get last modeled ID
Example: $this->last('table_name'); Example: $this->last('table_name');
@ -85,14 +104,42 @@ Example: $this->last('table_name');
return: ?int return: ?int
end note end note
note left of Model::getTableFields note right of Model::setTable
Set the current active table
since: 3.2.2
return: void
end note
note left of Model::setAllowEmpty
Set the switch to control the behaviour of empty values
since: 3.2.2
return: void
end note
note right of Model::getTable
Get the current active table
since: 3.2.0
return: string
end note
note left of Model::getAllowEmpty
Get the switch to control the behaviour of empty values
since: 3.2.2
return: bool
end note
note right of Model::getTableFields
Get the current active table's fields (including defaults) Get the current active table's fields (including defaults)
since: 3.2.0 since: 3.2.0
return: ?array return: ?array
end note end note
note right of Model::validateBefore note left of Model::validateBefore
Validate before the value is modelled (basic, override in child class) Validate before the value is modelled (basic, override in child class)
since: 3.2.0 since: 3.2.0
@ -104,7 +151,7 @@ note right of Model::validateBefore
?string $table = null ?string $table = null
end note end note
note left of Model::validateAfter note right of Model::validateAfter
Validate after the value is modelled (basic, override in child class) Validate after the value is modelled (basic, override in child class)
since: 3.2.0 since: 3.2.0
@ -115,13 +162,6 @@ note left of Model::validateAfter
?string $field = null ?string $field = null
?string $table = null ?string $table = null
end note end note
note right of Model::getTable
Get the current active table
since: 3.2.0
return: string
end note
@enduml @enduml
``` ```

View File

@ -9,12 +9,13 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Abstraction; namespace VDM\Joomla\Abstraction;
use VastDevelopmentMethod\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\StringHelper;
use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\ArrayHelper;
use VastDevelopmentMethod\Joomla\Interfaces\Tableinterface as Table; use VDM\Joomla\Interfaces\Tableinterface as Table;
use VDM\Joomla\Interfaces\ModelInterface;
/** /**
@ -22,7 +23,7 @@ use VastDevelopmentMethod\Joomla\Interfaces\Tableinterface as Table;
* *
* @since 3.2.0 * @since 3.2.0
*/ */
abstract class Model abstract class Model implements ModelInterface
{ {
/** /**
* Last ID * Last ID
@ -40,16 +41,57 @@ abstract class Model
*/ */
protected Table $table; protected Table $table;
/**
* Table Name
*
* @var string
* @since 3.2.0
*/
protected string $tableName;
/**
* The switch to control the behaviour of empty values
*
* @var bool
* @since 3.2.2
*/
protected bool $allowEmpty = true;
/** /**
* Constructor * Constructor
* *
* @param Table $table The search table object. * @param Table $table The search table object.
* @param string|null $tableName The table
* @param bool|null $allowEmpty The switch to control the behaviour of empty values (default true)
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(Table $table) public function __construct(Table $table, ?string $tableName = null, bool $allowEmpty = null)
{ {
$this->table = $table; $this->table = $table;
if ($tableName !== null)
{
$this->setTable($tableName);
}
if ($allowEmpty !== null)
{
$this->setAllowEmpty($allowEmpty);
}
}
/**
* Set the current active table
*
* @param string $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(string $table): self
{
$this->setTable($table);
return $this;
} }
/** /**
@ -309,6 +351,54 @@ abstract class Model
return null; return null;
} }
/**
* Set the current active table
*
* @param string $tableName The table name
*
* @return void
* @since 3.2.2
*/
public function setTable(string $tableName): void
{
$this->tableName = $tableName;
}
/**
* Set the switch to control the behaviour of empty values
*
* @param bool $allowEmpty The switch
*
* @return void
* @since 3.2.2
*/
public function setAllowEmpty(bool $allowEmpty): void
{
$this->allowEmpty = $allowEmpty;
}
/**
* Get the current active table
*
* @return string
* @since 3.2.0
*/
protected function getTable(): string
{
return $this->tableName;
}
/**
* Get the switch to control the behaviour of empty values
*
* @return bool
* @since 3.2.2
*/
protected function getAllowEmpty(): bool
{
return $this->allowEmpty;
}
/** /**
* Get the current active table's fields (including defaults) * Get the current active table's fields (including defaults)
* *
@ -345,14 +435,6 @@ abstract class Model
* @return bool * @return bool
* @since 3.2.0 * @since 3.2.0
*/ */
abstract protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool; abstract protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool;
/**
* Get the current active table
*
* @return string
* @since 3.2.0
*/
abstract protected function getTable(): string;
} }

View File

@ -14,16 +14,57 @@
*/ */
protected Table $table; protected Table $table;
/**
* Table Name
*
* @var string
* @since 3.2.0
*/
protected string $tableName;
/**
* The switch to control the behaviour of empty values
*
* @var bool
* @since 3.2.2
*/
protected bool $allowEmpty = true;
/** /**
* Constructor * Constructor
* *
* @param Table $table The search table object. * @param Table $table The search table object.
* @param string|null $tableName The table
* @param bool|null $allowEmpty The switch to control the behaviour of empty values (default true)
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(Table $table) public function __construct(Table $table, ?string $tableName = null, bool $allowEmpty = null)
{ {
$this->table = $table; $this->table = $table;
if ($tableName !== null)
{
$this->setTable($tableName);
}
if ($allowEmpty !== null)
{
$this->setAllowEmpty($allowEmpty);
}
}
/**
* Set the current active table
*
* @param string $table The table that should be active
*
* @return self
* @since 3.2.2
*/
public function table(string $table): self
{
$this->setTable($table);
return $this;
} }
/** /**
@ -283,6 +324,54 @@
return null; return null;
} }
/**
* Set the current active table
*
* @param string $tableName The table name
*
* @return void
* @since 3.2.2
*/
public function setTable(string $tableName): void
{
$this->tableName = $tableName;
}
/**
* Set the switch to control the behaviour of empty values
*
* @param bool $allowEmpty The switch
*
* @return void
* @since 3.2.2
*/
public function setAllowEmpty(bool $allowEmpty): void
{
$this->allowEmpty = $allowEmpty;
}
/**
* Get the current active table
*
* @return string
* @since 3.2.0
*/
protected function getTable(): string
{
return $this->tableName;
}
/**
* Get the switch to control the behaviour of empty values
*
* @return bool
* @since 3.2.2
*/
protected function getAllowEmpty(): bool
{
return $this->allowEmpty;
}
/** /**
* Get the current active table's fields (including defaults) * Get the current active table's fields (including defaults)
* *
@ -319,12 +408,4 @@
* @return bool * @return bool
* @since 3.2.0 * @since 3.2.0
*/ */
abstract protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool; abstract protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool;
/**
* Get the current active table
*
* @return string
* @since 3.2.0
*/
abstract protected function getTable(): string;

View File

@ -1,9 +1,11 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "584747d1-3a86-453d-b7a3-a2219de8d777", "guid": "584747d1-3a86-453d-b7a3-a2219de8d777",
"implements": null, "implements": [
"8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff"
],
"load_selection": null, "load_selection": null,
"name": "Model", "name": "Model",
"power_version": "1.0.0", "power_version": "1.0.0",
@ -23,6 +25,7 @@
"as": "Table" "as": "Table"
} }
}, },
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Model", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Model",
"description": "Base Model\r\n\r\n@since 3.2.0", "description": "Base Model\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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

View File

@ -7,7 +7,8 @@
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# trait GetString (Details) # trait GetString (Details)
> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** > namespace: **VDM\Joomla\Abstraction\Registry\Traits**
> extends: ****
```uml ```uml
@startuml @startuml
class GetString << (T,Orange) >> #Turquoise { class GetString << (T,Orange) >> #Turquoise {

View File

@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt * @license GNU General Public License version 2 or later; see LICENSE.txt
*/ */
namespace VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits; namespace VDM\Joomla\Abstraction\Registry\Traits;
/** /**

View File

@ -1,7 +1,7 @@
{ {
"add_head": "0", "add_head": "0",
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "",
"guid": "59b1a2ea-d77e-4040-ac8c-e65cd8743e9b", "guid": "59b1a2ea-d77e-4040-ac8c-e65cd8743e9b",
"implements": null, "implements": null,
"load_selection": null, "load_selection": null,
@ -10,6 +10,7 @@
"system_name": "VDM.Abstraction.Registry.Traits.GetString", "system_name": "VDM.Abstraction.Registry.Traits.GetString",
"type": "trait", "type": "trait",
"use_selection": null, "use_selection": null,
"extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.GetString", "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.GetString",
"description": "Get String Values\r\n\r\n@since 3.2.0", "description": "Get String Values\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 <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/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",

Some files were not shown because too many files have changed in this diff Show More