From f2eb3a484abed8649ab19e50eb9f46a1908ca026 Mon Sep 17 00:00:00 2001 From: aB0t Date: Fri, 21 Jun 2024 14:01:19 +0200 Subject: [PATCH] Update 2024-06-21 14:01:13 --- README.md | 58 +- .../README.md | 112 + .../code.php | 197 ++ .../code.power | 169 ++ .../settings.json | 30 + .../README.md | 97 + .../code.php | 98 + .../code.power | 75 + .../settings.json | 19 + .../README.md | 88 + .../code.php | 86 + .../code.power | 63 + .../settings.json | 19 + .../README.md | 12 +- .../code.php | 54 +- .../code.power | 45 +- .../settings.json | 1 + .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 11 +- .../code.php | 37 +- .../code.power | 26 +- .../settings.json | 13 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 152 ++ .../code.php | 351 +++ .../code.power | 320 +++ .../settings.json | 42 + .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 54 + .../code.php | 75 + .../code.power | 46 + .../settings.json | 31 + .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 68 + .../code.php | 64 + .../code.power | 41 + .../settings.json | 19 + .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 71 + .../code.php | 112 + .../code.power | 85 + .../settings.json | 26 + .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 11 +- .../code.php | 25 +- .../code.power | 16 + .../settings.json | 9 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 70 + .../code.php | 69 + .../code.power | 46 + .../settings.json | 19 + .../README.md | 2 +- .../code.php | 8 +- .../settings.json | 1 + .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 78 +- .../code.php | 114 +- .../code.power | 103 +- .../settings.json | 7 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 7 +- .../settings.json | 5 +- .../README.md | 97 + .../code.php | 102 + .../code.power | 79 + .../settings.json | 19 + .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 83 + .../code.php | 85 + .../code.power | 62 + .../settings.json | 19 + .../README.md | 90 + .../code.php | 169 ++ .../code.power | 141 ++ .../settings.json | 30 + .../README.md | 70 + .../code.php | 118 + .../code.power | 88 + .../settings.json | 34 + .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 2 +- .../code.php | 9 +- .../settings.json | 2 +- .../README.md | 112 + .../code.php | 265 +++ .../code.power | 238 ++ .../settings.json | 26 + .../README.md | 37 +- .../code.php | 42 +- .../code.power | 40 +- .../settings.json | 3 +- .../README.md | 112 + .../code.php | 206 ++ .../code.power | 178 ++ .../settings.json | 30 + .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 133 ++ .../code.php | 254 +++ .../code.power | 223 ++ .../settings.json | 42 + .../README.md | 46 + .../code.php | 132 ++ .../code.power | 104 + .../settings.json | 26 + .../README.md | 46 + .../code.php | 43 + .../code.power | 20 + .../settings.json | 19 + .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 6 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 112 + .../code.php | 202 ++ .../code.power | 174 ++ .../settings.json | 30 + .../README.md | 94 + .../code.php | 181 ++ .../code.power | 147 ++ .../settings.json | 51 + .../README.md | 3 +- .../code.php | 6 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 2 +- .../code.php | 8 +- .../settings.json | 1 + .../README.md | 2 +- .../code.php | 2 +- .../settings.json | 1 + .../README.md | 70 + .../code.php | 118 + .../code.power | 88 + .../settings.json | 34 + .../README.md | 2 +- .../code.php | 1918 +++++++++-------- .../settings.json | 1 + .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 89 + .../code.php | 90 + .../code.power | 67 + .../settings.json | 19 + .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 2 +- .../code.php | 6 +- .../settings.json | 1 + .../README.md | 25 +- .../code.php | 44 +- .../code.power | 36 + .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 2 +- .../code.php | 4 +- .../settings.json | 1 + .../README.md | 62 + .../code.php | 60 + .../code.power | 37 + .../settings.json | 19 + .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 4 +- .../settings.json | 3 +- .../README.md | 37 +- .../code.php | 97 +- .../code.power | 91 +- .../settings.json | 3 +- .../README.md | 3 +- .../code.php | 2 +- .../settings.json | 3 +- .../README.md | 2 +- .../code.php | 4 +- .../settings.json | 1 + super-powers.json | 344 ++- 250 files changed, 10520 insertions(+), 1310 deletions(-) create mode 100644 src/008d111c-9d43-427c-8dd4-2653e8b74be8/README.md create mode 100644 src/008d111c-9d43-427c-8dd4-2653e8b74be8/code.php create mode 100644 src/008d111c-9d43-427c-8dd4-2653e8b74be8/code.power create mode 100644 src/008d111c-9d43-427c-8dd4-2653e8b74be8/settings.json create mode 100644 src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/README.md create mode 100644 src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/code.php create mode 100644 src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/code.power create mode 100644 src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/settings.json create mode 100644 src/05744dd3-4030-4cf8-8dda-a93ab809b473/README.md create mode 100644 src/05744dd3-4030-4cf8-8dda-a93ab809b473/code.php create mode 100644 src/05744dd3-4030-4cf8-8dda-a93ab809b473/code.power create mode 100644 src/05744dd3-4030-4cf8-8dda-a93ab809b473/settings.json create mode 100644 src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/README.md create mode 100644 src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/code.php create mode 100644 src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/code.power create mode 100644 src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/settings.json create mode 100644 src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/README.md create mode 100644 src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/code.php create mode 100644 src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/code.power create mode 100644 src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/settings.json create mode 100644 src/34959721-415b-4b5e-8002-3d1fc84b3b2b/README.md create mode 100644 src/34959721-415b-4b5e-8002-3d1fc84b3b2b/code.php create mode 100644 src/34959721-415b-4b5e-8002-3d1fc84b3b2b/code.power create mode 100644 src/34959721-415b-4b5e-8002-3d1fc84b3b2b/settings.json create mode 100644 src/3fc72954-a303-4cac-b53c-554be38b85e7/README.md create mode 100644 src/3fc72954-a303-4cac-b53c-554be38b85e7/code.php create mode 100644 src/3fc72954-a303-4cac-b53c-554be38b85e7/code.power create mode 100644 src/3fc72954-a303-4cac-b53c-554be38b85e7/settings.json create mode 100644 src/51de80f2-2868-4c2c-8198-ef79349e9bd7/README.md create mode 100644 src/51de80f2-2868-4c2c-8198-ef79349e9bd7/code.php create mode 100644 src/51de80f2-2868-4c2c-8198-ef79349e9bd7/code.power create mode 100644 src/51de80f2-2868-4c2c-8198-ef79349e9bd7/settings.json create mode 100644 src/68a41264-64c0-441a-a3d8-8a5e557b1883/README.md create mode 100644 src/68a41264-64c0-441a-a3d8-8a5e557b1883/code.php create mode 100644 src/68a41264-64c0-441a-a3d8-8a5e557b1883/code.power create mode 100644 src/68a41264-64c0-441a-a3d8-8a5e557b1883/settings.json create mode 100644 src/7212e4db-371f-4cfd-8122-32e9bb100d83/README.md create mode 100644 src/7212e4db-371f-4cfd-8122-32e9bb100d83/code.php create mode 100644 src/7212e4db-371f-4cfd-8122-32e9bb100d83/code.power create mode 100644 src/7212e4db-371f-4cfd-8122-32e9bb100d83/settings.json create mode 100644 src/728ee726-3f0f-4762-899d-f8c9430cee58/README.md create mode 100644 src/728ee726-3f0f-4762-899d-f8c9430cee58/code.php create mode 100644 src/728ee726-3f0f-4762-899d-f8c9430cee58/code.power create mode 100644 src/728ee726-3f0f-4762-899d-f8c9430cee58/settings.json create mode 100644 src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/README.md create mode 100644 src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.php create mode 100644 src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.power create mode 100644 src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/settings.json create mode 100644 src/85785701-07b2-4f81-bc1e-0f423700c254/README.md create mode 100644 src/85785701-07b2-4f81-bc1e-0f423700c254/code.php create mode 100644 src/85785701-07b2-4f81-bc1e-0f423700c254/code.power create mode 100644 src/85785701-07b2-4f81-bc1e-0f423700c254/settings.json create mode 100644 src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/README.md create mode 100644 src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/code.php create mode 100644 src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/code.power create mode 100644 src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/settings.json create mode 100644 src/9206082e-a3f7-472e-98b2-de90d06cbdcd/README.md create mode 100644 src/9206082e-a3f7-472e-98b2-de90d06cbdcd/code.php create mode 100644 src/9206082e-a3f7-472e-98b2-de90d06cbdcd/code.power create mode 100644 src/9206082e-a3f7-472e-98b2-de90d06cbdcd/settings.json create mode 100644 src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/README.md create mode 100644 src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/code.php create mode 100644 src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/code.power create mode 100644 src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/settings.json create mode 100644 src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/README.md create mode 100644 src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/code.php create mode 100644 src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/code.power create mode 100644 src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/settings.json create mode 100644 src/a455d916-cfe4-41df-9245-bafb709aacdb/README.md create mode 100644 src/a455d916-cfe4-41df-9245-bafb709aacdb/code.php create mode 100644 src/a455d916-cfe4-41df-9245-bafb709aacdb/code.power create mode 100644 src/a455d916-cfe4-41df-9245-bafb709aacdb/settings.json create mode 100644 src/a5daf189-3345-4b13-8716-c51f686f545b/README.md create mode 100644 src/a5daf189-3345-4b13-8716-c51f686f545b/code.php create mode 100644 src/a5daf189-3345-4b13-8716-c51f686f545b/code.power create mode 100644 src/a5daf189-3345-4b13-8716-c51f686f545b/settings.json create mode 100644 src/bb29a833-73f7-4283-9327-bc7e41f0723b/README.md create mode 100644 src/bb29a833-73f7-4283-9327-bc7e41f0723b/code.php create mode 100644 src/bb29a833-73f7-4283-9327-bc7e41f0723b/code.power create mode 100644 src/bb29a833-73f7-4283-9327-bc7e41f0723b/settings.json create mode 100644 src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/README.md create mode 100644 src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/code.php create mode 100644 src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/code.power create mode 100644 src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/settings.json create mode 100644 src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/README.md create mode 100644 src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/code.php create mode 100644 src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/code.power create mode 100644 src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/settings.json diff --git a/README.md b/README.md index 713b852..b6afcd4 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ This repository contains an index (see below) of all the approved powers within # 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 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 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 -- **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 -- **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 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 -- **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 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 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 @@ -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 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 -- **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 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 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 -- **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 -- **Namespace**: [VastDevelopmentMethod\Joomla\Componentbuilder\Service](#vastdevelopmentmethod-joomla-componentbuilder-service) - - - **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) +- **Namespace**: [VDM\Joomla\Componentbuilder\Table](#vdm-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 -- **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 -- **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 -- **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 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 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 -- **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 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 diff --git a/src/008d111c-9d43-427c-8dd4-2653e8b74be8/README.md b/src/008d111c-9d43-427c-8dd4-2653e8b74be8/README.md new file mode 100644 index 0000000..b754d66 --- /dev/null +++ b/src/008d111c-9d43-427c-8dd4-2653e8b74be8/README.md @@ -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) + diff --git a/src/008d111c-9d43-427c-8dd4-2653e8b74be8/code.php b/src/008d111c-9d43-427c-8dd4-2653e8b74be8/code.php new file mode 100644 index 0000000..6b1426c --- /dev/null +++ b/src/008d111c-9d43-427c-8dd4-2653e8b74be8/code.php @@ -0,0 +1,197 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\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; + } +} + diff --git a/src/008d111c-9d43-427c-8dd4-2653e8b74be8/code.power b/src/008d111c-9d43-427c-8dd4-2653e8b74be8/code.power new file mode 100644 index 0000000..f883d08 --- /dev/null +++ b/src/008d111c-9d43-427c-8dd4-2653e8b74be8/code.power @@ -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; + } \ No newline at end of file diff --git a/src/008d111c-9d43-427c-8dd4-2653e8b74be8/settings.json b/src/008d111c-9d43-427c-8dd4-2653e8b74be8/settings.json new file mode 100644 index 0000000..7a8ba0c --- /dev/null +++ b/src/008d111c-9d43-427c-8dd4-2653e8b74be8/settings.json @@ -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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/README.md b/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/README.md new file mode 100644 index 0000000..475fcde --- /dev/null +++ b/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/README.md @@ -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) + diff --git a/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/code.php b/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/code.php new file mode 100644 index 0000000..3a68e00 --- /dev/null +++ b/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/code.php @@ -0,0 +1,98 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\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; +} + diff --git a/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/code.power b/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/code.power new file mode 100644 index 0000000..2230a3b --- /dev/null +++ b/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/code.power @@ -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; \ No newline at end of file diff --git a/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/settings.json b/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/settings.json new file mode 100644 index 0000000..8cfa253 --- /dev/null +++ b/src/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13/settings.json @@ -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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/05744dd3-4030-4cf8-8dda-a93ab809b473/README.md b/src/05744dd3-4030-4cf8-8dda-a93ab809b473/README.md new file mode 100644 index 0000000..704934f --- /dev/null +++ b/src/05744dd3-4030-4cf8-8dda-a93ab809b473/README.md @@ -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) + diff --git a/src/05744dd3-4030-4cf8-8dda-a93ab809b473/code.php b/src/05744dd3-4030-4cf8-8dda-a93ab809b473/code.php new file mode 100644 index 0000000..c7c274d --- /dev/null +++ b/src/05744dd3-4030-4cf8-8dda-a93ab809b473/code.php @@ -0,0 +1,86 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\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; +} + diff --git a/src/05744dd3-4030-4cf8-8dda-a93ab809b473/code.power b/src/05744dd3-4030-4cf8-8dda-a93ab809b473/code.power new file mode 100644 index 0000000..13bd246 --- /dev/null +++ b/src/05744dd3-4030-4cf8-8dda-a93ab809b473/code.power @@ -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; \ No newline at end of file diff --git a/src/05744dd3-4030-4cf8-8dda-a93ab809b473/settings.json b/src/05744dd3-4030-4cf8-8dda-a93ab809b473/settings.json new file mode 100644 index 0000000..d107bdd --- /dev/null +++ b/src/05744dd3-4030-4cf8-8dda-a93ab809b473/settings.json @@ -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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/06f8eada-d59b-441c-b287-0aea1793da5a/README.md b/src/06f8eada-d59b-441c-b287-0aea1793da5a/README.md index 6d49c9a..8a30aa4 100644 --- a/src/06f8eada-d59b-441c-b287-0aea1793da5a/README.md +++ b/src/06f8eada-d59b-441c-b287-0aea1793da5a/README.md @@ -7,7 +7,7 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # final class Load (Details) -> namespace: **VastDevelopmentMethod\Joomla\Database** +> namespace: **VDM\Joomla\Database** > extends: **Database** ```uml @startuml @@ -22,6 +22,7 @@ class Load << (F,LightGreen) >> #RoyalBlue { # many(array $select, array $tables, ...) : bool # one(array $select, array $tables, ...) : bool # query(array $select, array $tables, ...) : ?object + # getKey(array $select) : ?string } note right of Load::rows @@ -150,6 +151,15 @@ note left of Load::query ?array $order = null ?int $limit = null 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 ``` diff --git a/src/06f8eada-d59b-441c-b287-0aea1793da5a/code.php b/src/06f8eada-d59b-441c-b287-0aea1793da5a/code.php index a24d3d1..ab7b5ff 100644 --- a/src/06f8eada-d59b-441c-b287-0aea1793da5a/code.php +++ b/src/06f8eada-d59b-441c-b287-0aea1793da5a/code.php @@ -9,12 +9,12 @@ * @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 VastDevelopmentMethod\Joomla\Interfaces\LoadInterface; -use VastDevelopmentMethod\Joomla\Abstraction\Database; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Interfaces\LoadInterface; +use VDM\Joomla\Abstraction\Database; /** @@ -40,15 +40,7 @@ final class Load extends Database implements LoadInterface ?array $order = null, ?int $limit = null): ?array { // set key if found - $key = ''; - if (isset($select['key'])) - { - if (is_string($select['key'])) - { - $key = $select['key']; - } - unset($select['key']); - } + $key = $this->getKey($select); // check if we can get many rows 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 { // set key if found - $key = ''; - if (isset($select['key'])) - { - if (is_string($select['key'])) - { - $key = $select['key']; - } - unset($select['key']); - } + $key = $this->getKey($select); // check if we can get many rows if ($this->many($select, $tables, $where, $order, $limit)) @@ -464,6 +448,30 @@ final class Load extends Database implements LoadInterface 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; + } } diff --git a/src/06f8eada-d59b-441c-b287-0aea1793da5a/code.power b/src/06f8eada-d59b-441c-b287-0aea1793da5a/code.power index a764630..01d3090 100644 --- a/src/06f8eada-d59b-441c-b287-0aea1793da5a/code.power +++ b/src/06f8eada-d59b-441c-b287-0aea1793da5a/code.power @@ -14,15 +14,7 @@ ?array $order = null, ?int $limit = null): ?array { // set key if found - $key = ''; - if (isset($select['key'])) - { - if (is_string($select['key'])) - { - $key = $select['key']; - } - unset($select['key']); - } + $key = $this->getKey($select); // check if we can get many rows if ($this->many($select, $tables, $where, $order, $limit)) @@ -51,15 +43,7 @@ ?array $order = null, ?int $limit = null): ?array { // set key if found - $key = ''; - if (isset($select['key'])) - { - if (is_string($select['key'])) - { - $key = $select['key']; - } - unset($select['key']); - } + $key = $this->getKey($select); // check if we can get many rows if ($this->many($select, $tables, $where, $order, $limit)) @@ -438,3 +422,28 @@ 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; + } \ No newline at end of file diff --git a/src/06f8eada-d59b-441c-b287-0aea1793da5a/settings.json b/src/06f8eada-d59b-441c-b287-0aea1793da5a/settings.json index 486732d..dfaa6be 100644 --- a/src/06f8eada-d59b-441c-b287-0aea1793da5a/settings.json +++ b/src/06f8eada-d59b-441c-b287-0aea1793da5a/settings.json @@ -17,6 +17,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Database.Load", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/README.md b/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/README.md index 275d4c6..fb8b253 100644 --- a/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/README.md +++ b/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class ArrayHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** +> extends: **** ```uml @startuml abstract ArrayHelper #Orange { diff --git a/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/code.php b/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/code.php index 240930a..70cc939 100644 --- a/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/code.php +++ b/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities; +namespace VDM\Joomla\Utilities; /** diff --git a/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/settings.json b/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/settings.json index 6fb4dde..64e144c 100644 --- a/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/settings.json +++ b/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "Utilities Array Helper", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.ArrayHelper", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/README.md b/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/README.md index dddafd9..9d4a28b 100644 --- a/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/README.md +++ b/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # trait Count (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** +> namespace: **VDM\Joomla\Abstraction\Registry\Traits** +> extends: **** ```uml @startuml class Count << (T,Orange) >> #Turquoise { diff --git a/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/code.php b/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/code.php index c112239..5584a9f 100644 --- a/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/code.php +++ b/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits; +namespace VDM\Joomla\Abstraction\Registry\Traits; /** diff --git a/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/settings.json b/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/settings.json index fc1a330..6ecbace 100644 --- a/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/settings.json +++ b/src/11572d9b-e3d5-4b29-904c-9618d8f2bfd8/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "11572d9b-e3d5-4b29-904c-9618d8f2bfd8", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Abstraction.Registry.Traits.Count", "type": "trait", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.Count", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/README.md b/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/README.md index 957a63e..e86f979 100644 --- a/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/README.md +++ b/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class FormHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** +> extends: **** ```uml @startuml abstract FormHelper #Orange { diff --git a/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/code.php b/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/code.php index 0c4ad1e..b21d71c 100644 --- a/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/code.php +++ b/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/code.php @@ -9,7 +9,7 @@ * @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; diff --git a/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/settings.json b/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/settings.json index 1540f90..bc77147 100644 --- a/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/settings.json +++ b/src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "1198aecf-84c6-45d2-aea8-d531aa4afdfa", "implements": null, "load_selection": { @@ -14,6 +14,7 @@ "system_name": "Utilities FormHelper", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.FormHelper", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/README.md b/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/README.md index aec6f2c..befbb57 100644 --- a/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/README.md +++ b/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class Grep (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction** +> namespace: **VDM\Joomla\Abstraction** +> extends: **** ```uml @startuml abstract Grep #Orange { @@ -16,12 +17,12 @@ abstract Grep #Orange { # array $order # Contents $contents # CMSApplication $app - + __construct(string $path, array $paths, ...) + + __construct(Contents $contents, array $paths, ...) + getRemotePowersGuid() : ?array + get(string $guid, ?array $order = null) : ?object # {abstract} remoteIndex(object $path) : void # getFunctionName(string $name) : ?string - - init() : void + # init() : void } note right of Grep::__construct @@ -30,9 +31,9 @@ note right of Grep::__construct since: 3.2.0 arguments: - string $path - array $paths Contents $contents + array $paths + ?string $path = null ?CMSApplication $app = null end note diff --git a/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/code.php b/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/code.php index 8312b7b..f4c306f 100644 --- a/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/code.php +++ b/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/code.php @@ -9,17 +9,14 @@ * @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\Filesystem\Folder; -use Joomla\CMS\Application\CMSApplication; -use Joomla\CMS\Language\Text; -use VastDevelopmentMethod\Joomla\Gitea\Repository\Contents; -use VastDevelopmentMethod\Joomla\Utilities\FileHelper; -use VastDevelopmentMethod\Joomla\Utilities\JsonHelper; -use VastDevelopmentMethod\Joomla\Interfaces\GrepInterface; +use Joomla\CMS\Application\CMSApplication; +use VDM\Joomla\Gitea\Repository\Contents; +use VDM\Joomla\Interfaces\GrepInterface; /** @@ -77,19 +74,19 @@ abstract class Grep implements GrepInterface /** * Constructor. * - * @param string $path The local path - * @param array $paths The approved paths * @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. * * @throws \Exception * @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->contents = $contents; + $this->path = $path; $this->app = $app ?: Factory::getApplication(); $this->init(); @@ -186,22 +183,28 @@ abstract class Grep implements GrepInterface * @return void * @since 3.2.0 */ - private function init(): void + protected function init(): void { if (is_array($this->paths) && $this->paths !== []) { foreach ($this->paths as $n => &$path) { - if (isset($path->owner) && strlen($path->owner) > 1 && - isset($path->repo) && strlen($path->repo) > 1) + if (isset($path->organisation) && strlen($path->organisation) > 1 && + isset($path->repository) && strlen($path->repository) > 1) { // build the path - $path->path = trim($path->owner) . '/' . trim($path->repo); + $path->path = trim($path->organisation) . '/' . trim($path->repository); // 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 diff --git a/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/code.power b/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/code.power index cc1ebe3..7837fa6 100644 --- a/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/code.power +++ b/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/code.power @@ -41,19 +41,19 @@ /** * Constructor. * - * @param string $path The local path - * @param array $paths The approved paths * @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. * * @throws \Exception * @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->contents = $contents; + $this->path = $path; $this->app = $app ?: Factory::getApplication(); $this->init(); @@ -150,22 +150,28 @@ * @return void * @since 3.2.0 */ - private function init(): void + protected function init(): void { if (is_array($this->paths) && $this->paths !== []) { foreach ($this->paths as $n => &$path) { - if (isset($path->owner) && strlen($path->owner) > 1 && - isset($path->repo) && strlen($path->repo) > 1) + if (isset($path->organisation) && strlen($path->organisation) > 1 && + isset($path->repository) && strlen($path->repository) > 1) { // build the path - $path->path = trim($path->owner) . '/' . trim($path->repo); + $path->path = trim($path->organisation) . '/' . trim($path->repository); // 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 diff --git a/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/settings.json b/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/settings.json index 9996e40..6c0c6f5 100644 --- a/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/settings.json +++ b/src/1401a167-0ce4-4f4a-afee-2d8b02ed339b/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "1401a167-0ce4-4f4a-afee-2d8b02ed339b", "implements": [ "c182506a-ab84-439c-b962-1e606b58d545" @@ -15,19 +15,12 @@ "use_selection0": { "use": "8d1baef6-fcad-49a9-848f-428009cdb989", "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", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", - "head": "use Joomla\\CMS\\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": "" } \ No newline at end of file diff --git a/src/152c8793-8b75-4715-996a-257b9f65451c/README.md b/src/152c8793-8b75-4715-996a-257b9f65451c/README.md index 4594672..312630e 100644 --- a/src/152c8793-8b75-4715-996a-257b9f65451c/README.md +++ b/src/152c8793-8b75-4715-996a-257b9f65451c/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class MathHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** +> extends: **** ```uml @startuml abstract MathHelper #Orange { diff --git a/src/152c8793-8b75-4715-996a-257b9f65451c/code.php b/src/152c8793-8b75-4715-996a-257b9f65451c/code.php index e7ce648..e407440 100644 --- a/src/152c8793-8b75-4715-996a-257b9f65451c/code.php +++ b/src/152c8793-8b75-4715-996a-257b9f65451c/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities; +namespace VDM\Joomla\Utilities; /** diff --git a/src/152c8793-8b75-4715-996a-257b9f65451c/settings.json b/src/152c8793-8b75-4715-996a-257b9f65451c/settings.json index faeba2c..e921f11 100644 --- a/src/152c8793-8b75-4715-996a-257b9f65451c/settings.json +++ b/src/152c8793-8b75-4715-996a-257b9f65451c/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "152c8793-8b75-4715-996a-257b9f65451c", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "Utilities Math Helper", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.MathHelper", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/README.md b/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/README.md index ea80994..a21fd76 100644 --- a/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/README.md +++ b/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class StringHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** +> extends: **** ```uml @startuml abstract StringHelper #Orange { diff --git a/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/code.php b/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/code.php index 70f8df4..5d79075 100644 --- a/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/code.php +++ b/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/code.php @@ -9,12 +9,12 @@ * @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\CMS\Language\Language; -use VastDevelopmentMethod\Joomla\Utilities\Component\Helper; +use VDM\Joomla\Utilities\Component\Helper; /** diff --git a/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/settings.json b/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/settings.json index 82a2a70..47c974d 100644 --- a/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/settings.json +++ b/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef", "implements": null, "load_selection": { @@ -19,6 +19,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.StringHelper", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/README.md b/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/README.md index 423c56f..9fc07ca 100644 --- a/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/README.md +++ b/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # trait InArray (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** +> namespace: **VDM\Joomla\Abstraction\Registry\Traits** +> extends: **** ```uml @startuml class InArray << (T,Orange) >> #Turquoise { diff --git a/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/code.php b/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/code.php index 4d2549c..9bcd708 100644 --- a/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/code.php +++ b/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits; +namespace VDM\Joomla\Abstraction\Registry\Traits; /** diff --git a/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/settings.json b/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/settings.json index c140698..fb64038 100644 --- a/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/settings.json +++ b/src/215b35ac-1b26-4838-bbcf-d1fdbbd9353f/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "215b35ac-1b26-4838-bbcf-d1fdbbd9353f", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Abstraction.Registry.Traits.InArray", "type": "trait", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.InArray", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/README.md b/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/README.md new file mode 100644 index 0000000..8d20de9 --- /dev/null +++ b/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/README.md @@ -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) + diff --git a/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/code.php b/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/code.php new file mode 100644 index 0000000..2e960b2 --- /dev/null +++ b/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/code.php @@ -0,0 +1,351 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\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; + } +} + diff --git a/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/code.power b/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/code.power new file mode 100644 index 0000000..4d17647 --- /dev/null +++ b/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/code.power @@ -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; + } \ No newline at end of file diff --git a/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/settings.json b/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/settings.json new file mode 100644 index 0000000..d2ddb04 --- /dev/null +++ b/src/21bca8a4-5b28-41c4-843e-8097f0ba7cca/settings.json @@ -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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/README.md b/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/README.md index ec6f364..bc7c33c 100644 --- a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/README.md +++ b/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # interface LoadInterface (Details) -> namespace: **VastDevelopmentMethod\Joomla\Interfaces** +> namespace: **VDM\Joomla\Interfaces** +> extends: **** ```uml @startuml interface LoadInterface #Lavender { diff --git a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.php b/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.php index 14fcf84..31017c5 100644 --- a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.php +++ b/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Interfaces; +namespace VDM\Joomla\Interfaces; /** diff --git a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/settings.json b/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/settings.json index d490281..257dd93 100644 --- a/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/settings.json +++ b/src/2ad31f74-f579-499d-b98b-c4f54fd615dd/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "2ad31f74-f579-499d-b98b-c4f54fd615dd", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Interfaces.LoadInterface", "type": "interface", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.LoadInterface", "description": "Database Load Interface\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/README.md b/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/README.md index 4cbbaf9..1b21b6e 100644 --- a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/README.md +++ b/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # interface Tableinterface (Details) -> namespace: **VastDevelopmentMethod\Joomla\Interfaces** +> namespace: **VDM\Joomla\Interfaces** +> extends: **** ```uml @startuml interface Tableinterface #Lavender { diff --git a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.php b/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.php index 51ea51b..a7cef07 100644 --- a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.php +++ b/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Interfaces; +namespace VDM\Joomla\Interfaces; /** diff --git a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/settings.json b/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/settings.json index 0bedf86..1b25664 100644 --- a/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/settings.json +++ b/src/2da6d6c4-eb29-4d69-8bc2-36d96e916adf/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "2da6d6c4-eb29-4d69-8bc2-36d96e916adf", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Interfaces.Tableinterface", "type": "interface", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Tableinterface", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/README.md b/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/README.md new file mode 100644 index 0000000..8755b9d --- /dev/null +++ b/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/README.md @@ -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) + diff --git a/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/code.php b/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/code.php new file mode 100644 index 0000000..800e489 --- /dev/null +++ b/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/code.php @@ -0,0 +1,75 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\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') + ); + } +} + diff --git a/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/code.power b/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/code.power new file mode 100644 index 0000000..8030dc6 --- /dev/null +++ b/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/code.power @@ -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') + ); + } \ No newline at end of file diff --git a/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/settings.json b/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/settings.json new file mode 100644 index 0000000..d3cc687 --- /dev/null +++ b/src/2dcedd6c-c95b-4a37-9cac-95d28faedca3/settings.json @@ -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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "use Joomla\\DI\\Container;\r\nuse Joomla\\DI\\ServiceProviderInterface;", + "composer": "" +} \ No newline at end of file diff --git a/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/README.md b/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/README.md index 6ef3ef5..a336d46 100644 --- a/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/README.md +++ b/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class ClassfunctionHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities\String** +> namespace: **VDM\Joomla\Utilities\String** +> extends: **** ```uml @startuml abstract ClassfunctionHelper #Orange { diff --git a/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/code.php b/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/code.php index 7d74b42..42d21af 100644 --- a/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/code.php +++ b/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/code.php @@ -9,10 +9,10 @@ * @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; /** diff --git a/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/settings.json b/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/settings.json index f13e326..ee471ff 100644 --- a/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/settings.json +++ b/src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "30c5b4c2-f75f-4d15-869a-f8bfedd87358", "implements": null, "load_selection": null, @@ -15,6 +15,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.ClassfunctionHelper", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/README.md b/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/README.md new file mode 100644 index 0000000..48f9ca9 --- /dev/null +++ b/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/README.md @@ -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) + diff --git a/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/code.php b/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/code.php new file mode 100644 index 0000000..6b95ebc --- /dev/null +++ b/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/code.php @@ -0,0 +1,64 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\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; +} + diff --git a/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/code.power b/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/code.power new file mode 100644 index 0000000..8a3f646 --- /dev/null +++ b/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/code.power @@ -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; \ No newline at end of file diff --git a/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/settings.json b/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/settings.json new file mode 100644 index 0000000..c101b8c --- /dev/null +++ b/src/34959721-415b-4b5e-8002-3d1fc84b3b2b/settings.json @@ -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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/README.md b/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/README.md index 065a7e0..9958de4 100644 --- a/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/README.md +++ b/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class PluginHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities\String** +> namespace: **VDM\Joomla\Utilities\String** +> extends: **** ```uml @startuml abstract PluginHelper #Orange { diff --git a/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/code.php b/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/code.php index 9471caa..1b31ffd 100644 --- a/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/code.php +++ b/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities\String; +namespace VDM\Joomla\Utilities\String; /** diff --git a/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/settings.json b/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/settings.json index 458318f..2516d56 100644 --- a/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/settings.json +++ b/src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "3cf76fbf-fd95-4a33-878e-7aff6d36b7f6", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "String Plugin Helper", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.PluginHelper", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/3fc72954-a303-4cac-b53c-554be38b85e7/README.md b/src/3fc72954-a303-4cac-b53c-554be38b85e7/README.md new file mode 100644 index 0000000..99ef2bb --- /dev/null +++ b/src/3fc72954-a303-4cac-b53c-554be38b85e7/README.md @@ -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) + diff --git a/src/3fc72954-a303-4cac-b53c-554be38b85e7/code.php b/src/3fc72954-a303-4cac-b53c-554be38b85e7/code.php new file mode 100644 index 0000000..71276de --- /dev/null +++ b/src/3fc72954-a303-4cac-b53c-554be38b85e7/code.php @@ -0,0 +1,112 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\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; + } +} + diff --git a/src/3fc72954-a303-4cac-b53c-554be38b85e7/code.power b/src/3fc72954-a303-4cac-b53c-554be38b85e7/code.power new file mode 100644 index 0000000..a9e1e99 --- /dev/null +++ b/src/3fc72954-a303-4cac-b53c-554be38b85e7/code.power @@ -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; + } \ No newline at end of file diff --git a/src/3fc72954-a303-4cac-b53c-554be38b85e7/settings.json b/src/3fc72954-a303-4cac-b53c-554be38b85e7/settings.json new file mode 100644 index 0000000..cd9b5eb --- /dev/null +++ b/src/3fc72954-a303-4cac-b53c-554be38b85e7/settings.json @@ -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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/43134867-5cb8-4280-9be8-309fd2fd135f/README.md b/src/43134867-5cb8-4280-9be8-309fd2fd135f/README.md index 1c9c264..3e0fe53 100644 --- a/src/43134867-5cb8-4280-9be8-309fd2fd135f/README.md +++ b/src/43134867-5cb8-4280-9be8-309fd2fd135f/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class ActiveRegistry (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction** +> namespace: **VDM\Joomla\Abstraction** +> extends: **** ```uml @startuml abstract ActiveRegistry #Orange { diff --git a/src/43134867-5cb8-4280-9be8-309fd2fd135f/code.php b/src/43134867-5cb8-4280-9be8-309fd2fd135f/code.php index 74a8533..e714bd2 100644 --- a/src/43134867-5cb8-4280-9be8-309fd2fd135f/code.php +++ b/src/43134867-5cb8-4280-9be8-309fd2fd135f/code.php @@ -9,10 +9,10 @@ * @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; /** diff --git a/src/43134867-5cb8-4280-9be8-309fd2fd135f/settings.json b/src/43134867-5cb8-4280-9be8-309fd2fd135f/settings.json index a193fe6..79725fc 100644 --- a/src/43134867-5cb8-4280-9be8-309fd2fd135f/settings.json +++ b/src/43134867-5cb8-4280-9be8-309fd2fd135f/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "43134867-5cb8-4280-9be8-309fd2fd135f", "implements": [ "af0eedbe-603b-4671-8e5a-28165d88254b" @@ -12,6 +12,7 @@ "system_name": "VDM.Abstraction.ActiveRegistry", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "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", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/4815e1c7-a433-443d-a112-d1e03d7df84b/README.md b/src/4815e1c7-a433-443d-a112-d1e03d7df84b/README.md index 0dfd68d..6e7e8f3 100644 --- a/src/4815e1c7-a433-443d-a112-d1e03d7df84b/README.md +++ b/src/4815e1c7-a433-443d-a112-d1e03d7df84b/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # class Database (Details) -> namespace: **VastDevelopmentMethod\Joomla\Componentbuilder\Service** +> namespace: **VDM\Joomla\Service** +> extends: **** ```uml @startuml class Database #Gold { @@ -15,6 +16,7 @@ class Database #Gold { + getLoad(Container $container) : Load + getInsert(Container $container) : Insert + getUpdate(Container $container) : Update + + getDelete(Container $container) : Delete } note right of Database::register @@ -44,6 +46,13 @@ note right of Database::getUpdate since: 3.2.0 return: Update end note + +note right of Database::getDelete + Get the Core Delete Database + + since: 3.2.2 + return: Delete +end note @enduml ``` diff --git a/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.php b/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.php index 6c57879..fe04c44 100644 --- a/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.php +++ b/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.php @@ -9,14 +9,15 @@ * @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\ServiceProviderInterface; -use VastDevelopmentMethod\Joomla\Database\Load; -use VastDevelopmentMethod\Joomla\Database\Insert; -use VastDevelopmentMethod\Joomla\Database\Update; +use VDM\Joomla\Database\Load; +use VDM\Joomla\Database\Insert; +use VDM\Joomla\Database\Update; +use VDM\Joomla\Database\Delete; /** @@ -44,6 +45,9 @@ class Database implements ServiceProviderInterface $container->alias(Update::class, 'Update') ->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 { 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(); } } diff --git a/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.power b/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.power index 1ca19e7..9446f10 100644 --- a/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.power +++ b/src/4815e1c7-a433-443d-a112-d1e03d7df84b/code.power @@ -16,6 +16,9 @@ $container->alias(Update::class, 'Update') ->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 { 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(); } \ No newline at end of file diff --git a/src/4815e1c7-a433-443d-a112-d1e03d7df84b/settings.json b/src/4815e1c7-a433-443d-a112-d1e03d7df84b/settings.json index 5958aae..c32ce3b 100644 --- a/src/4815e1c7-a433-443d-a112-d1e03d7df84b/settings.json +++ b/src/4815e1c7-a433-443d-a112-d1e03d7df84b/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "4815e1c7-a433-443d-a112-d1e03d7df84b", "implements": [ "-1" @@ -23,9 +23,14 @@ "use_selection2": { "use": "cce56585-58b0-4f72-a92c-e2635ea52d83", "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", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/README.md b/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/README.md index d221c02..ed9747e 100644 --- a/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/README.md +++ b/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class ComponentCodeNameHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities\String** +> namespace: **VDM\Joomla\Utilities\String** +> extends: **** ```uml @startuml abstract ComponentCodeNameHelper #Orange { diff --git a/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/code.php b/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/code.php index 54637ee..538496e 100644 --- a/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/code.php +++ b/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities\String; +namespace VDM\Joomla\Utilities\String; /** diff --git a/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/settings.json b/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/settings.json index ed5c154..87b2d79 100644 --- a/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/settings.json +++ b/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "491dbe41-f26c-4de9-8a95-fcf87b35b56f", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "String ComponentCodeName Helper", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.ComponentCodeNameHelper", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/README.md b/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/README.md index e2e94b6..8f21d7c 100644 --- a/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/README.md +++ b/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class JsonHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** +> extends: **** ```uml @startuml abstract JsonHelper #Orange { diff --git a/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/code.php b/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/code.php index ad8b262..47fbd24 100644 --- a/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/code.php +++ b/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities; +namespace VDM\Joomla\Utilities; /** diff --git a/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/settings.json b/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/settings.json index a486a6a..a2eae77 100644 --- a/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/settings.json +++ b/src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "4b225c51-d293-48e4-b3f6-5136cf5c3f18", "implements": null, "load_selection": { @@ -20,6 +20,7 @@ "system_name": "Utilities Json Helper", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.JsonHelper", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/README.md b/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/README.md index 37bf164..3687a70 100644 --- a/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/README.md +++ b/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # interface SchemaInterface (Details) -> namespace: **VastDevelopmentMethod\Joomla\Interfaces** +> namespace: **VDM\Joomla\Interfaces** +> extends: **** ```uml @startuml interface SchemaInterface #Lavender { diff --git a/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/code.php b/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/code.php index cb33477..eee04dc 100644 --- a/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/code.php +++ b/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Interfaces; +namespace VDM\Joomla\Interfaces; /** diff --git a/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/settings.json b/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/settings.json index 5d53afd..d268cf9 100644 --- a/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/settings.json +++ b/src/4dd11b9b-3c64-460b-aaa6-62ba467db7aa/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "4dd11b9b-3c64-460b-aaa6-62ba467db7aa", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.SchemaInterface", "type": "interface", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.SchemaInterface", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/README.md b/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/README.md new file mode 100644 index 0000000..ea8be0b --- /dev/null +++ b/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/README.md @@ -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) + diff --git a/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/code.php b/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/code.php new file mode 100644 index 0000000..ab4fea5 --- /dev/null +++ b/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/code.php @@ -0,0 +1,69 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\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; +} + diff --git a/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/code.power b/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/code.power new file mode 100644 index 0000000..08c1df0 --- /dev/null +++ b/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/code.power @@ -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; \ No newline at end of file diff --git a/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/settings.json b/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/settings.json new file mode 100644 index 0000000..c3b8a06 --- /dev/null +++ b/src/51de80f2-2868-4c2c-8198-ef79349e9bd7/settings.json @@ -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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/README.md b/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/README.md index 1e84dde..03957a0 100644 --- a/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/README.md +++ b/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/README.md @@ -7,7 +7,7 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # final class Insert (Details) -> namespace: **VastDevelopmentMethod\Joomla\Database** +> namespace: **VDM\Joomla\Database** > extends: **Database** ```uml @startuml diff --git a/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/code.php b/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/code.php index e6d7edd..bf7611a 100644 --- a/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/code.php +++ b/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/code.php @@ -9,13 +9,13 @@ * @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 VastDevelopmentMethod\Joomla\Utilities\ArrayHelper; -use VastDevelopmentMethod\Joomla\Interfaces\InsertInterface; -use VastDevelopmentMethod\Joomla\Abstraction\Database; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Interfaces\InsertInterface; +use VDM\Joomla\Abstraction\Database; /** diff --git a/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/settings.json b/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/settings.json index 2c93d9b..ea3958b 100644 --- a/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/settings.json +++ b/src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/settings.json @@ -17,6 +17,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Database.Insert", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/52a1d14f-304a-431c-8fa4-411179942db5/README.md b/src/52a1d14f-304a-431c-8fa4-411179942db5/README.md index 0be61a6..d369ef8 100644 --- a/src/52a1d14f-304a-431c-8fa4-411179942db5/README.md +++ b/src/52a1d14f-304a-431c-8fa4-411179942db5/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # trait VarExport (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** +> namespace: **VDM\Joomla\Abstraction\Registry\Traits** +> extends: **** ```uml @startuml class VarExport << (T,Orange) >> #Turquoise { diff --git a/src/52a1d14f-304a-431c-8fa4-411179942db5/code.php b/src/52a1d14f-304a-431c-8fa4-411179942db5/code.php index 2d78f26..56af57e 100644 --- a/src/52a1d14f-304a-431c-8fa4-411179942db5/code.php +++ b/src/52a1d14f-304a-431c-8fa4-411179942db5/code.php @@ -9,7 +9,7 @@ * @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; diff --git a/src/52a1d14f-304a-431c-8fa4-411179942db5/settings.json b/src/52a1d14f-304a-431c-8fa4-411179942db5/settings.json index ad57486..401a9ef 100644 --- a/src/52a1d14f-304a-431c-8fa4-411179942db5/settings.json +++ b/src/52a1d14f-304a-431c-8fa4-411179942db5/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "52a1d14f-304a-431c-8fa4-411179942db5", "implements": null, "load_selection": null, @@ -15,6 +15,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.VarExport", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/584747d1-3a86-453d-b7a3-a2219de8d777/README.md b/src/584747d1-3a86-453d-b7a3-a2219de8d777/README.md index f2d0035..f58e9f0 100644 --- a/src/584747d1-3a86-453d-b7a3-a2219de8d777/README.md +++ b/src/584747d1-3a86-453d-b7a3-a2219de8d777/README.md @@ -7,32 +7,51 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class Model (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction** +> namespace: **VDM\Joomla\Abstraction** +> extends: **** ```uml @startuml abstract Model #Orange { # array $last # 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 + item(?object $item, ?string $table = null) : ?object + items(?array $items = null, ?string $table = null) : ?array + row(?array $item, ?string $table = null) : ?array + rows(?array $items = null, ?string $table = null) : ?array + last(?string $table = null) : ?int + + setTable(string $tableName) : void + + setAllowEmpty(bool $allowEmpty) : void + # getTable() : string + # getAllowEmpty() : bool # getTableFields(string $table, bool $default = false) : ?array # {abstract} validateBefore(mixed $value, ?string $field = null, ...) : bool # {abstract} validateAfter(mixed $value, ?string $field = null, ...) : bool - # {abstract} getTable() : string } note right of Model::__construct Constructor since: 3.2.0 + + arguments: + Table $table + ?string $tableName = null + bool $allowEmpty = null 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 Example: $this->value(value, 'value_key', 'table_name'); @@ -45,7 +64,7 @@ Example: $this->value(value, 'value_key', 'table_name'); ?string $table = null end note -note right of Model::item +note left of Model::item Model the values of an item Example: $this->item(Object, 'table_name'); @@ -53,7 +72,7 @@ Example: $this->item(Object, 'table_name'); return: ?object end note -note left of Model::items +note right of Model::items Model the values of multiple items Example: $this->items(Array, 'table_name'); @@ -61,7 +80,7 @@ Example: $this->items(Array, 'table_name'); return: ?array end note -note right of Model::row +note left of Model::row Model the values of an row Example: $this->item(Array, 'table_name'); @@ -69,7 +88,7 @@ Example: $this->item(Array, 'table_name'); return: ?array end note -note left of Model::rows +note right of Model::rows Model the values of multiple rows Example: $this->items(Array, 'table_name'); @@ -77,7 +96,7 @@ Example: $this->items(Array, 'table_name'); return: ?array end note -note right of Model::last +note left of Model::last Get last modeled ID Example: $this->last('table_name'); @@ -85,14 +104,42 @@ Example: $this->last('table_name'); return: ?int 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) since: 3.2.0 return: ?array end note -note right of Model::validateBefore +note left of Model::validateBefore Validate before the value is modelled (basic, override in child class) since: 3.2.0 @@ -104,7 +151,7 @@ note right of Model::validateBefore ?string $table = null end note -note left of Model::validateAfter +note right of Model::validateAfter Validate after the value is modelled (basic, override in child class) since: 3.2.0 @@ -115,13 +162,6 @@ note left of Model::validateAfter ?string $field = null ?string $table = null end note - -note right of Model::getTable - Get the current active table - - since: 3.2.0 - return: string -end note @enduml ``` diff --git a/src/584747d1-3a86-453d-b7a3-a2219de8d777/code.php b/src/584747d1-3a86-453d-b7a3-a2219de8d777/code.php index d1f85a7..f74eba0 100644 --- a/src/584747d1-3a86-453d-b7a3-a2219de8d777/code.php +++ b/src/584747d1-3a86-453d-b7a3-a2219de8d777/code.php @@ -9,12 +9,13 @@ * @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 VastDevelopmentMethod\Joomla\Utilities\ArrayHelper; -use VastDevelopmentMethod\Joomla\Interfaces\Tableinterface as Table; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\ArrayHelper; +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 */ -abstract class Model +abstract class Model implements ModelInterface { /** * Last ID @@ -40,16 +41,57 @@ abstract class Model */ 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 * - * @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 */ - public function __construct(Table $table) + public function __construct(Table $table, ?string $tableName = null, bool $allowEmpty = null) { $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; } + /** + * 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) * @@ -345,14 +435,6 @@ abstract class Model * @return bool * @since 3.2.0 */ - 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; + abstract protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool; } diff --git a/src/584747d1-3a86-453d-b7a3-a2219de8d777/code.power b/src/584747d1-3a86-453d-b7a3-a2219de8d777/code.power index ad41542..b3bbf60 100644 --- a/src/584747d1-3a86-453d-b7a3-a2219de8d777/code.power +++ b/src/584747d1-3a86-453d-b7a3-a2219de8d777/code.power @@ -14,16 +14,57 @@ */ 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 * - * @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 */ - public function __construct(Table $table) + public function __construct(Table $table, ?string $tableName = null, bool $allowEmpty = null) { $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; } + /** + * 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) * @@ -319,12 +408,4 @@ * @return bool * @since 3.2.0 */ - 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; \ No newline at end of file + abstract protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool; \ No newline at end of file diff --git a/src/584747d1-3a86-453d-b7a3-a2219de8d777/settings.json b/src/584747d1-3a86-453d-b7a3-a2219de8d777/settings.json index f3cc2b2..d0e288f 100644 --- a/src/584747d1-3a86-453d-b7a3-a2219de8d777/settings.json +++ b/src/584747d1-3a86-453d-b7a3-a2219de8d777/settings.json @@ -1,9 +1,11 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "584747d1-3a86-453d-b7a3-a2219de8d777", - "implements": null, + "implements": [ + "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff" + ], "load_selection": null, "name": "Model", "power_version": "1.0.0", @@ -23,6 +25,7 @@ "as": "Table" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Model", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/README.md b/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/README.md index 6dd4a3e..d2ff945 100644 --- a/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/README.md +++ b/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # trait GetString (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** +> namespace: **VDM\Joomla\Abstraction\Registry\Traits** +> extends: **** ```uml @startuml class GetString << (T,Orange) >> #Turquoise { diff --git a/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/code.php b/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/code.php index 91b4892..56f128d 100644 --- a/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/code.php +++ b/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits; +namespace VDM\Joomla\Abstraction\Registry\Traits; /** diff --git a/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/settings.json b/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/settings.json index 447ac37..db3b3fd 100644 --- a/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/settings.json +++ b/src/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "59b1a2ea-d77e-4040-ac8c-e65cd8743e9b", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Abstraction.Registry.Traits.GetString", "type": "trait", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.GetString", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/640b5352-fb09-425f-a26e-cd44eda03f15/README.md b/src/640b5352-fb09-425f-a26e-cd44eda03f15/README.md index c5a8cc4..e8da385 100644 --- a/src/640b5352-fb09-425f-a26e-cd44eda03f15/README.md +++ b/src/640b5352-fb09-425f-a26e-cd44eda03f15/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class Helper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities\Component** +> namespace: **VDM\Joomla\Utilities\Component** +> extends: **** ```uml @startuml abstract Helper #Orange { diff --git a/src/640b5352-fb09-425f-a26e-cd44eda03f15/code.php b/src/640b5352-fb09-425f-a26e-cd44eda03f15/code.php index 6995b2f..5660a49 100644 --- a/src/640b5352-fb09-425f-a26e-cd44eda03f15/code.php +++ b/src/640b5352-fb09-425f-a26e-cd44eda03f15/code.php @@ -9,14 +9,14 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities\Component; +namespace VDM\Joomla\Utilities\Component; use Joomla\CMS\Factory; use Joomla\CMS\Component\ComponentHelper; use Joomla\Input\Input; use Joomla\Registry\Registry; -use VastDevelopmentMethod\Joomla\Utilities\String\NamespaceHelper; +use VDM\Joomla\Utilities\String\NamespaceHelper; /** diff --git a/src/640b5352-fb09-425f-a26e-cd44eda03f15/settings.json b/src/640b5352-fb09-425f-a26e-cd44eda03f15/settings.json index 79093f5..cd34e7e 100644 --- a/src/640b5352-fb09-425f-a26e-cd44eda03f15/settings.json +++ b/src/640b5352-fb09-425f-a26e-cd44eda03f15/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "640b5352-fb09-425f-a26e-cd44eda03f15", "implements": null, "load_selection": null, @@ -15,6 +15,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.Component.Helper", "description": "Some component helper\r\n\r\n@since 3.0.11", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/README.md b/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/README.md index 414623b..0ee00ee 100644 --- a/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/README.md +++ b/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class Base64Helper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** +> extends: **** ```uml @startuml abstract Base64Helper #Orange { diff --git a/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/code.php b/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/code.php index 6ac4c18..b33b129 100644 --- a/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/code.php +++ b/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/code.php @@ -9,10 +9,10 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities; +namespace VDM\Joomla\Utilities; -use VastDevelopmentMethod\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\StringHelper; /** diff --git a/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/settings.json b/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/settings.json index 9fbbaee..89486d6 100644 --- a/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/settings.json +++ b/src/64a6ff6c-069c-4a11-a76b-db5e36c27690/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "64a6ff6c-069c-4a11-a76b-db5e36c27690", "implements": null, "load_selection": null, @@ -15,6 +15,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.Base64Helper", "description": "The Base64 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/64e291c2-11f1-423d-a44d-837cc12cc017/README.md b/src/64e291c2-11f1-423d-a44d-837cc12cc017/README.md index 7baff6c..33bdd5d 100644 --- a/src/64e291c2-11f1-423d-a44d-837cc12cc017/README.md +++ b/src/64e291c2-11f1-423d-a44d-837cc12cc017/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # interface Registryinterface (Details) -> namespace: **VastDevelopmentMethod\Joomla\Interfaces** +> namespace: **VDM\Joomla\Interfaces** +> extends: **Activeregistryinterface** ```uml @startuml interface Registryinterface #Lavender { diff --git a/src/64e291c2-11f1-423d-a44d-837cc12cc017/code.php b/src/64e291c2-11f1-423d-a44d-837cc12cc017/code.php index 487b3a6..c41162d 100644 --- a/src/64e291c2-11f1-423d-a44d-837cc12cc017/code.php +++ b/src/64e291c2-11f1-423d-a44d-837cc12cc017/code.php @@ -9,7 +9,10 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Interfaces; +namespace VDM\Joomla\Interfaces; + + +use VDM\Joomla\Interfaces\Activeregistryinterface; /** @@ -17,7 +20,7 @@ namespace VastDevelopmentMethod\Joomla\Interfaces; * * @since 3.2.0 */ -interface Registryinterface +interface Registryinterface extends Activeregistryinterface { /** * Sets a value into the registry using multiple keys. diff --git a/src/64e291c2-11f1-423d-a44d-837cc12cc017/settings.json b/src/64e291c2-11f1-423d-a44d-837cc12cc017/settings.json index 13242b5..f4f1253 100644 --- a/src/64e291c2-11f1-423d-a44d-837cc12cc017/settings.json +++ b/src/64e291c2-11f1-423d-a44d-837cc12cc017/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "64e291c2-11f1-423d-a44d-837cc12cc017", "implements": null, "load_selection": null, @@ -10,6 +10,9 @@ "system_name": "VDM.Interfaces.Registryinterface", "type": "interface", "use_selection": null, + "extendsinterfaces": [ + "af0eedbe-603b-4671-8e5a-28165d88254b" + ], "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Registryinterface", "description": "The Registry Interface\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/68a41264-64c0-441a-a3d8-8a5e557b1883/README.md b/src/68a41264-64c0-441a-a3d8-8a5e557b1883/README.md new file mode 100644 index 0000000..a2b54e0 --- /dev/null +++ b/src/68a41264-64c0-441a-a3d8-8a5e557b1883/README.md @@ -0,0 +1,97 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# interface UpdateInterface (Details) +> namespace: **VDM\Joomla\Interfaces\Data** +> extends: **** +```uml +@startuml +interface UpdateInterface #Lavender { + + table(?string $table) : self + + value(mixed $value, string $field, ...) : bool + + row(array $item, string $key = 'guid') : bool + + rows(?array $items, string $key = 'guid') : bool + + item(object $item, string $key = 'guid') : bool + + items(?array $items, string $key = 'guid') : bool + + getTable() : string +} + +note right of UpdateInterface::table + Set the current active table + + since: 3.2.2 + return: self +end note + +note right of UpdateInterface::value + Update 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 UpdateInterface::row + Update single row with multiple values to a given table +Example: $this->item(Array); + + since: 3.2.0 + return: bool +end note + +note right of UpdateInterface::rows + Update multiple rows to a given table +Example: $this->items(Array); + + since: 3.2.0 + return: bool +end note + +note right of UpdateInterface::item + Update single item with multiple values to a given table +Example: $this->item(Object); + + since: 3.2.0 + return: bool +end note + +note right of UpdateInterface::items + Update multiple items to a given table +Example: $this->items(Array); + + since: 3.2.0 + return: bool +end note + +note right of UpdateInterface::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) + diff --git a/src/68a41264-64c0-441a-a3d8-8a5e557b1883/code.php b/src/68a41264-64c0-441a-a3d8-8a5e557b1883/code.php new file mode 100644 index 0000000..02b91e6 --- /dev/null +++ b/src/68a41264-64c0-441a-a3d8-8a5e557b1883/code.php @@ -0,0 +1,102 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Interfaces\Data; + + +/** + * Data Update + * + * @since 3.2.2 + */ +interface UpdateInterface +{ + /** + * 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; + + /** + * Update 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; + + /** + * Update single row with multiple values to a given table + * Example: $this->item(Array); + * + * @param array $item The item to save + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function row(array $item, string $key = 'guid'): bool; + + /** + * Update multiple rows to a given table + * Example: $this->items(Array); + * + * @param array|null $items The items updated in database (array of arrays) + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function rows(?array $items, string $key = 'guid'): bool; + + /** + * Update single item with multiple values to a given table + * Example: $this->item(Object); + * + * @param object $item The item to save + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function item(object $item, string $key = 'guid'): bool; + + /** + * Update multiple items to a given table + * Example: $this->items(Array); + * + * @param array|null $items The items updated in database (array of objects) + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function items(?array $items, string $key = 'guid'): bool; + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string; +} + diff --git a/src/68a41264-64c0-441a-a3d8-8a5e557b1883/code.power b/src/68a41264-64c0-441a-a3d8-8a5e557b1883/code.power new file mode 100644 index 0000000..bdbe810 --- /dev/null +++ b/src/68a41264-64c0-441a-a3d8-8a5e557b1883/code.power @@ -0,0 +1,79 @@ + /** + * 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; + + /** + * Update 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; + + /** + * Update single row with multiple values to a given table + * Example: $this->item(Array); + * + * @param array $item The item to save + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function row(array $item, string $key = 'guid'): bool; + + /** + * Update multiple rows to a given table + * Example: $this->items(Array); + * + * @param array|null $items The items updated in database (array of arrays) + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function rows(?array $items, string $key = 'guid'): bool; + + /** + * Update single item with multiple values to a given table + * Example: $this->item(Object); + * + * @param object $item The item to save + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function item(object $item, string $key = 'guid'): bool; + + /** + * Update multiple items to a given table + * Example: $this->items(Array); + * + * @param array|null $items The items updated in database (array of objects) + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function items(?array $items, string $key = 'guid'): bool; + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string; \ No newline at end of file diff --git a/src/68a41264-64c0-441a-a3d8-8a5e557b1883/settings.json b/src/68a41264-64c0-441a-a3d8-8a5e557b1883/settings.json new file mode 100644 index 0000000..7aad3a3 --- /dev/null +++ b/src/68a41264-64c0-441a-a3d8-8a5e557b1883/settings.json @@ -0,0 +1,19 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "", + "guid": "68a41264-64c0-441a-a3d8-8a5e557b1883", + "implements": null, + "load_selection": null, + "name": "UpdateInterface", + "power_version": "1.0.0", + "system_name": "VDM.Interfaces.Data.UpdateInterface", + "type": "interface", + "use_selection": null, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Data.UpdateInterface", + "description": "Data Update\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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/README.md b/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/README.md index 3d9d068..511ce6d 100644 --- a/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/README.md +++ b/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class Database (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction** +> namespace: **VDM\Joomla\Abstraction** +> extends: **** ```uml @startuml abstract Database #Orange { diff --git a/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/code.php b/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/code.php index d7b98b1..7e2a216 100644 --- a/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/code.php +++ b/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/code.php @@ -9,11 +9,11 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Abstraction; +namespace VDM\Joomla\Abstraction; use Joomla\CMS\Factory as JoomlaFactory; -use VastDevelopmentMethod\Joomla\Utilities\Component\Helper; +use VDM\Joomla\Utilities\Component\Helper; /** diff --git a/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/settings.json b/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/settings.json index d2121fc..971bbde 100644 --- a/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/settings.json +++ b/src/6cbef8f8-4813-48e3-b05a-65e1aea95171/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "6cbef8f8-4813-48e3-b05a-65e1aea95171", "implements": null, "load_selection": null, @@ -15,6 +15,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Database", "description": "Database\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/README.md b/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/README.md index 46e44cc..5cfc97d 100644 --- a/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/README.md +++ b/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # interface UpdateInterface (Details) -> namespace: **VastDevelopmentMethod\Joomla\Interfaces** +> namespace: **VDM\Joomla\Interfaces** +> extends: **** ```uml @startuml interface UpdateInterface #Lavender { diff --git a/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/code.php b/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/code.php index 6b80a0f..3e43b16 100644 --- a/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/code.php +++ b/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Interfaces; +namespace VDM\Joomla\Interfaces; /** diff --git a/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/settings.json b/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/settings.json index 3fc53be..eb033f6 100644 --- a/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/settings.json +++ b/src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "7179fde6-1e51-4b51-8545-7ca18f74a0f4", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Interfaces.UpdateInterface", "type": "interface", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.UpdateInterface", "description": "Database Update Interface\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/7212e4db-371f-4cfd-8122-32e9bb100d83/README.md b/src/7212e4db-371f-4cfd-8122-32e9bb100d83/README.md new file mode 100644 index 0000000..cf60bab --- /dev/null +++ b/src/7212e4db-371f-4cfd-8122-32e9bb100d83/README.md @@ -0,0 +1,83 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# interface ItemsInterface (Details) +> namespace: **VDM\Joomla\Interfaces\Data** +> extends: **** +```uml +@startuml +interface ItemsInterface #Lavender { + + 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 +} + +note right of ItemsInterface::table + Set the current active table + + since: 3.2.2 + return: self +end note + +note right of ItemsInterface::get + Get list of items + + since: 3.2.2 + return: ?array +end note + +note right of ItemsInterface::values + Get the values + + since: 3.2.2 + return: ?array + + arguments: + array $values + string $key = 'guid' + string $get = 'id' +end note + +note right of ItemsInterface::set + Set items + + since: 3.2.2 + return: bool +end note + +note right of ItemsInterface::delete + Delete items + + since: 3.2.2 + return: bool +end note + +note right of ItemsInterface::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) + diff --git a/src/7212e4db-371f-4cfd-8122-32e9bb100d83/code.php b/src/7212e4db-371f-4cfd-8122-32e9bb100d83/code.php new file mode 100644 index 0000000..62e2f08 --- /dev/null +++ b/src/7212e4db-371f-4cfd-8122-32e9bb100d83/code.php @@ -0,0 +1,85 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Interfaces\Data; + + +/** + * Data Items Interface + * + * @since 3.2.2 + */ +interface ItemsInterface +{ + /** + * 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 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string; +} + diff --git a/src/7212e4db-371f-4cfd-8122-32e9bb100d83/code.power b/src/7212e4db-371f-4cfd-8122-32e9bb100d83/code.power new file mode 100644 index 0000000..4723bb1 --- /dev/null +++ b/src/7212e4db-371f-4cfd-8122-32e9bb100d83/code.power @@ -0,0 +1,62 @@ + /** + * 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 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string; \ No newline at end of file diff --git a/src/7212e4db-371f-4cfd-8122-32e9bb100d83/settings.json b/src/7212e4db-371f-4cfd-8122-32e9bb100d83/settings.json new file mode 100644 index 0000000..262d121 --- /dev/null +++ b/src/7212e4db-371f-4cfd-8122-32e9bb100d83/settings.json @@ -0,0 +1,19 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "", + "guid": "7212e4db-371f-4cfd-8122-32e9bb100d83", + "implements": null, + "load_selection": null, + "name": "ItemsInterface", + "power_version": "1.0.0", + "system_name": "VDM.Interfaces.Data.ItemsInterface", + "type": "interface", + "use_selection": null, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Data.ItemsInterface", + "description": "Data Items 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/728ee726-3f0f-4762-899d-f8c9430cee58/README.md b/src/728ee726-3f0f-4762-899d-f8c9430cee58/README.md new file mode 100644 index 0000000..66a343e --- /dev/null +++ b/src/728ee726-3f0f-4762-899d-f8c9430cee58/README.md @@ -0,0 +1,90 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# class Remote (Details) +> namespace: **VDM\Joomla\Data** +> extends: **** +```uml +@startuml +class Remote #Gold { + # Grep $grep + # Item $item + # string $table + + __construct(Grep $grep, Item $item, ...) + + table(string $table) : self + + init() : bool + + reset(array $items) : bool + + load(string $guid, array $order = ['remote', 'local'], ...) : bool + + getTable() : string +} + +note right of Remote::__construct + Constructor. + + since: 3.2.0 + + arguments: + Grep $grep + Item $item + ?string $table = null +end note + +note right of Remote::table + Set the current active table + + since: 3.2.2 + return: self +end note + +note right of Remote::init + Init all items not found in database + + since: 3.2.0 + return: bool +end note + +note right of Remote::reset + Reset the items + + since: 3.2.0 + return: bool +end note + +note right of Remote::load + Load a item + + since: 3.2.0 + return: bool + + arguments: + string $guid + array $order = ['remote', 'local'] + ?string $action = null +end note + +note right of Remote::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) + diff --git a/src/728ee726-3f0f-4762-899d-f8c9430cee58/code.php b/src/728ee726-3f0f-4762-899d-f8c9430cee58/code.php new file mode 100644 index 0000000..70e987a --- /dev/null +++ b/src/728ee726-3f0f-4762-899d-f8c9430cee58/code.php @@ -0,0 +1,169 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Data; + + +use VDM\Joomla\Interfaces\GrepInterface as Grep; +use VDM\Joomla\Interfaces\Data\ItemInterface as Item; +use VDM\Joomla\Interfaces\Data\RemoteInterface; + + +/** + * Load data based on global unique ids from remote system + * + * @since 3.2.0 + */ +class Remote implements RemoteInterface +{ + /** + * The Grep Class. + * + * @var Grep + * @since 3.2.0 + */ + protected Grep $grep; + + /** + * The Item Class. + * + * @var Item + * @since 3.2.0 + */ + protected Item $item; + + /** + * Table Name + * + * @var string + * @since 3.2.1 + */ + protected string $table; + + /** + * Constructor. + * + * @param Grep $grep The GrepInterface Class. + * @param Item $item The ItemInterface Class. + * @param string|null $table The table name. + * + * @since 3.2.0 + */ + public function __construct(Grep $grep, Item $item, ?string $table = null) + { + $this->grep = $grep; + $this->item = $item; + 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; + } + + /** + * Init all items not found in database + * + * @return bool + * @since 3.2.0 + */ + public function init(): bool + { + if (($items = $this->grep->getRemotePowersGuid()) !== null) + { + foreach($items as $guid) + { + if ($this->item->table($this->getTable())->value($guid) !== null && + ($item = $this->grep->get($guid, ['remote'])) !== null) + { + $this->item->set($item); + } + } + + return true; + } + + return false; + } + + /** + * 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 + { + if ($items === []) + { + return false; + } + + $success = true; + + foreach($items as $guid) + { + if (!$this->load($guid, ['remote'])) + { + $success = false; + } + } + + return $success; + } + + /** + * Load a item + * + * @param string $guid The global unique id of the item + * @param array $order The search order + * @param string|null $action The action to load power + * + * @return bool + * @since 3.2.0 + */ + public function load(string $guid, array $order = ['remote', 'local'], ?string $action = null): bool + { + if (($item = $this->grep->get($guid, $order)) !== null) + { + return $this->item->table($this->getTable())->set($item); + } + + return false; + } + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string + { + return $this->table; + } +} + diff --git a/src/728ee726-3f0f-4762-899d-f8c9430cee58/code.power b/src/728ee726-3f0f-4762-899d-f8c9430cee58/code.power new file mode 100644 index 0000000..8b6c476 --- /dev/null +++ b/src/728ee726-3f0f-4762-899d-f8c9430cee58/code.power @@ -0,0 +1,141 @@ + /** + * The Grep Class. + * + * @var Grep + * @since 3.2.0 + */ + protected Grep $grep; + + /** + * The Item Class. + * + * @var Item + * @since 3.2.0 + */ + protected Item $item; + + /** + * Table Name + * + * @var string + * @since 3.2.1 + */ + protected string $table; + + /** + * Constructor. + * + * @param Grep $grep The GrepInterface Class. + * @param Item $item The ItemInterface Class. + * @param string|null $table The table name. + * + * @since 3.2.0 + */ + public function __construct(Grep $grep, Item $item, ?string $table = null) + { + $this->grep = $grep; + $this->item = $item; + 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; + } + + /** + * Init all items not found in database + * + * @return bool + * @since 3.2.0 + */ + public function init(): bool + { + if (($items = $this->grep->getRemotePowersGuid()) !== null) + { + foreach($items as $guid) + { + if ($this->item->table($this->getTable())->value($guid) !== null && + ($item = $this->grep->get($guid, ['remote'])) !== null) + { + $this->item->set($item); + } + } + + return true; + } + + return false; + } + + /** + * 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 + { + if ($items === []) + { + return false; + } + + $success = true; + + foreach($items as $guid) + { + if (!$this->load($guid, ['remote'])) + { + $success = false; + } + } + + return $success; + } + + /** + * Load a item + * + * @param string $guid The global unique id of the item + * @param array $order The search order + * @param string|null $action The action to load power + * + * @return bool + * @since 3.2.0 + */ + public function load(string $guid, array $order = ['remote', 'local'], ?string $action = null): bool + { + if (($item = $this->grep->get($guid, $order)) !== null) + { + return $this->item->table($this->getTable())->set($item); + } + + return false; + } + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string + { + return $this->table; + } \ No newline at end of file diff --git a/src/728ee726-3f0f-4762-899d-f8c9430cee58/settings.json b/src/728ee726-3f0f-4762-899d-f8c9430cee58/settings.json new file mode 100644 index 0000000..7bf9e0a --- /dev/null +++ b/src/728ee726-3f0f-4762-899d-f8c9430cee58/settings.json @@ -0,0 +1,30 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "", + "guid": "728ee726-3f0f-4762-899d-f8c9430cee58", + "implements": [ + "51de80f2-2868-4c2c-8198-ef79349e9bd7" + ], + "load_selection": null, + "name": "Remote", + "power_version": "1.0.0", + "system_name": "VDM.Data.Remote", + "type": "class", + "use_selection": { + "use_selection0": { + "use": "c182506a-ab84-439c-b962-1e606b58d545", + "as": "Grep" + }, + "use_selection1": { + "use": "05744dd3-4030-4cf8-8dda-a93ab809b473", + "as": "Item" + } + }, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Data.Remote", + "description": "Load data based on global unique ids from remote system\r\n\r\n@since 3.2.0", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/README.md b/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/README.md new file mode 100644 index 0000000..ea0aa62 --- /dev/null +++ b/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/README.md @@ -0,0 +1,70 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# final class Upsert (Details) +> namespace: **VDM\Joomla\Model** +> extends: **Model** +```uml +@startuml +class Upsert << (F,LightGreen) >> #RoyalBlue { + + value(mixed $value, string $field, ...) : mixed + # validateBefore(mixed $value, ?string $field = null, ...) : bool + # validateAfter(mixed $value, ?string $field = null, ...) : bool +} + +note right of Upsert::value + Model the value +Example: $this->value(value, 'field_key', 'table_name'); + + since: 3.2.0 + return: mixed + + arguments: + mixed $value + string $field + ?string $table = null +end note + +note right of Upsert::validateBefore + Validate before the value is modelled + + since: 3.2.0 + return: bool + + arguments: + mixed $value + ?string $field = null + ?string $table = null +end note + +note right of Upsert::validateAfter + Validate after the value is modelled + + since: 3.2.0 + return: bool + + arguments: + mixed $value + ?string $field = null + ?string $table = null +end note + +@enduml +``` + +--- +``` + ██╗ ██████╗██████╗ + ██║██╔════╝██╔══██╗ + ██║██║ ██████╔╝ +██ ██║██║ ██╔══██╗ +╚█████╔╝╚██████╗██████╔╝ + ╚════╝ ╚═════╝╚═════╝ +``` +> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) + diff --git a/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.php b/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.php new file mode 100644 index 0000000..b9111e7 --- /dev/null +++ b/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.php @@ -0,0 +1,118 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Model; + + +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Interfaces\ModelInterface; +use VDM\Joomla\Abstraction\Model; + + +/** + * Power Model Update or Insert + * + * @since 3.2.0 + */ +final class Upsert extends Model implements ModelInterface +{ + /** + * Model the value + * Example: $this->value(value, 'field_key', 'table_name'); + * + * @param mixed $value The value to model + * @param string $field The field key + * @param string|null $table The table + * + * @return mixed + * @since 3.2.0 + */ + public function value($value, string $field, ?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->getTable(); + } + + // check if this is a valid table + if (($store = $this->table->get($table, $field, 'store')) !== null) + { + // open the value based on the store method + switch($store) + { + case 'base64': + $value = base64_encode((string) $value); + break; + case 'json': + $value = json_encode($value, JSON_FORCE_OBJECT); + break; + } + } + + return $value; + } + + /** + * Validate before the value is modelled + * + * @param mixed $value The field value + * @param string|null $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + protected function validateBefore(&$value, ?string $field = null, ?string $table = null): bool + { + // check values + if (StringHelper::check($value) || ArrayHelper::check($value, true) || ObjectHelper::check($value) || is_numeric($value)) + { + return true; + } + // check if we allow empty + elseif ($this->getAllowEmpty() && empty($value)) + { + return true; + } + // remove empty values + return false; + } + + /** + * Validate after the value is modelled + * + * @param mixed $value The field value + * @param string|null $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool + { + // only strings or numbers allowed + if (StringHelper::check($value) || is_numeric($value)) + { + return true; + } + // check if we allow empty + elseif ($this->getAllowEmpty() && empty($value)) + { + return true; + } + // remove empty values + return false; + } +} + diff --git a/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.power b/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.power new file mode 100644 index 0000000..6363259 --- /dev/null +++ b/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/code.power @@ -0,0 +1,88 @@ + /** + * Model the value + * Example: $this->value(value, 'field_key', 'table_name'); + * + * @param mixed $value The value to model + * @param string $field The field key + * @param string|null $table The table + * + * @return mixed + * @since 3.2.0 + */ + public function value($value, string $field, ?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->getTable(); + } + + // check if this is a valid table + if (($store = $this->table->get($table, $field, 'store')) !== null) + { + // open the value based on the store method + switch($store) + { + case 'base64': + $value = base64_encode((string) $value); + break; + case 'json': + $value = json_encode($value, JSON_FORCE_OBJECT); + break; + } + } + + return $value; + } + + /** + * Validate before the value is modelled + * + * @param mixed $value The field value + * @param string|null $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + protected function validateBefore(&$value, ?string $field = null, ?string $table = null): bool + { + // check values + if (StringHelper::check($value) || ArrayHelper::check($value, true) || ObjectHelper::check($value) || is_numeric($value)) + { + return true; + } + // check if we allow empty + elseif ($this->getAllowEmpty() && empty($value)) + { + return true; + } + // remove empty values + return false; + } + + /** + * Validate after the value is modelled + * + * @param mixed $value The field value + * @param string|null $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool + { + // only strings or numbers allowed + if (StringHelper::check($value) || is_numeric($value)) + { + return true; + } + // check if we allow empty + elseif ($this->getAllowEmpty() && empty($value)) + { + return true; + } + // remove empty values + return false; + } \ No newline at end of file diff --git a/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/settings.json b/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/settings.json new file mode 100644 index 0000000..2236158 --- /dev/null +++ b/src/7c1fb50f-8fb1-4627-8705-6fedf7182ca5/settings.json @@ -0,0 +1,34 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "584747d1-3a86-453d-b7a3-a2219de8d777", + "guid": "7c1fb50f-8fb1-4627-8705-6fedf7182ca5", + "implements": [ + "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff" + ], + "load_selection": null, + "name": "Upsert", + "power_version": "1.0.0", + "system_name": "VDM.Model.Upsert", + "type": "final class", + "use_selection": { + "use_selection0": { + "use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef", + "as": "default" + }, + "use_selection1": { + "use": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a", + "as": "default" + }, + "use_selection2": { + "use": "91004529-94a9-4590-b842-e7c6b624ecf5", + "as": "default" + } + }, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Model.Upsert", + "description": "Power Model Update or Insert\r\n\r\n@since 3.2.0", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/README.md b/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/README.md index 373652c..320d535 100644 --- a/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/README.md +++ b/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # trait ToString (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** +> namespace: **VDM\Joomla\Abstraction\Registry\Traits** +> extends: **** ```uml @startuml class ToString << (T,Orange) >> #Turquoise { diff --git a/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/code.php b/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/code.php index 7a268d6..285f709 100644 --- a/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/code.php +++ b/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits; +namespace VDM\Joomla\Abstraction\Registry\Traits; /** diff --git a/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/settings.json b/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/settings.json index a418f91..b46475d 100644 --- a/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/settings.json +++ b/src/7d494d91-ab60-43cd-aecf-d50e07f7f30e/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "7d494d91-ab60-43cd-aecf-d50e07f7f30e", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Abstraction.Registry.Traits.ToString", "type": "trait", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.ToString", "description": "To 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/README.md b/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/README.md index b43b580..e12fcad 100644 --- a/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/README.md +++ b/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/README.md @@ -7,7 +7,7 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class Registry (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction** +> namespace: **VDM\Joomla\Abstraction** > extends: **ActiveRegistry** ```uml @startuml diff --git a/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/code.php b/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/code.php index 1610d42..e48829a 100644 --- a/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/code.php +++ b/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/code.php @@ -9,12 +9,11 @@ * @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 VastDevelopmentMethod\Joomla\Interfaces\Registryinterface; -use VastDevelopmentMethod\Joomla\Abstraction\ActiveRegistry; +use VDM\Joomla\Interfaces\Registryinterface; +use VDM\Joomla\Abstraction\ActiveRegistry; /** @@ -24,7 +23,7 @@ use VastDevelopmentMethod\Joomla\Abstraction\ActiveRegistry; * * @since 3.2.0 */ -abstract class Registry extends ActiveRegistry implements Activeregistryinterface, Registryinterface +abstract class Registry extends ActiveRegistry implements Registryinterface { /** * Path separator diff --git a/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/settings.json b/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/settings.json index 20820e6..b1ebdec 100644 --- a/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/settings.json +++ b/src/7e822c03-1b20-41d1-9427-f5b8d5836af7/settings.json @@ -4,7 +4,6 @@ "extends": "43134867-5cb8-4280-9be8-309fd2fd135f", "guid": "7e822c03-1b20-41d1-9427-f5b8d5836af7", "implements": [ - "af0eedbe-603b-4671-8e5a-28165d88254b", "64e291c2-11f1-423d-a44d-837cc12cc017" ], "load_selection": null, @@ -13,6 +12,7 @@ "system_name": "VDM.Abstraction.Registry", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry", "description": "VDM Basic 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/85785701-07b2-4f81-bc1e-0f423700c254/README.md b/src/85785701-07b2-4f81-bc1e-0f423700c254/README.md new file mode 100644 index 0000000..4c4eb31 --- /dev/null +++ b/src/85785701-07b2-4f81-bc1e-0f423700c254/README.md @@ -0,0 +1,112 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# class Subform (Details) +> namespace: **VDM\Joomla\Data** +> extends: **** +```uml +@startuml +class Subform #Gold { + # Items $items + # string $table + + __construct(Items $items, ?string $table = null) + + table(string $table) : self + + get(string $value, string $key, ...) : ?array + + set(array $items, string $key) : bool + + getTable() : string + - converter(array $items, array $keySet, ...) : array + - process(array $items, string $key) : array + - setGuid(string $key, bool $trim = true) : string +} + +note right of Subform::__construct + Constructor. + + since: 3.2.2 +end note + +note left of Subform::table + Set the current active table + + since: 3.2.2 + return: self +end note + +note right of Subform::get + Get a subform items + + since: 3.2.2 + return: ?array + + arguments: + string $value + string $key + string $field + array $set +end note + +note left of Subform::set + Set a subform items + + since: 3.2.2 + return: bool +end note + +note right of Subform::getTable + Get the current active table + + since: 3.2.2 + return: string +end note + +note left of Subform::converter + Filters the specified keys from an array of objects or arrays, converts them to arrays, +and sets them by association with a specified key and an incrementing integer. + + since: 3.2.2 + return: array + + arguments: + array $items + array $keySet + string $key +end note + +note right of Subform::process + Processes an array of arrays based on the specified key. + + since: 3.2.2 + return: array +end note + +note left of Subform::setGuid + Returns a GUIDv4 string +Thanks to Dave Pearson (and other) +https://www.php.net/manual/en/function.com-create-guid.php#119168 +Uses the best cryptographically secure method +for all supported platforms with fallback to an older, +less secure version. + + since: 3.0.9 + return: string +end note + +@enduml +``` + +--- +``` + ██╗ ██████╗██████╗ + ██║██╔════╝██╔══██╗ + ██║██║ ██████╔╝ +██ ██║██║ ██╔══██╗ +╚█████╔╝╚██████╗██████╔╝ + ╚════╝ ╚═════╝╚═════╝ +``` +> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) + diff --git a/src/85785701-07b2-4f81-bc1e-0f423700c254/code.php b/src/85785701-07b2-4f81-bc1e-0f423700c254/code.php new file mode 100644 index 0000000..168acfe --- /dev/null +++ b/src/85785701-07b2-4f81-bc1e-0f423700c254/code.php @@ -0,0 +1,265 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Data; + + +use VDM\Joomla\Interfaces\Data\ItemsInterface as Items; +use VDM\Joomla\Interfaces\Data\SubformInterface; + + +/** + * Store the data of a sub-form + * + * @since 3.2.2 + */ +class Subform implements SubformInterface +{ + /** + * The ItemsInterface Class. + * + * @var Items + * @since 3.2.2 + */ + protected Items $items; + + /** + * Table Name + * + * @var string + * @since 3.2.1 + */ + protected string $table; + + /** + * Constructor. + * + * @param Items $items The ItemsInterface Class. + * @param string|null $table The table name. + * + * @since 3.2.2 + */ + public function __construct(Items $items, ?string $table = null) + { + $this->items = $items; + 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 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 + { + if (($items = $this->items->table($this->getTable())->get([$value], $key)) !== null) + { + return $this->converter($items, $set, $field); + } + return null; + } + + /** + * 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 + { + return $this->items->table($this->getTable())->set( + $this->process($items, $key), $key + ); + } + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string + { + return $this->table; + } + + /** + * Filters the specified keys from an array of objects or arrays, converts them to arrays, + * and sets them by association with a specified key and an incrementing integer. + * + * @param array $items Array of objects or arrays to be filtered. + * @param array $keySet Array of keys to retain in each item. + * @param string $key The key prefix for the resulting associative array. + * + * @return array Array of filtered arrays set by association. + * @since 3.2.2 + */ + private function converter(array $items, array $keySet, string $key): array + { + /** + * Filters keys for a single item and converts it to an array. + * + * @param object|array $item The item to filter. + * @param array $keySet The keys to retain. + * + * @return array The filtered array. + * @since 3.2.2 + */ + $filterKeys = function ($item, array $keySet) { + $filteredArray = []; + foreach ($keySet as $key) { + if (is_object($item) && property_exists($item, $key)) { + $filteredArray[$key] = $item->$key; + } elseif (is_array($item) && array_key_exists($key, $item)) { + $filteredArray[$key] = $item[$key]; + } + } + return $filteredArray; + }; + + $result = []; + foreach ($items as $index => $item) + { + $filteredArray = $filterKeys($item, $keySet); + $result[$key . $index] = $filteredArray; + } + + return $result; + } + + /** + * Processes an array of arrays based on the specified key. + * + * @param array $items Array of arrays to be processed. + * @param string $key The key to check and modify values. + * + * @return array The processed array of arrays. + * @since 3.2.2 + */ + private function process(array $items, string $key): array + { + foreach ($items as &$item) + { + $value = $item[$key] ?? ''; + switch ($key) { + case 'guid': + if (empty($value)) + { + $item[$key] = $this->setGuid($key); + } + break; + case 'id': + if ($value === '') + { + $item[$key] = 0; + } + break; + default: + // No action for other keys if empty + break; + } + } + + return array_values($items); + } + + /** + * Returns a GUIDv4 string + * + * Thanks to Dave Pearson (and other) + * https://www.php.net/manual/en/function.com-create-guid.php#119168 + * + * Uses the best cryptographically secure method + * for all supported platforms with fallback to an older, + * less secure version. + * + * @param string $key The key to check and modify values. + * @param bool $trim + * + * @return string + * + * @since 3.0.9 + */ + private function setGuid(string $key, bool $trim = true): string + { + // Windows + if (function_exists('com_create_guid')) + { + if ($trim) + { + return trim(\com_create_guid(), '{}'); + } + return \com_create_guid(); + } + + // set the braces if needed + $lbrace = $trim ? "" : chr(123); // "{" + $rbrace = $trim ? "" : chr(125); // "}" + + // OSX/Linux + if (function_exists('openssl_random_pseudo_bytes')) + { + $data = \openssl_random_pseudo_bytes(16); + $data[6] = chr( ord($data[6]) & 0x0f | 0x40); // set version to 0100 + $data[8] = chr( ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10 + return $lbrace . vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)) . $lbrace; + } + + // Fallback (PHP 4.2+) + mt_srand((double) microtime() * 10000); + $charid = strtolower( md5( uniqid( rand(), true))); + $hyphen = chr(45); // "-" + $guidv4 = $lbrace. + substr($charid, 0, 8). $hyphen. + substr($charid, 8, 4). $hyphen. + substr($charid, 12, 4). $hyphen. + substr($charid, 16, 4). $hyphen. + substr($charid, 20, 12). + $rbrace; + + // check that it does not already exist (one in a billion chance ;) + // but we do it any way... + if ($this->items->table($this->getTable())->values([$guidv4], $key)) + { + return $this->setGuid($key); + } + + return $guidv4; + } +} + diff --git a/src/85785701-07b2-4f81-bc1e-0f423700c254/code.power b/src/85785701-07b2-4f81-bc1e-0f423700c254/code.power new file mode 100644 index 0000000..a428546 --- /dev/null +++ b/src/85785701-07b2-4f81-bc1e-0f423700c254/code.power @@ -0,0 +1,238 @@ + /** + * The ItemsInterface Class. + * + * @var Items + * @since 3.2.2 + */ + protected Items $items; + + /** + * Table Name + * + * @var string + * @since 3.2.1 + */ + protected string $table; + + /** + * Constructor. + * + * @param Items $items The ItemsInterface Class. + * @param string|null $table The table name. + * + * @since 3.2.2 + */ + public function __construct(Items $items, ?string $table = null) + { + $this->items = $items; + 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 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 + { + if (($items = $this->items->table($this->getTable())->get([$value], $key)) !== null) + { + return $this->converter($items, $set, $field); + } + return null; + } + + /** + * 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 + { + return $this->items->table($this->getTable())->set( + $this->process($items, $key), $key + ); + } + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string + { + return $this->table; + } + + /** + * Filters the specified keys from an array of objects or arrays, converts them to arrays, + * and sets them by association with a specified key and an incrementing integer. + * + * @param array $items Array of objects or arrays to be filtered. + * @param array $keySet Array of keys to retain in each item. + * @param string $key The key prefix for the resulting associative array. + * + * @return array Array of filtered arrays set by association. + * @since 3.2.2 + */ + private function converter(array $items, array $keySet, string $key): array + { + /** + * Filters keys for a single item and converts it to an array. + * + * @param object|array $item The item to filter. + * @param array $keySet The keys to retain. + * + * @return array The filtered array. + * @since 3.2.2 + */ + $filterKeys = function ($item, array $keySet) { + $filteredArray = []; + foreach ($keySet as $key) { + if (is_object($item) && property_exists($item, $key)) { + $filteredArray[$key] = $item->$key; + } elseif (is_array($item) && array_key_exists($key, $item)) { + $filteredArray[$key] = $item[$key]; + } + } + return $filteredArray; + }; + + $result = []; + foreach ($items as $index => $item) + { + $filteredArray = $filterKeys($item, $keySet); + $result[$key . $index] = $filteredArray; + } + + return $result; + } + + /** + * Processes an array of arrays based on the specified key. + * + * @param array $items Array of arrays to be processed. + * @param string $key The key to check and modify values. + * + * @return array The processed array of arrays. + * @since 3.2.2 + */ + private function process(array $items, string $key): array + { + foreach ($items as &$item) + { + $value = $item[$key] ?? ''; + switch ($key) { + case 'guid': + if (empty($value)) + { + $item[$key] = $this->setGuid($key); + } + break; + case 'id': + if ($value === '') + { + $item[$key] = 0; + } + break; + default: + // No action for other keys if empty + break; + } + } + + return array_values($items); + } + + /** + * Returns a GUIDv4 string + * + * Thanks to Dave Pearson (and other) + * https://www.php.net/manual/en/function.com-create-guid.php#119168 + * + * Uses the best cryptographically secure method + * for all supported platforms with fallback to an older, + * less secure version. + * + * @param string $key The key to check and modify values. + * @param bool $trim + * + * @return string + * + * @since 3.0.9 + */ + private function setGuid(string $key, bool $trim = true): string + { + // Windows + if (function_exists('com_create_guid')) + { + if ($trim) + { + return trim(\com_create_guid(), '{}'); + } + return \com_create_guid(); + } + + // set the braces if needed + $lbrace = $trim ? "" : chr(123); // "{" + $rbrace = $trim ? "" : chr(125); // "}" + + // OSX/Linux + if (function_exists('openssl_random_pseudo_bytes')) + { + $data = \openssl_random_pseudo_bytes(16); + $data[6] = chr( ord($data[6]) & 0x0f | 0x40); // set version to 0100 + $data[8] = chr( ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10 + return $lbrace . vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)) . $lbrace; + } + + // Fallback (PHP 4.2+) + mt_srand((double) microtime() * 10000); + $charid = strtolower( md5( uniqid( rand(), true))); + $hyphen = chr(45); // "-" + $guidv4 = $lbrace. + substr($charid, 0, 8). $hyphen. + substr($charid, 8, 4). $hyphen. + substr($charid, 12, 4). $hyphen. + substr($charid, 16, 4). $hyphen. + substr($charid, 20, 12). + $rbrace; + + // check that it does not already exist (one in a billion chance ;) + // but we do it any way... + if ($this->items->table($this->getTable())->values([$guidv4], $key)) + { + return $this->setGuid($key); + } + + return $guidv4; + } \ No newline at end of file diff --git a/src/85785701-07b2-4f81-bc1e-0f423700c254/settings.json b/src/85785701-07b2-4f81-bc1e-0f423700c254/settings.json new file mode 100644 index 0000000..0ebe116 --- /dev/null +++ b/src/85785701-07b2-4f81-bc1e-0f423700c254/settings.json @@ -0,0 +1,26 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "", + "guid": "85785701-07b2-4f81-bc1e-0f423700c254", + "implements": [ + "34959721-415b-4b5e-8002-3d1fc84b3b2b" + ], + "load_selection": null, + "name": "Subform", + "power_version": "1.0.0", + "system_name": "VDM.Data.Subform", + "type": "class", + "use_selection": { + "use_selection0": { + "use": "7212e4db-371f-4cfd-8122-32e9bb100d83", + "as": "Items" + } + }, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Data.Subform", + "description": "Store the data of a sub-form\r\n\r\n@since 3.2.2", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/README.md b/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/README.md index 01ced36..fd4cc1e 100644 --- a/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/README.md +++ b/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/README.md @@ -7,19 +7,30 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # interface ModelInterface (Details) -> namespace: **VastDevelopmentMethod\Joomla\Interfaces** +> namespace: **VDM\Joomla\Interfaces** +> extends: **** ```uml @startuml interface ModelInterface #Lavender { + + table(string $table) : self + 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 - + row(array $item, ?string $table = null) : ?array + + row(?array $item, ?string $table = null) : ?array + rows(?array $items = null, ?string $table = null) : ?array + last(?string $table = null) : ?int + + setTable(string $tableName) : void + + setAllowEmpty(bool $allowEmpty) : void } -note right of ModelInterface::value +note right of ModelInterface::table + Set the current active table + + since: 3.2.2 + return: self +end note + +note left of ModelInterface::value Model the value Example: $this->value(value, 'value_key', 'table_name'); @@ -40,7 +51,7 @@ Example: $this->item(Object, 'table_name'); return: ?object end note -note right of ModelInterface::items +note left of ModelInterface::items Model the values of multiple items Example: $this->items(Array, 'table_name'); @@ -56,7 +67,7 @@ Example: $this->item(Array, 'table_name'); return: ?array end note -note right of ModelInterface::rows +note left of ModelInterface::rows Model the values of multiple rows Example: $this->items(Array, 'table_name'); @@ -71,6 +82,20 @@ Example: $this->last('table_name'); since: 3.2.0 return: ?int end note + +note left of ModelInterface::setTable + Set the current active table + + since: 3.2.2 + return: void +end note + +note right of ModelInterface::setAllowEmpty + Set the switch to control the behaviour of empty values + + since: 3.2.2 + return: void +end note @enduml ``` diff --git a/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/code.php b/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/code.php index 180974d..c93e80a 100644 --- a/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/code.php +++ b/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Interfaces; +namespace VDM\Joomla\Interfaces; /** @@ -19,6 +19,16 @@ namespace VastDevelopmentMethod\Joomla\Interfaces; */ interface ModelInterface { + /** + * 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; + /** * Model the value * Example: $this->value(value, 'value_key', 'table_name'); @@ -36,13 +46,13 @@ interface ModelInterface * Model the values of an item * Example: $this->item(Object, 'table_name'); * - * @param object $item The item object + * @param object|null $item The item object * @param string|null $table The table * * @return object|null * @since 3.2.0 */ - public function item(object $item, ?string $table = null): ?object; + public function item(?object $item, ?string $table = null): ?object; /** * Model the values of multiple items @@ -60,13 +70,13 @@ interface ModelInterface * Model the values of an row * Example: $this->item(Array, 'table_name'); * - * @param array $item The item array + * @param array|null $item The item array * @param string|null $table The table * * @return array|null * @since 3.2.0 */ - public function row(array $item, ?string $table = null): ?array; + public function row(?array $item, ?string $table = null): ?array; /** * Model the values of multiple rows @@ -89,6 +99,26 @@ interface ModelInterface * @return int|null * @since 3.2.0 */ - public function last(?string $table = null): ?int; + public function last(?string $table = null): ?int; + + /** + * Set the current active table + * + * @param string $tableName The table name + * + * @return void + * @since 3.2.2 + */ + public function setTable(string $tableName): void; + + /** + * 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; } diff --git a/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/code.power b/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/code.power index 043438c..1c40419 100644 --- a/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/code.power +++ b/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/code.power @@ -1,3 +1,13 @@ + /** + * 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; + /** * Model the value * Example: $this->value(value, 'value_key', 'table_name'); @@ -15,13 +25,13 @@ * Model the values of an item * Example: $this->item(Object, 'table_name'); * - * @param object $item The item object + * @param object|null $item The item object * @param string|null $table The table * * @return object|null * @since 3.2.0 */ - public function item(object $item, ?string $table = null): ?object; + public function item(?object $item, ?string $table = null): ?object; /** * Model the values of multiple items @@ -39,13 +49,13 @@ * Model the values of an row * Example: $this->item(Array, 'table_name'); * - * @param array $item The item array + * @param array|null $item The item array * @param string|null $table The table * * @return array|null * @since 3.2.0 */ - public function row(array $item, ?string $table = null): ?array; + public function row(?array $item, ?string $table = null): ?array; /** * Model the values of multiple rows @@ -68,4 +78,24 @@ * @return int|null * @since 3.2.0 */ - public function last(?string $table = null): ?int; \ No newline at end of file + public function last(?string $table = null): ?int; + + /** + * Set the current active table + * + * @param string $tableName The table name + * + * @return void + * @since 3.2.2 + */ + public function setTable(string $tableName): void; + + /** + * 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; \ No newline at end of file diff --git a/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/settings.json b/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/settings.json index 151029a..3acdd3a 100644 --- a/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/settings.json +++ b/src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Interfaces.ModelInterface", "type": "interface", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.ModelInterface", "description": "Model Interface\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/README.md b/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/README.md new file mode 100644 index 0000000..b7c19f6 --- /dev/null +++ b/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/README.md @@ -0,0 +1,112 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# class Update (Details) +> namespace: **VDM\Joomla\Data\Action** +> extends: **** +```uml +@startuml +class Update #Gold { + # Model $model + # Database $database + # string $table + + __construct(Model $model, Database $database, ...) + + table(?string $table) : self + + value(mixed $value, string $field, ...) : bool + + row(array $item, string $key = 'guid') : bool + + rows(?array $items, string $key = 'guid') : bool + + item(object $item, string $key = 'guid') : bool + + items(?array $items, string $key = 'guid') : bool + + getTable() : string +} + +note right of Update::__construct + Constructor + + since: 3.2.0 + + arguments: + Model $model + Database $database + ?string $table = null +end note + +note left of Update::table + Set the current active table + + since: 3.2.2 + return: self +end note + +note right of Update::value + Update 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 left of Update::row + Update single row with multiple values to a given table +Example: $this->item(Array); + + since: 3.2.0 + return: bool +end note + +note right of Update::rows + Update multiple rows to a given table +Example: $this->items(Array); + + since: 3.2.0 + return: bool +end note + +note left of Update::item + Update single item with multiple values to a given table +Example: $this->item(Object); + + since: 3.2.0 + return: bool +end note + +note right of Update::items + Update multiple items to a given table +Example: $this->items(Array); + + since: 3.2.0 + return: bool +end note + +note left of Update::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) + diff --git a/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/code.php b/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/code.php new file mode 100644 index 0000000..b340558 --- /dev/null +++ b/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/code.php @@ -0,0 +1,206 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Data\Action; + + +use VDM\Joomla\Interfaces\ModelInterface as Model; +use VDM\Joomla\Interfaces\UpdateInterface as Database; +use VDM\Joomla\Interfaces\Data\UpdateInterface; + + +/** + * Data Update + * + * @since 3.2.2 + */ +class Update implements UpdateInterface +{ + /** + * Model + * + * @var Model + * @since 3.2.0 + */ + protected Model $model; + + /** + * Database + * + * @var Database + * @since 3.2.0 + */ + protected Database $database; + + /** + * Table Name + * + * @var string + * @since 3.2.1 + */ + protected string $table; + + /** + * Constructor + * + * @param Model $model The set model object. + * @param Database $database The update database object. + * @param string|null $table The table name. + * + * @since 3.2.0 + */ + public function __construct(Model $model, Database $database, ?string $table = null) + { + $this->model = $model; + $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; + } + + /** + * Update 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 + { + // build the array + $item = []; + $item[$key] = $keyValue; + $item[$field] = $value; + + // Update the column of this table using $key as the primary key. + return $this->row($item, $key); + } + + /** + * Update single row with multiple values to a given table + * Example: $this->item(Array); + * + * @param array $item The item to save + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function row(array $item, string $key = 'guid'): bool + { + // check if object could be modelled + if (($item = $this->model->row($item, $this->getTable())) !== null) + { + // Update the column of this table using $key as the primary key. + return $this->database->row($item, $key, $this->getTable()); + } + return false; + } + + /** + * Update multiple rows to a given table + * Example: $this->items(Array); + * + * @param array|null $items The items updated in database (array of arrays) + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function rows(?array $items, string $key = 'guid'): bool + { + // check if object could be modelled + if (($items = $this->model->rows($items, $this->getTable())) !== null) + { + // Update the column of this table using $key as the primary key. + return $this->database->rows($items, $key, $this->getTable()); + } + return false; + } + + /** + * Update single item with multiple values to a given table + * Example: $this->item(Object); + * + * @param object $item The item to save + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function item(object $item, string $key = 'guid'): bool + { + // check if object could be modelled + if (($item = $this->model->item($item, $this->getTable())) !== null) + { + // Update the column of this table using $key as the primary key. + return $this->database->item($item, $key, $this->getTable()); + } + return false; + } + + /** + * Update multiple items to a given table + * Example: $this->items(Array); + * + * @param array|null $items The items updated in database (array of objects) + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function items(?array $items, string $key = 'guid'): bool + { + // check if object could be modelled + if (($items = $this->model->items($items, $this->getTable())) !== null) + { + // Update the column of this table using $key as the primary key. + return $this->database->items($items, $key, $this->getTable()); + } + return false; + } + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string + { + return $this->table; + } +} + diff --git a/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/code.power b/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/code.power new file mode 100644 index 0000000..30b6207 --- /dev/null +++ b/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/code.power @@ -0,0 +1,178 @@ + /** + * Model + * + * @var Model + * @since 3.2.0 + */ + protected Model $model; + + /** + * Database + * + * @var Database + * @since 3.2.0 + */ + protected Database $database; + + /** + * Table Name + * + * @var string + * @since 3.2.1 + */ + protected string $table; + + /** + * Constructor + * + * @param Model $model The set model object. + * @param Database $database The update database object. + * @param string|null $table The table name. + * + * @since 3.2.0 + */ + public function __construct(Model $model, Database $database, ?string $table = null) + { + $this->model = $model; + $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; + } + + /** + * Update 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 + { + // build the array + $item = []; + $item[$key] = $keyValue; + $item[$field] = $value; + + // Update the column of this table using $key as the primary key. + return $this->row($item, $key); + } + + /** + * Update single row with multiple values to a given table + * Example: $this->item(Array); + * + * @param array $item The item to save + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function row(array $item, string $key = 'guid'): bool + { + // check if object could be modelled + if (($item = $this->model->row($item, $this->getTable())) !== null) + { + // Update the column of this table using $key as the primary key. + return $this->database->row($item, $key, $this->getTable()); + } + return false; + } + + /** + * Update multiple rows to a given table + * Example: $this->items(Array); + * + * @param array|null $items The items updated in database (array of arrays) + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function rows(?array $items, string $key = 'guid'): bool + { + // check if object could be modelled + if (($items = $this->model->rows($items, $this->getTable())) !== null) + { + // Update the column of this table using $key as the primary key. + return $this->database->rows($items, $key, $this->getTable()); + } + return false; + } + + /** + * Update single item with multiple values to a given table + * Example: $this->item(Object); + * + * @param object $item The item to save + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function item(object $item, string $key = 'guid'): bool + { + // check if object could be modelled + if (($item = $this->model->item($item, $this->getTable())) !== null) + { + // Update the column of this table using $key as the primary key. + return $this->database->item($item, $key, $this->getTable()); + } + return false; + } + + /** + * Update multiple items to a given table + * Example: $this->items(Array); + * + * @param array|null $items The items updated in database (array of objects) + * @param string $key The key name + * + * @return bool + * @since 3.2.0 + */ + public function items(?array $items, string $key = 'guid'): bool + { + // check if object could be modelled + if (($items = $this->model->items($items, $this->getTable())) !== null) + { + // Update the column of this table using $key as the primary key. + return $this->database->items($items, $key, $this->getTable()); + } + return false; + } + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string + { + return $this->table; + } \ No newline at end of file diff --git a/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/settings.json b/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/settings.json new file mode 100644 index 0000000..0b2826f --- /dev/null +++ b/src/8f83fb79-f92b-4f1f-952b-325f6c22d11e/settings.json @@ -0,0 +1,30 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "", + "guid": "8f83fb79-f92b-4f1f-952b-325f6c22d11e", + "implements": [ + "68a41264-64c0-441a-a3d8-8a5e557b1883" + ], + "load_selection": null, + "name": "Update", + "power_version": "1.0.0", + "system_name": "VDM.Data.Action.Update", + "type": "class", + "use_selection": { + "use_selection0": { + "use": "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff", + "as": "Model" + }, + "use_selection1": { + "use": "7179fde6-1e51-4b51-8545-7ca18f74a0f4", + "as": "Database" + } + }, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Data.Action.Update", + "description": "Data Update\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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/91004529-94a9-4590-b842-e7c6b624ecf5/README.md b/src/91004529-94a9-4590-b842-e7c6b624ecf5/README.md index 6c90073..4d6e438 100644 --- a/src/91004529-94a9-4590-b842-e7c6b624ecf5/README.md +++ b/src/91004529-94a9-4590-b842-e7c6b624ecf5/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class ObjectHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** +> extends: **** ```uml @startuml abstract ObjectHelper #Orange { diff --git a/src/91004529-94a9-4590-b842-e7c6b624ecf5/code.php b/src/91004529-94a9-4590-b842-e7c6b624ecf5/code.php index c13054f..2646f7c 100644 --- a/src/91004529-94a9-4590-b842-e7c6b624ecf5/code.php +++ b/src/91004529-94a9-4590-b842-e7c6b624ecf5/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities; +namespace VDM\Joomla\Utilities; /** diff --git a/src/91004529-94a9-4590-b842-e7c6b624ecf5/settings.json b/src/91004529-94a9-4590-b842-e7c6b624ecf5/settings.json index aa55acc..db052bd 100644 --- a/src/91004529-94a9-4590-b842-e7c6b624ecf5/settings.json +++ b/src/91004529-94a9-4590-b842-e7c6b624ecf5/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "91004529-94a9-4590-b842-e7c6b624ecf5", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "Utilities Object Helper", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.ObjectHelper", "description": "Some object 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/README.md b/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/README.md new file mode 100644 index 0000000..f8de5d0 --- /dev/null +++ b/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/README.md @@ -0,0 +1,133 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# final class Item (Details) +> namespace: **VDM\Joomla\Data** +> extends: **** +```uml +@startuml +class Item << (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(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 + - insert(object $item) : bool + - update(object $item, string $key) : bool + - action(string $value, string $key) : string +} + +note right of Item::__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 Item::table + Set the current active table + + since: 3.2.2 + return: self +end note + +note right of Item::get + Get an item + + since: 3.2.2 + return: ?object +end note + +note left of Item::value + Get the value + + since: 3.2.2 + return: mixed + + arguments: + string $value + string $key = 'guid' + string $get = 'id' +end note + +note right of Item::set + Set an item + + since: 3.2.2 + return: bool + + arguments: + object $item + string $key = 'guid' + ?string $action = null +end note + +note left of Item::delete + Delete an item + + since: 3.2.2 + return: bool +end note + +note right of Item::getTable + Get the current active table + + since: 3.2.2 + return: string +end note + +note left of Item::insert + Insert a item + + since: 3.2.2 + return: bool +end note + +note right of Item::update + Update a item + + since: 3.2.2 + return: bool +end note + +note left of Item::action + Get loading action + + since: 3.2.2 + return: string +end note + +@enduml +``` + +--- +``` + ██╗ ██████╗██████╗ + ██║██╔════╝██╔══██╗ + ██║██║ ██████╔╝ +██ ██║██║ ██╔══██╗ +╚█████╔╝╚██████╗██████╔╝ + ╚════╝ ╚═════╝╚═════╝ +``` +> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) + diff --git a/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/code.php b/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/code.php new file mode 100644 index 0000000..cae4442 --- /dev/null +++ b/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/code.php @@ -0,0 +1,254 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\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\ItemInterface; + + +/** + * Data Item + * + * @since 3.2.2 + */ +final class Item implements ItemInterface +{ + /** + * The Load Class. + * + * @var Load + * @since 3.2.2 + */ + protected Load $load; + + /** + * The Insert Class. + * + * @var Insert + * @since 3.2.2 + */ + protected Insert $insert; + + /** + * The Update Class. + * + * @var Update + * @since 3.2.2 + */ + protected Update $update; + + /** + * The Delete 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 UpdateInterface 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 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 + { + return $this->load->table($this->getTable())->item([$key => $value]); + } + + /** + * 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') + { + // Perform the database query + $value = $this->database->value( + ["a.$get" => $get], + ["a" => $this->getTable()], + ["a.$key" => $value] + ); + + // Check if rows are found + if ($value !== null) + { + // Return the value + return $value; + } + + // Return null if no rows are found + return null; + } + + /** + * 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 + { + if ($action !== null || (isset($item->{$key}) && ($action = $this->action($item->{$key}, $key)) !== null)) + { + return method_exists($this, $action) ? $this->{$action}($item, $key) : false; + } + + return false; + } + + /** + * 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 + { + return $this->delete->table($this->getTable())->items([$key => $value]); + } + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string + { + return $this->table; + } + + /** + * Insert a item + * + * @param object $item The item + * + * @return bool + * @since 3.2.2 + */ + private function insert(object $item): bool + { + return $this->insert->table($this->getTable())->item($item); + } + + /** + * Update a item + * + * @param object $item The item + * @param string $key The item key + * + * @return bool + * @since 3.2.2 + */ + private function update(object $item, string $key): bool + { + return $this->update->table($this->getTable())->item($item, $key); + } + + /** + * Get loading action + * + * @param string $value The key value the item + * @param string $key The item key + * + * @return string + * @since 3.2.2 + */ + private function action(string $value, string $key): string + { + if (($id = $this->value($value, $key, 'id')) !== null && $id > 0) + { + return 'update'; + } + + return 'insert'; + } +} + diff --git a/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/code.power b/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/code.power new file mode 100644 index 0000000..fd4a94a --- /dev/null +++ b/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/code.power @@ -0,0 +1,223 @@ + /** + * The Load Class. + * + * @var Load + * @since 3.2.2 + */ + protected Load $load; + + /** + * The Insert Class. + * + * @var Insert + * @since 3.2.2 + */ + protected Insert $insert; + + /** + * The Update Class. + * + * @var Update + * @since 3.2.2 + */ + protected Update $update; + + /** + * The Delete 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 UpdateInterface 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 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 + { + return $this->load->table($this->getTable())->item([$key => $value]); + } + + /** + * 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') + { + // Perform the database query + $value = $this->database->value( + ["a.$get" => $get], + ["a" => $this->getTable()], + ["a.$key" => $value] + ); + + // Check if rows are found + if ($value !== null) + { + // Return the value + return $value; + } + + // Return null if no rows are found + return null; + } + + /** + * 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 + { + if ($action !== null || (isset($item->{$key}) && ($action = $this->action($item->{$key}, $key)) !== null)) + { + return method_exists($this, $action) ? $this->{$action}($item, $key) : false; + } + + return false; + } + + /** + * 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 + { + return $this->delete->table($this->getTable())->items([$key => $value]); + } + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string + { + return $this->table; + } + + /** + * Insert a item + * + * @param object $item The item + * + * @return bool + * @since 3.2.2 + */ + private function insert(object $item): bool + { + return $this->insert->table($this->getTable())->item($item); + } + + /** + * Update a item + * + * @param object $item The item + * @param string $key The item key + * + * @return bool + * @since 3.2.2 + */ + private function update(object $item, string $key): bool + { + return $this->update->table($this->getTable())->item($item, $key); + } + + /** + * Get loading action + * + * @param string $value The key value the item + * @param string $key The item key + * + * @return string + * @since 3.2.2 + */ + private function action(string $value, string $key): string + { + if (($id = $this->value($value, $key, 'id')) !== null && $id > 0) + { + return 'update'; + } + + return 'insert'; + } \ No newline at end of file diff --git a/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/settings.json b/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/settings.json new file mode 100644 index 0000000..ef8d66f --- /dev/null +++ b/src/9206082e-a3f7-472e-98b2-de90d06cbdcd/settings.json @@ -0,0 +1,42 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "", + "guid": "9206082e-a3f7-472e-98b2-de90d06cbdcd", + "implements": [ + "05744dd3-4030-4cf8-8dda-a93ab809b473" + ], + "load_selection": null, + "name": "Item", + "power_version": "1.0.0", + "system_name": "VDM.Data.Item", + "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.Item", + "description": "Data Item\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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/README.md b/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/README.md new file mode 100644 index 0000000..2550411 --- /dev/null +++ b/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/README.md @@ -0,0 +1,46 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# final class Delete (Details) +> namespace: **VDM\Joomla\Database** +> extends: **Database** +```uml +@startuml +class Delete << (F,LightGreen) >> #RoyalBlue { + + items(array $conditions, string $table) : bool + + truncate(string $table) : void +} + +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 + +@enduml +``` + +--- +``` + ██╗ ██████╗██████╗ + ██║██╔════╝██╔══██╗ + ██║██║ ██████╔╝ +██ ██║██║ ██╔══██╗ +╚█████╔╝╚██████╗██████╔╝ + ╚════╝ ╚═════╝╚═════╝ +``` +> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) + diff --git a/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/code.php b/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/code.php new file mode 100644 index 0000000..34dee96 --- /dev/null +++ b/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/code.php @@ -0,0 +1,132 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Database; + + +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Interfaces\DeleteInterface; +use VDM\Joomla\Abstraction\Database; + + +/** + * Database Delete Class + * + * @since 3.2.0 + */ +final class Delete extends Database implements DeleteInterface +{ + /** + * 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)] + * @param string $table The table where the data is being deleted + * + * @return bool + * @since 3.2.2 + **/ + public function items(array $conditions, string $table): bool + { + // set the update columns + if ($conditions === []) + { + return false; + } + + // get a query object + $query = $this->db->getQuery(true); + + // start the conditions bucket + $_conditions = []; + foreach ($conditions as $key => $value) + { + if (ArrayHelper::check($value)) + { + if (isset($value['value']) && isset($value['operator'])) + { + // check if value needs to be quoted + $quote = $value['quote'] ?? true; + if (!$quote) + { + if (ArrayHelper::check($value['value'])) + { + // add the where by array + $_conditions[] = $this->db->quoteName($key) + . ' ' . $value['operator'] + . ' ' . ' (' . + implode(',', $value['value']) + . ')'; + } + else + { + // add the conditions + $_conditions[] = $this->db->quoteName($key) + . ' ' . $value['operator'] + . ' ' . $value['value']; + } + } + else + { + if (ArrayHelper::check($value['value'])) + { + // add the where by array + $_conditions[] = $this->db->quoteName($key) + . ' ' . $value['operator'] + . ' ' . ' (' . + implode(',', array_map(fn($val) => $this->quote($val), $value['value'])) + . ')'; + } + else + { + // add the conditions + $_conditions[] = $this->db->quoteName($key) + . ' ' . $value['operator'] + . ' ' . $this->quote($value['value']); + } + } + } + else + { + // we should through an exception + // for security we just return false for now + return false; + } + } + else + { + // add default condition + $_conditions[] = $this->db->quoteName($key) . ' = ' . $this->quote($value); + } + } + + // set the query targets + $query->delete($this->db->quoteName($this->getTable($table))); + $query->where($_conditions); + + $this->db->setQuery($query); + + return $this->db->execute(); + } + + /** + * Truncate a table + * + * @param string $table The table that should be truncated + * + * @return void + * @since 3.2.2 + **/ + public function truncate(string $table): void + { + $this->db->truncateTable($this->getTable($table)); + } +} + diff --git a/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/code.power b/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/code.power new file mode 100644 index 0000000..8911a04 --- /dev/null +++ b/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/code.power @@ -0,0 +1,104 @@ + /** + * 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)] + * @param string $table The table where the data is being deleted + * + * @return bool + * @since 3.2.2 + **/ + public function items(array $conditions, string $table): bool + { + // set the update columns + if ($conditions === []) + { + return false; + } + + // get a query object + $query = $this->db->getQuery(true); + + // start the conditions bucket + $_conditions = []; + foreach ($conditions as $key => $value) + { + if (ArrayHelper::check($value)) + { + if (isset($value['value']) && isset($value['operator'])) + { + // check if value needs to be quoted + $quote = $value['quote'] ?? true; + if (!$quote) + { + if (ArrayHelper::check($value['value'])) + { + // add the where by array + $_conditions[] = $this->db->quoteName($key) + . ' ' . $value['operator'] + . ' ' . ' (' . + implode(',', $value['value']) + . ')'; + } + else + { + // add the conditions + $_conditions[] = $this->db->quoteName($key) + . ' ' . $value['operator'] + . ' ' . $value['value']; + } + } + else + { + if (ArrayHelper::check($value['value'])) + { + // add the where by array + $_conditions[] = $this->db->quoteName($key) + . ' ' . $value['operator'] + . ' ' . ' (' . + implode(',', array_map(fn($val) => $this->quote($val), $value['value'])) + . ')'; + } + else + { + // add the conditions + $_conditions[] = $this->db->quoteName($key) + . ' ' . $value['operator'] + . ' ' . $this->quote($value['value']); + } + } + } + else + { + // we should through an exception + // for security we just return false for now + return false; + } + } + else + { + // add default condition + $_conditions[] = $this->db->quoteName($key) . ' = ' . $this->quote($value); + } + } + + // set the query targets + $query->delete($this->db->quoteName($this->getTable($table))); + $query->where($_conditions); + + $this->db->setQuery($query); + + return $this->db->execute(); + } + + /** + * Truncate a table + * + * @param string $table The table that should be truncated + * + * @return void + * @since 3.2.2 + **/ + public function truncate(string $table): void + { + $this->db->truncateTable($this->getTable($table)); + } \ No newline at end of file diff --git a/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/settings.json b/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/settings.json new file mode 100644 index 0000000..d1767fb --- /dev/null +++ b/src/92291f1f-f248-4ec0-9f2a-3d47c49eeac1/settings.json @@ -0,0 +1,26 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "6cbef8f8-4813-48e3-b05a-65e1aea95171", + "guid": "92291f1f-f248-4ec0-9f2a-3d47c49eeac1", + "implements": [ + "9c3aa650-e536-4eea-a2d4-73cc3e184aa9" + ], + "load_selection": null, + "name": "Delete", + "power_version": "1.0.0", + "system_name": "VDM.Database.Delete", + "type": "final class", + "use_selection": { + "use_selection0": { + "use": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a", + "as": "default" + } + }, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Database.Delete", + "description": "Database Delete 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/README.md b/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/README.md new file mode 100644 index 0000000..179bf7c --- /dev/null +++ b/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/README.md @@ -0,0 +1,46 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# interface DeleteInterface (Details) +> namespace: **VDM\Joomla\Interfaces** +> extends: **** +```uml +@startuml +interface DeleteInterface #Lavender { + + items(array $conditions, string $table) : bool + + truncate(string $table) : void +} + +note right of DeleteInterface::items + Delete all rows in the database that match these conditions + + since: 3.2.0 + return: bool +end note + +note right of DeleteInterface::truncate + Truncate a table + + since: 3.2.2 + return: void +end note + +@enduml +``` + +--- +``` + ██╗ ██████╗██████╗ + ██║██╔════╝██╔══██╗ + ██║██║ ██████╔╝ +██ ██║██║ ██╔══██╗ +╚█████╔╝╚██████╗██████╔╝ + ╚════╝ ╚═════╝╚═════╝ +``` +> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) + diff --git a/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/code.php b/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/code.php new file mode 100644 index 0000000..3550156 --- /dev/null +++ b/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/code.php @@ -0,0 +1,43 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Interfaces; + + +/** + * Database Delete Interface + * + * @since 3.2.0 + */ +interface DeleteInterface +{ + /** + * Delete all rows in the database that match these conditions + * + * @param array $conditions Conditions by which to delete the data in database [array of arrays (key => value)] + * @param string $table The table where the data is being deleted + * + * @return bool + * @since 3.2.0 + **/ + public function items(array $conditions, string $table): bool; + + /** + * Truncate a table + * + * @param string $table The table that should be truncated + * + * @return void + * @since 3.2.2 + **/ + public function truncate(string $table): void; +} + diff --git a/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/code.power b/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/code.power new file mode 100644 index 0000000..eab5b1e --- /dev/null +++ b/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/code.power @@ -0,0 +1,20 @@ + /** + * Delete all rows in the database that match these conditions + * + * @param array $conditions Conditions by which to delete the data in database [array of arrays (key => value)] + * @param string $table The table where the data is being deleted + * + * @return bool + * @since 3.2.0 + **/ + public function items(array $conditions, string $table): bool; + + /** + * Truncate a table + * + * @param string $table The table that should be truncated + * + * @return void + * @since 3.2.2 + **/ + public function truncate(string $table): void; \ No newline at end of file diff --git a/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/settings.json b/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/settings.json new file mode 100644 index 0000000..b8b3982 --- /dev/null +++ b/src/9c3aa650-e536-4eea-a2d4-73cc3e184aa9/settings.json @@ -0,0 +1,19 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "", + "guid": "9c3aa650-e536-4eea-a2d4-73cc3e184aa9", + "implements": null, + "load_selection": null, + "name": "DeleteInterface", + "power_version": "1.0.0", + "system_name": "VDM.Interfaces.DeleteInterface", + "type": "interface", + "use_selection": null, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.DeleteInterface", + "description": "Database Delete Interface\r\n\r\n@since 3.2.0", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/README.md b/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/README.md index 5a2450b..a87017e 100644 --- a/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/README.md +++ b/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class GuidHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** +> extends: **** ```uml @startuml abstract GuidHelper #Orange { diff --git a/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/code.php b/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/code.php index 4422091..14a1148 100644 --- a/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/code.php +++ b/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/code.php @@ -9,11 +9,11 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities; +namespace VDM\Joomla\Utilities; use Joomla\CMS\Factory; -use VastDevelopmentMethod\Joomla\Utilities\Component\Helper; +use VDM\Joomla\Utilities\Component\Helper; /** diff --git a/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/settings.json b/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/settings.json index 6b9ecbd..bbddb88 100644 --- a/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/settings.json +++ b/src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "9c513baf-b279-43fd-ae29-a585c8cbc4f0", "implements": null, "load_selection": { @@ -22,6 +22,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.GuidHelper", "description": "Global Unique ID 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/README.md b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/README.md index b59c4af..4a69886 100644 --- a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/README.md +++ b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class FieldHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities\String** +> namespace: **VDM\Joomla\Utilities\String** +> extends: **** ```uml @startuml abstract FieldHelper #Orange { diff --git a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.php b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.php index 1177472..00a44d2 100644 --- a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.php +++ b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.php @@ -9,11 +9,11 @@ * @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 VastDevelopmentMethod\Joomla\Utilities\Component\Helper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\Component\Helper; /** diff --git a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/settings.json b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/settings.json index dcb4152..01f7814 100644 --- a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/settings.json +++ b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "9ef0eb24-aae4-4f5a-99af-d724db44808f", "implements": null, "load_selection": null, @@ -19,6 +19,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.FieldHelper", "description": "Control the naming of a field\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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/README.md b/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/README.md index 6a290a2..1165355 100644 --- a/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/README.md +++ b/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class FileHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** +> extends: **** ```uml @startuml abstract FileHelper #Orange { diff --git a/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.php b/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.php index c6aef72..7d1dd0a 100644 --- a/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.php +++ b/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities; +namespace VDM\Joomla\Utilities; use Joomla\CMS\Uri\Uri; @@ -19,7 +19,7 @@ use Joomla\CMS\Filesystem\Path; use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\Folder; use Joomla\Archive\Archive; -use VastDevelopmentMethod\Joomla\Utilities\Component\Helper; +use VDM\Joomla\Utilities\Component\Helper; /** diff --git a/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/settings.json b/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/settings.json index 34bfec8..d21bfb1 100644 --- a/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/settings.json +++ b/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "a223b31e-ea1d-4cdf-92ae-5f9becffaff0", "implements": null, "load_selection": { @@ -25,6 +25,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.FileHelper", "description": "File 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/a455d916-cfe4-41df-9245-bafb709aacdb/README.md b/src/a455d916-cfe4-41df-9245-bafb709aacdb/README.md new file mode 100644 index 0000000..ef08925 --- /dev/null +++ b/src/a455d916-cfe4-41df-9245-bafb709aacdb/README.md @@ -0,0 +1,112 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# class Insert (Details) +> namespace: **VDM\Joomla\Data\Action** +> extends: **** +```uml +@startuml +class Insert #Gold { + # Model $model + # Database $database + # string $table + + __construct(Model $model, Database $database, ...) + + 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 Insert::__construct + Constructor + + since: 3.2.2 + + arguments: + Model $model + Database $database + ?string $table = null +end note + +note left of Insert::table + Set the current active table + + since: 3.2.2 + return: self +end note + +note right of Insert::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 left of Insert::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 Insert::rows + Insert multiple rows to a given table +Example: $this->items(Array); + + since: 3.2.0 + return: bool +end note + +note left of Insert::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 Insert::items + Insert multiple items to a given table +Example: $this->items(Array); + + since: 3.2.0 + return: bool +end note + +note left of Insert::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) + diff --git a/src/a455d916-cfe4-41df-9245-bafb709aacdb/code.php b/src/a455d916-cfe4-41df-9245-bafb709aacdb/code.php new file mode 100644 index 0000000..58fd464 --- /dev/null +++ b/src/a455d916-cfe4-41df-9245-bafb709aacdb/code.php @@ -0,0 +1,202 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Data\Action; + + +use VDM\Joomla\Interfaces\ModelInterface as Model; +use VDM\Joomla\Interfaces\InsertInterface as Database; +use VDM\Joomla\Interfaces\Data\InsertInterface; + + +/** + * Data Insert (GUID) + * + * @since 3.2.2 + */ +class Insert implements InsertInterface +{ + /** + * Model + * + * @var Model + * @since 3.2.0 + */ + protected Model $model; + + /** + * Database + * + * @var Database + * @since 3.2.0 + */ + protected Database $database; + + /** + * Table Name + * + * @var string + * @since 3.2.1 + */ + protected string $table; + + /** + * Constructor + * + * @param Model $model The set model object. + * @param Database $database The insert database object. + * @param string|null $table The table name. + * + * @since 3.2.2 + */ + public function __construct(Model $model, Database $database, ?string $table = null) + { + $this->model = $model; + $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; + } + + /** + * 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 + { + // build the array + $item = []; + $item[$key] = $keyValue; + $item[$field] = $value; + + // Insert the column of this table + return $this->row($item); + } + + /** + * 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 + { + // check if object could be modelled + if (($item = $this->model->row($item, $this->getTable())) !== null) + { + // Insert the column of this table + return $this->database->row($item, $this->getTable()); + } + return false; + } + + /** + * 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 + { + // check if object could be modelled + if (($items = $this->model->rows($items, $this->getTable())) !== null) + { + // Insert the column of this table + return $this->database->rows($items, $this->getTable()); + } + return false; + } + + /** + * 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 + { + // check if object could be modelled + if (($item = $this->model->item($item, $this->getTable())) !== null) + { + // Insert the column of this table + return $this->database->item($item, $this->getTable()); + } + return false; + } + + /** + * 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 + { + // check if object could be modelled + if (($items = $this->model->items($items, $this->getTable())) !== null) + { + // Update the column of this table using guid as the primary key. + return $this->database->items($items, $this->getTable()); + } + return false; + } + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string + { + return $this->table; + } +} + diff --git a/src/a455d916-cfe4-41df-9245-bafb709aacdb/code.power b/src/a455d916-cfe4-41df-9245-bafb709aacdb/code.power new file mode 100644 index 0000000..fc37b25 --- /dev/null +++ b/src/a455d916-cfe4-41df-9245-bafb709aacdb/code.power @@ -0,0 +1,174 @@ + /** + * Model + * + * @var Model + * @since 3.2.0 + */ + protected Model $model; + + /** + * Database + * + * @var Database + * @since 3.2.0 + */ + protected Database $database; + + /** + * Table Name + * + * @var string + * @since 3.2.1 + */ + protected string $table; + + /** + * Constructor + * + * @param Model $model The set model object. + * @param Database $database The insert database object. + * @param string|null $table The table name. + * + * @since 3.2.2 + */ + public function __construct(Model $model, Database $database, ?string $table = null) + { + $this->model = $model; + $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; + } + + /** + * 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 + { + // build the array + $item = []; + $item[$key] = $keyValue; + $item[$field] = $value; + + // Insert the column of this table + return $this->row($item); + } + + /** + * 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 + { + // check if object could be modelled + if (($item = $this->model->row($item, $this->getTable())) !== null) + { + // Insert the column of this table + return $this->database->row($item, $this->getTable()); + } + return false; + } + + /** + * 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 + { + // check if object could be modelled + if (($items = $this->model->rows($items, $this->getTable())) !== null) + { + // Insert the column of this table + return $this->database->rows($items, $this->getTable()); + } + return false; + } + + /** + * 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 + { + // check if object could be modelled + if (($item = $this->model->item($item, $this->getTable())) !== null) + { + // Insert the column of this table + return $this->database->item($item, $this->getTable()); + } + return false; + } + + /** + * 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 + { + // check if object could be modelled + if (($items = $this->model->items($items, $this->getTable())) !== null) + { + // Update the column of this table using guid as the primary key. + return $this->database->items($items, $this->getTable()); + } + return false; + } + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string + { + return $this->table; + } \ No newline at end of file diff --git a/src/a455d916-cfe4-41df-9245-bafb709aacdb/settings.json b/src/a455d916-cfe4-41df-9245-bafb709aacdb/settings.json new file mode 100644 index 0000000..454b09e --- /dev/null +++ b/src/a455d916-cfe4-41df-9245-bafb709aacdb/settings.json @@ -0,0 +1,30 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "", + "guid": "a455d916-cfe4-41df-9245-bafb709aacdb", + "implements": [ + "03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13" + ], + "load_selection": null, + "name": "Insert", + "power_version": "1.0.0", + "system_name": "VDM.Data.Action.Insert", + "type": "class", + "use_selection": { + "use_selection0": { + "use": "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff", + "as": "Model" + }, + "use_selection1": { + "use": "ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48", + "as": "Database" + } + }, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Data.Action.Insert", + "description": "Data Insert (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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/a5daf189-3345-4b13-8716-c51f686f545b/README.md b/src/a5daf189-3345-4b13-8716-c51f686f545b/README.md new file mode 100644 index 0000000..05be1c3 --- /dev/null +++ b/src/a5daf189-3345-4b13-8716-c51f686f545b/README.md @@ -0,0 +1,94 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# class Data (Details) +> namespace: **VDM\Joomla\Service** +> extends: **** +```uml +@startuml +class Data #Gold { + + register(Container $container) : void + + getLoad(Container $container) : Load + + getInsert(Container $container) : Insert + + getUpdate(Container $container) : Update + + getDelete(Container $container) : Delete + + getItem(Container $container) : Item + + getItems(Container $container) : Items + + getSubform(Container $container) : Subform +} + +note right of Data::register + Registers the service provider with a DI container. + + since: 3.2.0 + return: void +end note + +note left of Data::getLoad + Get The Load Class. + + since: 3.2.0 + return: Load +end note + +note right of Data::getInsert + Get The Insert Class. + + since: 3.2.0 + return: Insert +end note + +note left of Data::getUpdate + Get The Update Class. + + since: 3.2.0 + return: Update +end note + +note right of Data::getDelete + Get The Delete Class. + + since: 3.2.0 + return: Delete +end note + +note left of Data::getItem + Get The Item Class. + + since: 3.2.0 + return: Item +end note + +note right of Data::getItems + Get The Items Class. + + since: 3.2.0 + return: Items +end note + +note left of Data::getSubform + Get The Subform Class. + + since: 3.2.0 + return: Subform +end note + +@enduml +``` + +--- +``` + ██╗ ██████╗██████╗ + ██║██╔════╝██╔══██╗ + ██║██║ ██████╔╝ +██ ██║██║ ██╔══██╗ +╚█████╔╝╚██████╗██████╔╝ + ╚════╝ ╚═════╝╚═════╝ +``` +> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) + diff --git a/src/a5daf189-3345-4b13-8716-c51f686f545b/code.php b/src/a5daf189-3345-4b13-8716-c51f686f545b/code.php new file mode 100644 index 0000000..24db387 --- /dev/null +++ b/src/a5daf189-3345-4b13-8716-c51f686f545b/code.php @@ -0,0 +1,181 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Data\Action\Load; +use VDM\Joomla\Data\Action\Insert; +use VDM\Joomla\Data\Action\Update; +use VDM\Joomla\Data\Action\Delete; +use VDM\Joomla\Data\Item; +use VDM\Joomla\Data\Items; +use VDM\Joomla\Data\Subform; + + +/** + * Data Service Provider + * + * @since 3.2.0 + */ +class Data 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, 'Data.Load') + ->share('Data.Load', [$this, 'getLoad'], true); + + $container->alias(Insert::class, 'Data.Insert') + ->share('Data.Insert', [$this, 'getInsert'], true); + + $container->alias(Update::class, 'Data.Update') + ->share('Data.Update', [$this, 'getUpdate'], true); + + $container->alias(Delete::class, 'Data.Delete') + ->share('Data.Delete', [$this, 'getDelete'], true); + + $container->alias(Item::class, 'Data.Item') + ->share('Data.Item', [$this, 'getItem'], true); + + $container->alias(Items::class, 'Data.Items') + ->share('Data.Items', [$this, 'getItems'], true); + + $container->alias(Subform::class, 'Data.Subform') + ->share('Data.Subform', [$this, 'getSubform'], 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('Model.Load'), + $container->get('Load') + ); + } + + /** + * Get The Insert Class. + * + * @param Container $container The DI container. + * + * @return Insert + * @since 3.2.0 + */ + public function getInsert(Container $container): Insert + { + return new Insert( + $container->get('Model.Upsert'), + $container->get('Insert') + ); + } + + /** + * Get The Update Class. + * + * @param Container $container The DI container. + * + * @return Update + * @since 3.2.0 + */ + public function getUpdate(Container $container): Update + { + return new Update( + $container->get('Model.Upsert'), + $container->get('Update') + ); + } + + /** + * Get The Delete Class. + * + * @param Container $container The DI container. + * + * @return Delete + * @since 3.2.0 + */ + public function getDelete(Container $container): Delete + { + return new Delete( + $container->get('Delete') + ); + } + + /** + * Get The Item Class. + * + * @param Container $container The DI container. + * + * @return Item + * @since 3.2.0 + */ + public function getItem(Container $container): Item + { + return new Item( + $container->get('Data.Load'), + $container->get('Data.Insert'), + $container->get('Data.Update'), + $container->get('Data.Delete'), + $container->get('Load') + ); + } + + /** + * Get The Items Class. + * + * @param Container $container The DI container. + * + * @return Items + * @since 3.2.0 + */ + public function getItems(Container $container): Items + { + return new Items( + $container->get('Data.Load'), + $container->get('Data.Insert'), + $container->get('Data.Update'), + $container->get('Data.Delete'), + $container->get('Load') + ); + } + + /** + * Get The Subform Class. + * + * @param Container $container The DI container. + * + * @return Subform + * @since 3.2.0 + */ + public function getSubform(Container $container): Subform + { + return new Subform( + $container->get('Data.Items') + ); + } +} + diff --git a/src/a5daf189-3345-4b13-8716-c51f686f545b/code.power b/src/a5daf189-3345-4b13-8716-c51f686f545b/code.power new file mode 100644 index 0000000..837ea96 --- /dev/null +++ b/src/a5daf189-3345-4b13-8716-c51f686f545b/code.power @@ -0,0 +1,147 @@ + /** + * 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, 'Data.Load') + ->share('Data.Load', [$this, 'getLoad'], true); + + $container->alias(Insert::class, 'Data.Insert') + ->share('Data.Insert', [$this, 'getInsert'], true); + + $container->alias(Update::class, 'Data.Update') + ->share('Data.Update', [$this, 'getUpdate'], true); + + $container->alias(Delete::class, 'Data.Delete') + ->share('Data.Delete', [$this, 'getDelete'], true); + + $container->alias(Item::class, 'Data.Item') + ->share('Data.Item', [$this, 'getItem'], true); + + $container->alias(Items::class, 'Data.Items') + ->share('Data.Items', [$this, 'getItems'], true); + + $container->alias(Subform::class, 'Data.Subform') + ->share('Data.Subform', [$this, 'getSubform'], 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('Model.Load'), + $container->get('Load') + ); + } + + /** + * Get The Insert Class. + * + * @param Container $container The DI container. + * + * @return Insert + * @since 3.2.0 + */ + public function getInsert(Container $container): Insert + { + return new Insert( + $container->get('Model.Upsert'), + $container->get('Insert') + ); + } + + /** + * Get The Update Class. + * + * @param Container $container The DI container. + * + * @return Update + * @since 3.2.0 + */ + public function getUpdate(Container $container): Update + { + return new Update( + $container->get('Model.Upsert'), + $container->get('Update') + ); + } + + /** + * Get The Delete Class. + * + * @param Container $container The DI container. + * + * @return Delete + * @since 3.2.0 + */ + public function getDelete(Container $container): Delete + { + return new Delete( + $container->get('Delete') + ); + } + + /** + * Get The Item Class. + * + * @param Container $container The DI container. + * + * @return Item + * @since 3.2.0 + */ + public function getItem(Container $container): Item + { + return new Item( + $container->get('Data.Load'), + $container->get('Data.Insert'), + $container->get('Data.Update'), + $container->get('Data.Delete'), + $container->get('Load') + ); + } + + /** + * Get The Items Class. + * + * @param Container $container The DI container. + * + * @return Items + * @since 3.2.0 + */ + public function getItems(Container $container): Items + { + return new Items( + $container->get('Data.Load'), + $container->get('Data.Insert'), + $container->get('Data.Update'), + $container->get('Data.Delete'), + $container->get('Load') + ); + } + + /** + * Get The Subform Class. + * + * @param Container $container The DI container. + * + * @return Subform + * @since 3.2.0 + */ + public function getSubform(Container $container): Subform + { + return new Subform( + $container->get('Data.Items') + ); + } \ No newline at end of file diff --git a/src/a5daf189-3345-4b13-8716-c51f686f545b/settings.json b/src/a5daf189-3345-4b13-8716-c51f686f545b/settings.json new file mode 100644 index 0000000..08e4344 --- /dev/null +++ b/src/a5daf189-3345-4b13-8716-c51f686f545b/settings.json @@ -0,0 +1,51 @@ +{ + "add_head": "1", + "add_licensing_template": "2", + "extends": "", + "guid": "a5daf189-3345-4b13-8716-c51f686f545b", + "implements": [ + "-1" + ], + "load_selection": null, + "name": "Data", + "power_version": "1.0.0", + "system_name": "VDM.Service.Data", + "type": "class", + "use_selection": { + "use_selection0": { + "use": "008d111c-9d43-427c-8dd4-2653e8b74be8", + "as": "default" + }, + "use_selection1": { + "use": "a455d916-cfe4-41df-9245-bafb709aacdb", + "as": "default" + }, + "use_selection2": { + "use": "8f83fb79-f92b-4f1f-952b-325f6c22d11e", + "as": "default" + }, + "use_selection3": { + "use": "3fc72954-a303-4cac-b53c-554be38b85e7", + "as": "default" + }, + "use_selection4": { + "use": "9206082e-a3f7-472e-98b2-de90d06cbdcd", + "as": "default" + }, + "use_selection5": { + "use": "21bca8a4-5b28-41c4-843e-8097f0ba7cca", + "as": "default" + }, + "use_selection6": { + "use": "85785701-07b2-4f81-bc1e-0f423700c254", + "as": "default" + } + }, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Service.Data", + "description": "Data 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "use Joomla\\DI\\Container;\r\nuse Joomla\\DI\\ServiceProviderInterface;", + "composer": "" +} \ No newline at end of file diff --git a/src/a8935cbe-7701-40dc-bfd5-675f2d600954/README.md b/src/a8935cbe-7701-40dc-bfd5-675f2d600954/README.md index df8f403..5bfab95 100644 --- a/src/a8935cbe-7701-40dc-bfd5-675f2d600954/README.md +++ b/src/a8935cbe-7701-40dc-bfd5-675f2d600954/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class TypeHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities\String** +> namespace: **VDM\Joomla\Utilities\String** +> extends: **** ```uml @startuml abstract TypeHelper #Orange { diff --git a/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php b/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php index 3ca0325..3c1554d 100644 --- a/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php +++ b/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php @@ -9,12 +9,12 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities\String; +namespace VDM\Joomla\Utilities\String; use Joomla\CMS\Component\ComponentHelper; -use VastDevelopmentMethod\Joomla\Utilities\StringHelper; -use VastDevelopmentMethod\Joomla\Utilities\Component\Helper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\Component\Helper; /** diff --git a/src/a8935cbe-7701-40dc-bfd5-675f2d600954/settings.json b/src/a8935cbe-7701-40dc-bfd5-675f2d600954/settings.json index 1469f84..6598f76 100644 --- a/src/a8935cbe-7701-40dc-bfd5-675f2d600954/settings.json +++ b/src/a8935cbe-7701-40dc-bfd5-675f2d600954/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "a8935cbe-7701-40dc-bfd5-675f2d600954", "implements": null, "load_selection": null, @@ -19,6 +19,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.TypeHelper", "description": "Control the naming of a field type\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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/README.md b/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/README.md index 600f32c..72e761c 100644 --- a/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/README.md +++ b/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # interface InsertInterface (Details) -> namespace: **VastDevelopmentMethod\Joomla\Interfaces** +> namespace: **VDM\Joomla\Interfaces** +> extends: **** ```uml @startuml interface InsertInterface #Lavender { diff --git a/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/code.php b/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/code.php index 862d2a4..c76b97b 100644 --- a/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/code.php +++ b/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Interfaces; +namespace VDM\Joomla\Interfaces; /** diff --git a/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/settings.json b/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/settings.json index e1f5190..38f5d6f 100644 --- a/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/settings.json +++ b/src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Interfaces.InsertInterface", "type": "interface", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.InsertInterface", "description": "Database Insert Interface\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/af0eedbe-603b-4671-8e5a-28165d88254b/README.md b/src/af0eedbe-603b-4671-8e5a-28165d88254b/README.md index 73efff6..a318280 100644 --- a/src/af0eedbe-603b-4671-8e5a-28165d88254b/README.md +++ b/src/af0eedbe-603b-4671-8e5a-28165d88254b/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # interface Activeregistryinterface (Details) -> namespace: **VastDevelopmentMethod\Joomla\Interfaces** +> namespace: **VDM\Joomla\Interfaces** +> extends: **** ```uml @startuml interface Activeregistryinterface #Lavender { diff --git a/src/af0eedbe-603b-4671-8e5a-28165d88254b/code.php b/src/af0eedbe-603b-4671-8e5a-28165d88254b/code.php index b3a2dfb..ebf3a67 100644 --- a/src/af0eedbe-603b-4671-8e5a-28165d88254b/code.php +++ b/src/af0eedbe-603b-4671-8e5a-28165d88254b/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Interfaces; +namespace VDM\Joomla\Interfaces; /** diff --git a/src/af0eedbe-603b-4671-8e5a-28165d88254b/settings.json b/src/af0eedbe-603b-4671-8e5a-28165d88254b/settings.json index f43355d..f3ba489 100644 --- a/src/af0eedbe-603b-4671-8e5a-28165d88254b/settings.json +++ b/src/af0eedbe-603b-4671-8e5a-28165d88254b/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "af0eedbe-603b-4671-8e5a-28165d88254b", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Interfaces.Activeregistryinterface", "type": "interface", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Activeregistryinterface", "description": "The Active Registry Interface\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/README.md b/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/README.md index d5fd7d8..353e0fb 100644 --- a/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/README.md +++ b/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/README.md @@ -7,7 +7,7 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # final class Schema (Details) -> namespace: **VastDevelopmentMethod\Joomla\Componentbuilder\Table** +> namespace: **VDM\Joomla\Componentbuilder\Table** > extends: **ExtendingSchema** ```uml @startuml diff --git a/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/code.php b/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/code.php index b0d0bc9..200e330 100644 --- a/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/code.php +++ b/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/code.php @@ -9,12 +9,12 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Componentbuilder\Table; +namespace VDM\Joomla\Componentbuilder\Table; -use VastDevelopmentMethod\Joomla\Componentbuilder\Table; -use VastDevelopmentMethod\Joomla\Interfaces\SchemaInterface; -use VastDevelopmentMethod\Joomla\Abstraction\Schema as ExtendingSchema; +use VDM\Joomla\Componentbuilder\Table; +use VDM\Joomla\Interfaces\SchemaInterface; +use VDM\Joomla\Abstraction\Schema as ExtendingSchema; /** diff --git a/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/settings.json b/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/settings.json index 97841bf..c905a9a 100644 --- a/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/settings.json +++ b/src/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce/settings.json @@ -17,6 +17,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Componentbuilder.Table.Schema", "description": "JCB Tables Schema\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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/README.md b/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/README.md index 2d65c3f..a4801d0 100644 --- a/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/README.md +++ b/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/README.md @@ -7,7 +7,7 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class BaseRegistry (Details) -> namespace: **VastDevelopmentMethod\Joomla\Componentbuilder\Abstraction** +> namespace: **VDM\Joomla\Componentbuilder\Abstraction** > extends: **JoomlaRegistry** ```uml @startuml diff --git a/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/code.php b/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/code.php index 7a8a947..bfec409 100644 --- a/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/code.php +++ b/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Componentbuilder\Abstraction; +namespace VDM\Joomla\Componentbuilder\Abstraction; use Joomla\Registry\Registry as JoomlaRegistry; diff --git a/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/settings.json b/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/settings.json index 920b95b..e6c7a18 100644 --- a/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/settings.json +++ b/src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/settings.json @@ -12,6 +12,7 @@ "system_name": "JCB.Abstraction.BaseRegistry", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Componentbuilder.Abstraction.BaseRegistry", "description": "Registry\r\n\r\nSo we have full control over this class\r\n\r\n@since 3.2.0", "implements_custom": "\\JsonSerializable, \\ArrayAccess, \\IteratorAggregate, \\Countable", diff --git a/src/bb29a833-73f7-4283-9327-bc7e41f0723b/README.md b/src/bb29a833-73f7-4283-9327-bc7e41f0723b/README.md new file mode 100644 index 0000000..cf3f4b0 --- /dev/null +++ b/src/bb29a833-73f7-4283-9327-bc7e41f0723b/README.md @@ -0,0 +1,70 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# final class Load (Details) +> namespace: **VDM\Joomla\Model** +> extends: **Model** +```uml +@startuml +class Load << (F,LightGreen) >> #RoyalBlue { + + value(mixed $value, string $field, ...) : mixed + # validateBefore(mixed $value, ?string $field = null, ...) : bool + # validateAfter(mixed $value, ?string $field = null, ...) : bool +} + +note right of Load::value + Model the value +Example: $this->value(value, 'field_key', 'table_name'); + + since: 3.2.0 + return: mixed + + arguments: + mixed $value + string $field + ?string $table = null +end note + +note right of Load::validateBefore + Validate before the value is modelled + + since: 3.2.0 + return: bool + + arguments: + mixed $value + ?string $field = null + ?string $table = null +end note + +note right of Load::validateAfter + Validate after the value is modelled + + since: 3.2.0 + return: bool + + arguments: + mixed $value + ?string $field = null + ?string $table = null +end note + +@enduml +``` + +--- +``` + ██╗ ██████╗██████╗ + ██║██╔════╝██╔══██╗ + ██║██║ ██████╔╝ +██ ██║██║ ██╔══██╗ +╚█████╔╝╚██████╗██████╔╝ + ╚════╝ ╚═════╝╚═════╝ +``` +> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) + diff --git a/src/bb29a833-73f7-4283-9327-bc7e41f0723b/code.php b/src/bb29a833-73f7-4283-9327-bc7e41f0723b/code.php new file mode 100644 index 0000000..83002ce --- /dev/null +++ b/src/bb29a833-73f7-4283-9327-bc7e41f0723b/code.php @@ -0,0 +1,118 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Model; + + +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Interfaces\ModelInterface; +use VDM\Joomla\Abstraction\Model; + + +/** + * Power Model Load + * + * @since 3.2.2 + */ +final class Load extends Model implements ModelInterface +{ + /** + * Model the value + * Example: $this->value(value, 'field_key', 'table_name'); + * + * @param mixed $value The value to model + * @param string $field The field key + * @param string|null $table The table + * + * @return mixed + * @since 3.2.0 + */ + public function value($value, string $field, ?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->getTable(); + } + + // check if this is a valid table + if (($store = $this->table->get($table, $field, 'store')) !== null) + { + // open the value based on the store method + switch($store) + { + case 'base64': + $value = base64_decode((string) $value); + break; + case 'json': + $value = json_decode($value); + break; + } + } + + return $value; + } + + /** + * Validate before the value is modelled + * + * @param mixed $value The field value + * @param string|null $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + protected function validateBefore(&$value, ?string $field = null, ?string $table = null): bool + { + // only strings or numbers allowed + if (StringHelper::check($value) || is_numeric($value)) + { + return true; + } + // check if we allow empty + elseif ($this->getAllowEmpty() && empty($value)) + { + return true; + } + // remove empty values + return false; + } + + /** + * Validate after the value is modelled + * + * @param mixed $value The field value + * @param string|null $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool + { + // only strings or numbers allowed + if (StringHelper::check($value) || ArrayHelper::check($value, true) || ObjectHelper::check($value) || is_numeric($value)) + { + return true; + } + // check if we allow empty + elseif ($this->getAllowEmpty() && empty($value)) + { + return true; + } + // remove empty values + return false; + } +} + diff --git a/src/bb29a833-73f7-4283-9327-bc7e41f0723b/code.power b/src/bb29a833-73f7-4283-9327-bc7e41f0723b/code.power new file mode 100644 index 0000000..c4a1b38 --- /dev/null +++ b/src/bb29a833-73f7-4283-9327-bc7e41f0723b/code.power @@ -0,0 +1,88 @@ + /** + * Model the value + * Example: $this->value(value, 'field_key', 'table_name'); + * + * @param mixed $value The value to model + * @param string $field The field key + * @param string|null $table The table + * + * @return mixed + * @since 3.2.0 + */ + public function value($value, string $field, ?string $table = null) + { + // set the table name + if (empty($table)) + { + $table = $this->getTable(); + } + + // check if this is a valid table + if (($store = $this->table->get($table, $field, 'store')) !== null) + { + // open the value based on the store method + switch($store) + { + case 'base64': + $value = base64_decode((string) $value); + break; + case 'json': + $value = json_decode($value); + break; + } + } + + return $value; + } + + /** + * Validate before the value is modelled + * + * @param mixed $value The field value + * @param string|null $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + protected function validateBefore(&$value, ?string $field = null, ?string $table = null): bool + { + // only strings or numbers allowed + if (StringHelper::check($value) || is_numeric($value)) + { + return true; + } + // check if we allow empty + elseif ($this->getAllowEmpty() && empty($value)) + { + return true; + } + // remove empty values + return false; + } + + /** + * Validate after the value is modelled + * + * @param mixed $value The field value + * @param string|null $field The field key + * @param string|null $table The table + * + * @return bool + * @since 3.2.0 + */ + protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool + { + // only strings or numbers allowed + if (StringHelper::check($value) || ArrayHelper::check($value, true) || ObjectHelper::check($value) || is_numeric($value)) + { + return true; + } + // check if we allow empty + elseif ($this->getAllowEmpty() && empty($value)) + { + return true; + } + // remove empty values + return false; + } \ No newline at end of file diff --git a/src/bb29a833-73f7-4283-9327-bc7e41f0723b/settings.json b/src/bb29a833-73f7-4283-9327-bc7e41f0723b/settings.json new file mode 100644 index 0000000..88a24fd --- /dev/null +++ b/src/bb29a833-73f7-4283-9327-bc7e41f0723b/settings.json @@ -0,0 +1,34 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "584747d1-3a86-453d-b7a3-a2219de8d777", + "guid": "bb29a833-73f7-4283-9327-bc7e41f0723b", + "implements": [ + "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff" + ], + "load_selection": null, + "name": "Load", + "power_version": "1.0.0", + "system_name": "VDM.Model.Load", + "type": "final class", + "use_selection": { + "use_selection0": { + "use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef", + "as": "default" + }, + "use_selection1": { + "use": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a", + "as": "default" + }, + "use_selection2": { + "use": "91004529-94a9-4590-b842-e7c6b624ecf5", + "as": "default" + } + }, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Model.Load", + "description": "Power Model Load\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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/README.md b/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/README.md index 3ce50d1..8215d1d 100644 --- a/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/README.md +++ b/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/README.md @@ -7,7 +7,7 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # class Table (Details) -> namespace: **VastDevelopmentMethod\Joomla\Componentbuilder** +> namespace: **VDM\Joomla\Componentbuilder** > extends: **BaseTable** ```uml @startuml diff --git a/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.php b/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.php index 894aac9..004ac74 100644 --- a/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.php +++ b/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.php @@ -9,11 +9,11 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Componentbuilder; +namespace VDM\Joomla\Componentbuilder; -use VastDevelopmentMethod\Joomla\Interfaces\Tableinterface; -use VastDevelopmentMethod\Joomla\Abstraction\BaseTable; +use VDM\Joomla\Interfaces\Tableinterface; +use VDM\Joomla\Abstraction\BaseTable; /** @@ -95,233 +95,57 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'php_site_event' => [ - 'name' => 'php_site_event', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_LABEL', - 'type' => 'editor', + 'created' => [ + 'name' => 'created', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_LABEL', + 'type' => 'calendar', 'title' => false, 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Libs & Helpers', + 'store' => NULL, + 'tab_name' => 'publishing', 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', + 'type' => 'DATETIME', + 'default' => '0000-00-00 00:00:00', 'null_switch' => 'NOT NULL', 'unique_key' => false, 'key' => false, ], ], - 'component_version' => [ - 'name' => 'component_version', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL', + 'crowdin_project_identifier' => [ + 'name' => 'crowdin_project_identifier', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_LABEL', 'type' => 'text', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, - 'tab_name' => 'Details', + 'tab_name' => 'Dynamic Integration', 'db' => [ - 'type' => 'CHAR(64)', + 'type' => 'VARCHAR(255)', 'default' => '', 'null_switch' => 'NOT NULL', 'unique_key' => false, 'key' => false, ], ], - 'php_admin_event' => [ - 'name' => 'php_admin_event', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Libs & Helpers', - 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'crowdin_username' => [ - 'name' => 'crowdin_username', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_USERNAME_LABEL', + 'backup_folder_path' => [ + 'name' => 'backup_folder_path', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_FOLDER_PATH_LABEL', 'type' => 'text', 'title' => false, 'list' => 'joomla_components', - 'store' => 'basic_encryption', + 'store' => NULL, 'tab_name' => 'Dynamic Integration', 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', + 'type' => 'VARCHAR(255)', + 'default' => '', 'null_switch' => 'NOT NULL', 'unique_key' => false, 'key' => false, ], ], - 'php_preflight_install' => [ - 'name' => 'php_preflight_install', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Dash & Install', - 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'remove_line_breaks' => [ - 'name' => 'remove_line_breaks', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'description' => [ - 'name' => 'description', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_LABEL', - 'type' => 'textarea', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'php_method_uninstall' => [ - 'name' => 'php_method_uninstall', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_METHOD_UNINSTALL_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Dash & Install', - 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'debug_linenr' => [ - 'name' => 'debug_linenr', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'mvc_versiondate' => [ - 'name' => 'mvc_versiondate', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_LABEL', - 'type' => 'list', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'css_admin' => [ - 'name' => 'css_admin', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_ADMIN_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Libs & Helpers', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'addreadme' => [ - 'name' => 'addreadme', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDREADME_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Readme', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'php_postflight_install' => [ - 'name' => 'php_postflight_install', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_POSTFLIGHT_INSTALL_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Dash & Install', - 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'add_placeholders' => [ - 'name' => 'add_placeholders', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'sql' => [ - 'name' => 'sql', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_LABEL', + 'sql_uninstall' => [ + 'name' => 'sql_uninstall', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_LABEL', 'type' => 'textarea', 'title' => false, 'list' => 'joomla_components', @@ -335,310 +159,6 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'author' => [ - 'name' => 'author', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL', - 'type' => 'text', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'VARCHAR(255)', - 'default' => '', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'update_server_url' => [ - 'name' => 'update_server_url', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_LABEL', - 'type' => 'url', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Dynamic Integration', - 'db' => [ - 'type' => 'VARCHAR(255)', - 'default' => '', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'email' => [ - 'name' => 'email', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL', - 'type' => 'text', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'VARCHAR(255)', - 'default' => '', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'add_backup_folder_path' => [ - 'name' => 'add_backup_folder_path', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_BACKUP_FOLDER_PATH_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Dynamic Integration', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'website' => [ - 'name' => 'website', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL', - 'type' => 'url', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'CHAR(255)', - 'default' => '', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'translation_tool' => [ - 'name' => 'translation_tool', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TRANSLATION_TOOL_LABEL', - 'type' => 'list', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Dynamic Integration', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'add_license' => [ - 'name' => 'add_license', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_LICENSE_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'buildcompsql' => [ - 'name' => 'buildcompsql', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL', - 'type' => 'textarea', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Dynamic Build', - 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'license_type' => [ - 'name' => 'license_type', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_TYPE_LABEL', - 'type' => 'list', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'php_helper_admin' => [ - 'name' => 'php_helper_admin', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Libs & Helpers', - 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'php_helper_site' => [ - 'name' => 'php_helper_site', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Libs & Helpers', - 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'whmcs_key' => [ - 'name' => 'whmcs_key', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_LABEL', - 'type' => 'text', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'basic_encryption', - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'VARCHAR(255)', - 'default' => '', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'javascript' => [ - 'name' => 'javascript', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Libs & Helpers', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'whmcs_url' => [ - 'name' => 'whmcs_url', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_LABEL', - 'type' => 'url', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'VARCHAR(255)', - 'default' => '', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'css_site' => [ - 'name' => 'css_site', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Libs & Helpers', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'whmcs_buy_link' => [ - 'name' => 'whmcs_buy_link', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_LABEL', - 'type' => 'url', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'VARCHAR(255)', - 'default' => '', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'license' => [ - 'name' => 'license', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_LABEL', - 'type' => 'textarea', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'VARCHAR(255)', - 'default' => '', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'php_preflight_update' => [ - 'name' => 'php_preflight_update', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Dash & Install', - 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'bom' => [ - 'name' => 'bom', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_LABEL', - 'type' => 'filelist', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'CHAR(64)', - 'default' => '', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], 'php_postflight_update' => [ 'name' => 'php_postflight_update', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_POSTFLIGHT_UPDATE_LABEL', @@ -655,10 +175,138 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'image' => [ - 'name' => 'image', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL', - 'type' => 'media', + 'css_site' => [ + 'name' => 'css_site', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'mvc_versiondate' => [ + 'name' => 'mvc_versiondate', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_LABEL', + 'type' => 'list', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'remove_line_breaks' => [ + 'name' => 'remove_line_breaks', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'add_placeholders' => [ + 'name' => 'add_placeholders', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'php_helper_site' => [ + 'name' => 'php_helper_site', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + 'db' => [ + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'javascript' => [ + 'name' => 'javascript', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'description' => [ + 'name' => 'description', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_LABEL', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'debug_linenr' => [ + 'name' => 'debug_linenr', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'author' => [ + 'name' => 'author', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL', + 'type' => 'text', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, @@ -687,10 +335,10 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'copyright' => [ - 'name' => 'copyright', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_LABEL', - 'type' => 'textarea', + 'email' => [ + 'name' => 'email', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL', + 'type' => 'text', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, @@ -703,54 +351,22 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'sql_uninstall' => [ - 'name' => 'sql_uninstall', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_LABEL', - 'type' => 'textarea', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'MySQL', - 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'preferred_joomla_version' => [ - 'name' => 'preferred_joomla_version', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PREFERRED_JOOMLA_VERSION_LABEL', - 'type' => 'number', + 'website' => [ + 'name' => 'website', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL', + 'type' => 'url', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, 'tab_name' => 'Details', 'db' => [ - 'type' => 'INT(11)', - 'default' => '3', + 'type' => 'CHAR(255)', + 'default' => '', 'null_switch' => 'NOT NULL', 'unique_key' => false, 'key' => false, ], ], - 'add_powers' => [ - 'name' => 'add_powers', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_POWERS_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '1', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], 'add_sales_server' => [ 'name' => 'add_sales_server', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SALES_SERVER_LABEL', @@ -767,14 +383,14 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'backup_folder_path' => [ - 'name' => 'backup_folder_path', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_FOLDER_PATH_LABEL', - 'type' => 'text', + 'license' => [ + 'name' => 'license', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_LABEL', + 'type' => 'textarea', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, - 'tab_name' => 'Dynamic Integration', + 'tab_name' => 'Details', 'db' => [ 'type' => 'VARCHAR(255)', 'default' => '', @@ -799,13 +415,253 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'crowdin_project_identifier' => [ - 'name' => 'crowdin_project_identifier', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_LABEL', + 'bom' => [ + 'name' => 'bom', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_LABEL', + 'type' => 'filelist', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'CHAR(64)', + 'default' => '', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'image' => [ + 'name' => 'image', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL', + 'type' => 'media', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'php_admin_event' => [ + 'name' => 'php_admin_event', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + 'db' => [ + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'copyright' => [ + 'name' => 'copyright', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_LABEL', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'php_site_event' => [ + 'name' => 'php_site_event', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + 'db' => [ + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'css_admin' => [ + 'name' => 'css_admin', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_ADMIN_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'php_preflight_update' => [ + 'name' => 'php_preflight_update', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + 'db' => [ + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'component_version' => [ + 'name' => 'component_version', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL', 'type' => 'text', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'CHAR(64)', + 'default' => '', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'php_preflight_install' => [ + 'name' => 'php_preflight_install', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + 'db' => [ + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'preferred_joomla_version' => [ + 'name' => 'preferred_joomla_version', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PREFERRED_JOOMLA_VERSION_LABEL', + 'type' => 'number', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'INT(11)', + 'default' => '3', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'php_postflight_install' => [ + 'name' => 'php_postflight_install', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_POSTFLIGHT_INSTALL_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + 'db' => [ + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'add_powers' => [ + 'name' => 'add_powers', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_POWERS_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '1', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'php_method_uninstall' => [ + 'name' => 'php_method_uninstall', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_METHOD_UNINSTALL_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + 'db' => [ + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'sql' => [ + 'name' => 'sql', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_LABEL', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'MySQL', + 'db' => [ + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'addreadme' => [ + 'name' => 'addreadme', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDREADME_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Readme', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'update_server_url' => [ + 'name' => 'update_server_url', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_LABEL', + 'type' => 'url', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, 'tab_name' => 'Dynamic Integration', 'db' => [ 'type' => 'VARCHAR(255)', @@ -815,30 +671,14 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'created' => [ - 'name' => 'created', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_LABEL', - 'type' => 'calendar', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'publishing', - 'db' => [ - 'type' => 'DATETIME', - 'default' => '0000-00-00 00:00:00', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'add_php_helper_admin' => [ - 'name' => 'add_php_helper_admin', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_ADMIN_LABEL', + 'add_backup_folder_path' => [ + 'name' => 'add_backup_folder_path', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_BACKUP_FOLDER_PATH_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, - 'tab_name' => 'Libs & Helpers', + 'tab_name' => 'Dynamic Integration', 'db' => [ 'type' => 'TINYINT(1)', 'default' => '0', @@ -847,17 +687,81 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'add_admin_event' => [ - 'name' => 'add_admin_event', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_ADMIN_EVENT_LABEL', + 'translation_tool' => [ + 'name' => 'translation_tool', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TRANSLATION_TOOL_LABEL', + 'type' => 'list', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'crowdin_username' => [ + 'name' => 'crowdin_username', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_USERNAME_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'basic_encryption', + 'tab_name' => 'Dynamic Integration', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'buildcompsql' => [ + 'name' => 'buildcompsql', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL', + 'type' => 'textarea', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dynamic Build', + 'db' => [ + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'add_namespace_prefix' => [ + 'name' => 'add_namespace_prefix', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_NAMESPACE_PREFIX_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, - 'tab_name' => 'Libs & Helpers', + 'tab_name' => 'Settings', 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', + 'type' => 'CHAR(1)', + 'default' => '', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'namespace_prefix' => [ + 'name' => 'namespace_prefix', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAMESPACE_PREFIX_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Settings', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', 'null_switch' => 'NOT NULL', 'unique_key' => false, 'key' => true, @@ -895,9 +799,9 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'add_namespace_prefix' => [ - 'name' => 'add_namespace_prefix', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_NAMESPACE_PREFIX_LABEL', + 'add_menu_prefix' => [ + 'name' => 'add_menu_prefix', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_MENU_PREFIX_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', @@ -927,16 +831,16 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'namespace_prefix' => [ - 'name' => 'namespace_prefix', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAMESPACE_PREFIX_LABEL', + 'menu_prefix' => [ + 'name' => 'menu_prefix', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_PREFIX_LABEL', 'type' => 'text', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, 'tab_name' => 'Settings', 'db' => [ - 'type' => 'VARCHAR(255)', + 'type' => 'VARCHAR(100)', 'default' => '', 'null_switch' => 'NOT NULL', 'unique_key' => false, @@ -975,22 +879,6 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'add_menu_prefix' => [ - 'name' => 'add_menu_prefix', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_MENU_PREFIX_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Settings', - 'db' => [ - 'type' => 'CHAR(1)', - 'default' => '', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], 'dashboard_type' => [ 'name' => 'dashboard_type', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_TYPE_LABEL', @@ -1007,20 +895,20 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'menu_prefix' => [ - 'name' => 'menu_prefix', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_PREFIX_LABEL', + 'toignore' => [ + 'name' => 'toignore', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TOIGNORE_LABEL', 'type' => 'text', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, 'tab_name' => 'Settings', 'db' => [ - 'type' => 'VARCHAR(100)', - 'default' => '', + 'type' => 'TEXT', + 'default' => 'EMPTY', 'null_switch' => 'NOT NULL', 'unique_key' => false, - 'key' => true, + 'key' => false, ], ], 'dashboard' => [ @@ -1071,70 +959,6 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'toignore' => [ - 'name' => 'toignore', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TOIGNORE_LABEL', - 'type' => 'text', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Settings', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'add_php_postflight_install' => [ - 'name' => 'add_php_postflight_install', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_POSTFLIGHT_INSTALL_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Dash & Install', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'add_php_postflight_update' => [ - 'name' => 'add_php_postflight_update', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_POSTFLIGHT_UPDATE_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Dash & Install', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'add_php_method_uninstall' => [ - 'name' => 'add_php_method_uninstall', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_METHOD_UNINSTALL_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Dash & Install', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], 'export_key' => [ 'name' => 'export_key', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_LABEL', @@ -1151,9 +975,9 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'add_php_method_install' => [ - 'name' => 'add_php_method_install', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_METHOD_INSTALL_LABEL', + 'add_php_postflight_install' => [ + 'name' => 'add_php_postflight_install', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_POSTFLIGHT_INSTALL_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', @@ -1183,14 +1007,14 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'add_sql' => [ - 'name' => 'add_sql', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_LABEL', + 'add_php_postflight_update' => [ + 'name' => 'add_php_postflight_update', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_POSTFLIGHT_UPDATE_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, - 'tab_name' => 'MySQL', + 'tab_name' => 'Dash & Install', 'db' => [ 'type' => 'TINYINT(1)', 'default' => '0', @@ -1215,9 +1039,41 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'add_sql_uninstall' => [ - 'name' => 'add_sql_uninstall', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_UNINSTALL_LABEL', + 'add_php_method_uninstall' => [ + 'name' => 'add_php_method_uninstall', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_METHOD_UNINSTALL_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dash & Install', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'add_php_method_install' => [ + 'name' => 'add_php_method_install', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_METHOD_INSTALL_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dash & Install', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'add_sql' => [ + 'name' => 'add_sql', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', @@ -1231,38 +1087,6 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'assets_table_fix' => [ - 'name' => 'assets_table_fix', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ASSETS_TABLE_FIX_LABEL', - 'type' => 'list', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'MySQL', - 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '3', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => true, - ], - ], - 'readme' => [ - 'name' => 'readme', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Readme', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], 'addcontributors' => [ 'name' => 'addcontributors', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONTRIBUTORS_LABEL', @@ -1279,14 +1103,14 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'add_update_server' => [ - 'name' => 'add_update_server', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UPDATE_SERVER_LABEL', + 'add_sql_uninstall' => [ + 'name' => 'add_sql_uninstall', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_UNINSTALL_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, - 'tab_name' => 'Dynamic Integration', + 'tab_name' => 'MySQL', 'db' => [ 'type' => 'TINYINT(1)', 'default' => '0', @@ -1311,17 +1135,17 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'update_server_target' => [ - 'name' => 'update_server_target', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_LABEL', - 'type' => 'radio', + 'assets_table_fix' => [ + 'name' => 'assets_table_fix', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ASSETS_TABLE_FIX_LABEL', + 'type' => 'list', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, - 'tab_name' => 'Dynamic Integration', + 'tab_name' => 'MySQL', 'db' => [ 'type' => 'TINYINT(1)', - 'default' => '0', + 'default' => '3', 'null_switch' => 'NOT NULL', 'unique_key' => false, 'key' => true, @@ -1343,6 +1167,54 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], + 'readme' => [ + 'name' => 'readme', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Readme', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'add_update_server' => [ + 'name' => 'add_update_server', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UPDATE_SERVER_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'update_server_target' => [ + 'name' => 'update_server_target', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], 'update_server' => [ 'name' => 'update_server', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_LABEL', @@ -1375,6 +1247,22 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], + 'creatuserhelper' => [ + 'name' => 'creatuserhelper', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATUSERHELPER_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Libs & Helpers', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], 'add_git_folder_path' => [ 'name' => 'add_git_folder_path', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_GIT_FOLDER_PATH_LABEL', @@ -1391,6 +1279,22 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], + 'adduikit' => [ + 'name' => 'adduikit', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDUIKIT_LABEL', + 'type' => 'list', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Libs & Helpers', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], 'git_folder_path' => [ 'name' => 'git_folder_path', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GIT_FOLDER_PATH_LABEL', @@ -1407,6 +1311,22 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], + 'addfootable' => [ + 'name' => 'addfootable', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOOTABLE_LABEL', + 'type' => 'list', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Libs & Helpers', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], 'jcb_powers_path' => [ 'name' => 'jcb_powers_path', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JCB_POWERS_PATH_LABEL', @@ -1423,9 +1343,9 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'creatuserhelper' => [ - 'name' => 'creatuserhelper', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATUSERHELPER_LABEL', + 'add_email_helper' => [ + 'name' => 'add_email_helper', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', @@ -1439,10 +1359,10 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'adduikit' => [ - 'name' => 'adduikit', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDUIKIT_LABEL', - 'type' => 'list', + 'add_php_helper_both' => [ + 'name' => 'add_php_helper_both', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_BOTH_LABEL', + 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, @@ -1471,20 +1391,20 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'addfootable' => [ - 'name' => 'addfootable', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOOTABLE_LABEL', - 'type' => 'list', + 'php_helper_both' => [ + 'name' => 'php_helper_both', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_BOTH_LABEL', + 'type' => 'editor', 'title' => false, 'list' => 'joomla_components', - 'store' => NULL, + 'store' => 'base64', 'tab_name' => 'Libs & Helpers', 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', 'null_switch' => 'NOT NULL', 'unique_key' => false, - 'key' => true, + 'key' => false, ], ], 'crowdin_account_api_key' => [ @@ -1503,9 +1423,9 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'add_email_helper' => [ - 'name' => 'add_email_helper', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_LABEL', + 'add_php_helper_admin' => [ + 'name' => 'add_php_helper_admin', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_ADMIN_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', @@ -1535,20 +1455,20 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'add_php_helper_both' => [ - 'name' => 'add_php_helper_both', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_BOTH_LABEL', - 'type' => 'radio', + 'php_helper_admin' => [ + 'name' => 'php_helper_admin', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_LABEL', + 'type' => 'editor', 'title' => false, 'list' => 'joomla_components', - 'store' => NULL, + 'store' => 'base64', 'tab_name' => 'Libs & Helpers', 'db' => [ - 'type' => 'TINYINT(1)', - 'default' => '0', + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', 'null_switch' => 'NOT NULL', 'unique_key' => false, - 'key' => true, + 'key' => false, ], ], 'guid' => [ @@ -1567,20 +1487,20 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'php_helper_both' => [ - 'name' => 'php_helper_both', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_BOTH_LABEL', - 'type' => 'editor', + 'add_admin_event' => [ + 'name' => 'add_admin_event', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_ADMIN_EVENT_LABEL', + 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', - 'store' => 'base64', + 'store' => NULL, 'tab_name' => 'Libs & Helpers', 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', + 'type' => 'TINYINT(1)', + 'default' => '0', 'null_switch' => 'NOT NULL', 'unique_key' => false, - 'key' => false, + 'key' => true, ], ], 'modified' => [ @@ -3139,22 +3059,6 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'method_selection' => [ - 'name' => 'method_selection', - 'label' => 'COM_COMPONENTBUILDER_POWER_METHOD_SELECTION_LABEL', - 'type' => 'subform', - 'title' => false, - 'list' => 'powers', - 'store' => 'json', - 'tab_name' => 'Code', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NULL', - 'unique_key' => false, - 'key' => false, - ], - ], 'load_selection' => [ 'name' => 'load_selection', 'label' => 'COM_COMPONENTBUILDER_POWER_LOAD_SELECTION_LABEL', @@ -3171,22 +3075,6 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'licensing_template' => [ - 'name' => 'licensing_template', - 'label' => 'COM_COMPONENTBUILDER_POWER_LICENSING_TEMPLATE_LABEL', - 'type' => 'textarea', - 'title' => false, - 'list' => 'powers', - 'store' => 'base64', - 'tab_name' => 'Licensing', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NULL', - 'unique_key' => false, - 'key' => false, - ], - ], 'description' => [ 'name' => 'description', 'label' => 'COM_COMPONENTBUILDER_POWER_DESCRIPTION_LABEL', @@ -3219,18 +3107,18 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'extends' => [ - 'name' => 'extends', - 'label' => 'COM_COMPONENTBUILDER_POWER_EXTENDS_LABEL', - 'type' => 'classpowers', + 'licensing_template' => [ + 'name' => 'licensing_template', + 'label' => 'COM_COMPONENTBUILDER_POWER_LICENSING_TEMPLATE_LABEL', + 'type' => 'textarea', 'title' => false, 'list' => 'powers', - 'store' => NULL, - 'tab_name' => 'Code', + 'store' => 'base64', + 'tab_name' => 'Licensing', 'db' => [ - 'type' => 'VARCHAR(36)', - 'default' => '', - 'null_switch' => 'NOT NULL', + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NULL', 'unique_key' => false, 'key' => false, ], @@ -3251,13 +3139,13 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'property_selection' => [ - 'name' => 'property_selection', - 'label' => 'COM_COMPONENTBUILDER_POWER_PROPERTY_SELECTION_LABEL', - 'type' => 'subform', + 'extendsinterfaces_custom' => [ + 'name' => 'extendsinterfaces_custom', + 'label' => 'COM_COMPONENTBUILDER_POWER_EXTENDSINTERFACES_CUSTOM_LABEL', + 'type' => 'text', 'title' => false, 'list' => 'powers', - 'store' => 'json', + 'store' => NULL, 'tab_name' => 'Code', 'db' => [ 'type' => 'TEXT', @@ -3283,6 +3171,22 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], + 'extends' => [ + 'name' => 'extends', + 'label' => 'COM_COMPONENTBUILDER_POWER_EXTENDS_LABEL', + 'type' => 'classpowers', + 'title' => false, + 'list' => 'powers', + 'store' => NULL, + 'tab_name' => 'Code', + 'db' => [ + 'type' => 'VARCHAR(36)', + 'default' => '', + 'null_switch' => 'NULL', + 'unique_key' => false, + 'key' => false, + ], + ], 'extends_custom' => [ 'name' => 'extends_custom', 'label' => 'COM_COMPONENTBUILDER_POWER_EXTENDS_CUSTOM_LABEL', @@ -3331,13 +3235,45 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'head' => [ - 'name' => 'head', - 'label' => 'COM_COMPONENTBUILDER_POWER_HEAD_LABEL', - 'type' => 'editor', + 'property_selection' => [ + 'name' => 'property_selection', + 'label' => 'COM_COMPONENTBUILDER_POWER_PROPERTY_SELECTION_LABEL', + 'type' => 'subform', 'title' => false, 'list' => 'powers', - 'store' => 'base64', + 'store' => 'json', + 'tab_name' => 'Code', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'extendsinterfaces' => [ + 'name' => 'extendsinterfaces', + 'label' => 'COM_COMPONENTBUILDER_POWER_EXTENDSINTERFACES_LABEL', + 'type' => 'interfacepowers', + 'title' => false, + 'list' => 'powers', + 'store' => 'json', + 'tab_name' => 'Code', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'method_selection' => [ + 'name' => 'method_selection', + 'label' => 'COM_COMPONENTBUILDER_POWER_METHOD_SELECTION_LABEL', + 'type' => 'subform', + 'title' => false, + 'list' => 'powers', + 'store' => 'json', 'tab_name' => 'Code', 'db' => [ 'type' => 'TEXT', @@ -3363,6 +3299,22 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], + 'head' => [ + 'name' => 'head', + 'label' => 'COM_COMPONENTBUILDER_POWER_HEAD_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'powers', + 'store' => 'base64', + 'tab_name' => 'Code', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NULL', + 'unique_key' => false, + 'key' => false, + ], + ], 'use_selection' => [ 'name' => 'use_selection', 'label' => 'COM_COMPONENTBUILDER_POWER_USE_SELECTION_LABEL', @@ -3379,22 +3331,6 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'main_class_code' => [ - 'name' => 'main_class_code', - 'label' => 'COM_COMPONENTBUILDER_POWER_MAIN_CLASS_CODE_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'powers', - 'store' => 'base64', - 'tab_name' => 'Code', - 'db' => [ - 'type' => 'MEDIUMTEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], 'add_licensing_template' => [ 'name' => 'add_licensing_template', 'label' => 'COM_COMPONENTBUILDER_POWER_ADD_LICENSING_TEMPLATE_LABEL', @@ -3411,6 +3347,22 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], + 'main_class_code' => [ + 'name' => 'main_class_code', + 'label' => 'COM_COMPONENTBUILDER_POWER_MAIN_CLASS_CODE_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'powers', + 'store' => 'base64', + 'tab_name' => 'Code', + 'db' => [ + 'type' => 'MEDIUMTEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], 'guid' => [ 'name' => 'guid', 'label' => 'COM_COMPONENTBUILDER_POWER_GUID_LABEL', @@ -8131,6 +8083,22 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], + 'on_get_model_field' => [ + 'name' => 'on_get_model_field', + 'label' => 'COM_COMPONENTBUILDER_FIELD_ON_GET_MODEL_FIELD_LABEL', + 'type' => 'textarea', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Database', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], 'on_save_model_field' => [ 'name' => 'on_save_model_field', 'label' => 'COM_COMPONENTBUILDER_FIELD_ON_SAVE_MODEL_FIELD_LABEL', @@ -8163,22 +8131,6 @@ class Table extends BaseTable implements Tableinterface 'key' => false, ], ], - 'initiator_on_save_model' => [ - 'name' => 'initiator_on_save_model', - 'label' => 'COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_SAVE_MODEL_LABEL', - 'type' => 'textarea', - 'title' => false, - 'list' => 'fields', - 'store' => 'base64', - 'tab_name' => 'Database', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], 'xml' => [ 'name' => 'xml', 'label' => '', @@ -8211,6 +8163,22 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], + 'javascript_view_footer' => [ + 'name' => 'javascript_view_footer', + 'label' => 'COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Scripts', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], 'css_views' => [ 'name' => 'css_views', 'label' => 'COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_LABEL', @@ -8291,38 +8259,6 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], - 'on_get_model_field' => [ - 'name' => 'on_get_model_field', - 'label' => 'COM_COMPONENTBUILDER_FIELD_ON_GET_MODEL_FIELD_LABEL', - 'type' => 'textarea', - 'title' => false, - 'list' => 'fields', - 'store' => 'base64', - 'tab_name' => 'Database', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], - 'javascript_view_footer' => [ - 'name' => 'javascript_view_footer', - 'label' => 'COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'fields', - 'store' => 'base64', - 'tab_name' => 'Scripts', - 'db' => [ - 'type' => 'TEXT', - 'default' => 'EMPTY', - 'null_switch' => 'NOT NULL', - 'unique_key' => false, - 'key' => false, - ], - ], 'javascript_views_footer' => [ 'name' => 'javascript_views_footer', 'label' => 'COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_LABEL', @@ -8403,6 +8339,22 @@ class Table extends BaseTable implements Tableinterface 'key' => true, ], ], + 'initiator_on_save_model' => [ + 'name' => 'initiator_on_save_model', + 'label' => 'COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_SAVE_MODEL_LABEL', + 'type' => 'textarea', + 'title' => false, + 'list' => 'fields', + 'store' => 'base64', + 'tab_name' => 'Database', + 'db' => [ + 'type' => 'TEXT', + 'default' => 'EMPTY', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], 'guid' => [ 'name' => 'guid', 'label' => 'COM_COMPONENTBUILDER_FIELD_GUID_LABEL', @@ -9042,6 +8994,214 @@ class Table extends BaseTable implements Tableinterface ], ], ], + 'repository' => [ + 'system_name' => [ + 'name' => 'system_name', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_SYSTEM_NAME_LABEL', + 'type' => 'text', + 'title' => true, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'organisation' => [ + 'name' => 'organisation', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'repository' => [ + 'name' => 'repository', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_REPOSITORY_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'target' => [ + 'name' => 'target', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_TARGET_LABEL', + 'type' => 'list', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'TINYINT(7)', + 'default' => '1', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'type' => [ + 'name' => 'type', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_TYPE_LABEL', + 'type' => 'list', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '1', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'base' => [ + 'name' => 'base', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_BASE_LABEL', + 'type' => 'url', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => false, + ], + ], + 'guid' => [ + 'name' => 'guid', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_GUID_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'publishing', + 'db' => [ + 'type' => 'VARCHAR(36)', + 'default' => '', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'access_repo' => [ + 'name' => 'access_repo', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'TINYINT(1)', + 'default' => '0', + 'null_switch' => 'NOT NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'write_branch' => [ + 'name' => 'write_branch', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_WRITE_BRANCH_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', + 'null_switch' => 'NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'read_branch' => [ + 'name' => 'read_branch', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', + 'null_switch' => 'NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'token' => [ + 'name' => 'token', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_TOKEN_LABEL', + 'type' => 'password', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', + 'null_switch' => 'NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'username' => [ + 'name' => 'username', + 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_USERNAME_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'repositories', + 'store' => NULL, + 'tab_name' => 'Details', + 'db' => [ + 'type' => 'VARCHAR(255)', + 'default' => '', + 'null_switch' => 'NULL', + 'unique_key' => false, + 'key' => true, + ], + ], + 'access' => [ + 'name' => 'access', + 'label' => 'Access', + 'type' => 'accesslevel', + 'title' => false, + 'store' => NULL, + 'tab_name' => NULL, + 'db' => [ + 'type' => 'INT(10) unsigned', + 'default' => '0', + 'key' => true, + 'null_switch' => 'NOT NULL', + ], + ], + ], 'help_document' => [ 'title' => [ 'name' => 'title', diff --git a/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/settings.json b/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/settings.json index 792caaf..eabd6de 100644 --- a/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/settings.json +++ b/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/settings.json @@ -12,6 +12,7 @@ "system_name": "JCB.Table", "type": "class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Componentbuilder.Table", "description": "JCB Tables\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/c09e8968-c767-4175-bb3d-8432f206a2c7/README.md b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/README.md index 0b6cf72..82b2d56 100644 --- a/src/c09e8968-c767-4175-bb3d-8432f206a2c7/README.md +++ b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # trait IsArray (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** +> namespace: **VDM\Joomla\Abstraction\Registry\Traits** +> extends: **** ```uml @startuml class IsArray << (T,Orange) >> #Turquoise { diff --git a/src/c09e8968-c767-4175-bb3d-8432f206a2c7/code.php b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/code.php index 23328e0..cdf224b 100644 --- a/src/c09e8968-c767-4175-bb3d-8432f206a2c7/code.php +++ b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits; +namespace VDM\Joomla\Abstraction\Registry\Traits; /** diff --git a/src/c09e8968-c767-4175-bb3d-8432f206a2c7/settings.json b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/settings.json index 31e2921..59293f8 100644 --- a/src/c09e8968-c767-4175-bb3d-8432f206a2c7/settings.json +++ b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "c09e8968-c767-4175-bb3d-8432f206a2c7", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Abstraction.Registry.Traits.IsArray", "type": "trait", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.IsArray", "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/c182506a-ab84-439c-b962-1e606b58d545/README.md b/src/c182506a-ab84-439c-b962-1e606b58d545/README.md index 7518dd3..243cabd 100644 --- a/src/c182506a-ab84-439c-b962-1e606b58d545/README.md +++ b/src/c182506a-ab84-439c-b962-1e606b58d545/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # interface GrepInterface (Details) -> namespace: **VastDevelopmentMethod\Joomla\Interfaces** +> namespace: **VDM\Joomla\Interfaces** +> extends: **** ```uml @startuml interface GrepInterface #Lavender { diff --git a/src/c182506a-ab84-439c-b962-1e606b58d545/code.php b/src/c182506a-ab84-439c-b962-1e606b58d545/code.php index 97fc8e0..5b1badb 100644 --- a/src/c182506a-ab84-439c-b962-1e606b58d545/code.php +++ b/src/c182506a-ab84-439c-b962-1e606b58d545/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Interfaces; +namespace VDM\Joomla\Interfaces; /** diff --git a/src/c182506a-ab84-439c-b962-1e606b58d545/settings.json b/src/c182506a-ab84-439c-b962-1e606b58d545/settings.json index 42525d1..a9a1495 100644 --- a/src/c182506a-ab84-439c-b962-1e606b58d545/settings.json +++ b/src/c182506a-ab84-439c-b962-1e606b58d545/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "c182506a-ab84-439c-b962-1e606b58d545", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Interfaces.GrepInterface", "type": "interface", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.GrepInterface", "description": "Global Resource Empowerment Platform\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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/README.md b/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/README.md new file mode 100644 index 0000000..5995530 --- /dev/null +++ b/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/README.md @@ -0,0 +1,89 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# interface LoadInterface (Details) +> namespace: **VDM\Joomla\Interfaces\Data** +> extends: **** +```uml +@startuml +interface LoadInterface #Lavender { + + table(?string $table) : self + + value(array $keys, string $field) : mixed + + item(array $keys) : ?object + + items(array $keys) : ?array + + getTable() : string +} + +note right of LoadInterface::table + Set the current active table + + since: 3.2.2 + return: self +end note + +note right of LoadInterface::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 LoadInterface::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 LoadInterface::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($keys); + + since: 2.0.1 + return: ?array +end note + +note right of LoadInterface::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) + diff --git a/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/code.php b/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/code.php new file mode 100644 index 0000000..f43616f --- /dev/null +++ b/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/code.php @@ -0,0 +1,90 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Interfaces\Data; + + +/** + * Data Load Interface + * + * @since 3.2.2 + */ +interface LoadInterface +{ + /** + * 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; + + /** + * 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); + + /** + * 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; + + /** + * 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($keys); + * + * @param array $keys The item keys + * + * @return array|null + * @since 2.0.1 + */ + public function items(array $keys): ?array; + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string; +} + diff --git a/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/code.power b/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/code.power new file mode 100644 index 0000000..4e5e884 --- /dev/null +++ b/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/code.power @@ -0,0 +1,67 @@ + /** + * 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; + + /** + * 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); + + /** + * 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; + + /** + * 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($keys); + * + * @param array $keys The item keys + * + * @return array|null + * @since 2.0.1 + */ + public function items(array $keys): ?array; + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string; \ No newline at end of file diff --git a/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/settings.json b/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/settings.json new file mode 100644 index 0000000..bd7fa7c --- /dev/null +++ b/src/c548640c-a461-4424-9ac5-8dfb5ed06d8d/settings.json @@ -0,0 +1,19 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "", + "guid": "c548640c-a461-4424-9ac5-8dfb5ed06d8d", + "implements": null, + "load_selection": null, + "name": "LoadInterface", + "power_version": "1.0.0", + "system_name": "VDM.Interfaces.Data.LoadInterface", + "type": "interface", + "use_selection": null, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Data.LoadInterface", + "description": "Data Load 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/README.md b/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/README.md index cbeec08..1de895a 100644 --- a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/README.md +++ b/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # interface FactoryInterface (Details) -> namespace: **VastDevelopmentMethod\Joomla\Interfaces** +> namespace: **VDM\Joomla\Interfaces** +> extends: **** ```uml @startuml interface FactoryInterface #Lavender { diff --git a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.php b/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.php index f8edaae..0dd2e4c 100644 --- a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.php +++ b/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Interfaces; +namespace VDM\Joomla\Interfaces; use Joomla\DI\Container; diff --git a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/settings.json b/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/settings.json index b81521e..7eb747d 100644 --- a/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/settings.json +++ b/src/caf33c5d-858c-4f9a-894f-ab302ec5445a/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "caf33c5d-858c-4f9a-894f-ab302ec5445a", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Interfaces.FactoryInterface", "type": "interface", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.FactoryInterface", "description": "The Container Factory Interface", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/cce56585-58b0-4f72-a92c-e2635ea52d83/README.md b/src/cce56585-58b0-4f72-a92c-e2635ea52d83/README.md index 72a5916..0eefc6a 100644 --- a/src/cce56585-58b0-4f72-a92c-e2635ea52d83/README.md +++ b/src/cce56585-58b0-4f72-a92c-e2635ea52d83/README.md @@ -7,7 +7,7 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # final class Update (Details) -> namespace: **VastDevelopmentMethod\Joomla\Database** +> namespace: **VDM\Joomla\Database** > extends: **Database** ```uml @startuml diff --git a/src/cce56585-58b0-4f72-a92c-e2635ea52d83/code.php b/src/cce56585-58b0-4f72-a92c-e2635ea52d83/code.php index 34729d5..6c4a122 100644 --- a/src/cce56585-58b0-4f72-a92c-e2635ea52d83/code.php +++ b/src/cce56585-58b0-4f72-a92c-e2635ea52d83/code.php @@ -9,11 +9,11 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Database; +namespace VDM\Joomla\Database; -use VastDevelopmentMethod\Joomla\Interfaces\UpdateInterface; -use VastDevelopmentMethod\Joomla\Abstraction\Database; +use VDM\Joomla\Interfaces\UpdateInterface; +use VDM\Joomla\Abstraction\Database; /** diff --git a/src/cce56585-58b0-4f72-a92c-e2635ea52d83/settings.json b/src/cce56585-58b0-4f72-a92c-e2635ea52d83/settings.json index 63a0549..09c7dba 100644 --- a/src/cce56585-58b0-4f72-a92c-e2635ea52d83/settings.json +++ b/src/cce56585-58b0-4f72-a92c-e2635ea52d83/settings.json @@ -12,6 +12,7 @@ "system_name": "VDM.Database.Update", "type": "final class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Database.Update", "description": "Database Update 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/cddcac51-9a46-47c4-ba59-105c70453bd6/README.md b/src/cddcac51-9a46-47c4-ba59-105c70453bd6/README.md index 990d057..60ae64d 100644 --- a/src/cddcac51-9a46-47c4-ba59-105c70453bd6/README.md +++ b/src/cddcac51-9a46-47c4-ba59-105c70453bd6/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class FilterHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Componentbuilder\Utilities** +> namespace: **VDM\Joomla\Componentbuilder\Utilities** +> extends: **** ```uml @startuml abstract FilterHelper #Orange { @@ -20,6 +21,7 @@ abstract FilterHelper #Orange { + {static} translations($language, $translated = true) : ?array + {static} languages() : ?array + {static} paths(string $path) : ?array + + {static} repositories(int $target) : ?array - {static} joomla_component_admin_views(int $id) : ?array - {static} joomla_component_custom_admin_views(int $id) : ?array - {static} joomla_component_site_views(int $id) : ?array @@ -92,49 +94,56 @@ note right of FilterHelper::paths return: ?array end note -note left of FilterHelper::joomla_component_admin_views +note left of FilterHelper::repositories + get available repositories of target area + + since: 3.2.0 + return: ?array +end note + +note right of FilterHelper::joomla_component_admin_views Get a component admin views IDs since: 3.2.0 return: ?array end note -note right of FilterHelper::joomla_component_custom_admin_views +note left of FilterHelper::joomla_component_custom_admin_views get a component custom admin views IDs since: 3.2.0 return: ?array end note -note left of FilterHelper::joomla_component_site_views +note right of FilterHelper::joomla_component_site_views get a component site views IDs since: 3.2.0 return: ?array end note -note right of FilterHelper::joomla_component +note left of FilterHelper::joomla_component get a component fields IDs since: 3.2.0 return: ?array end note -note left of FilterHelper::joomla_module +note right of FilterHelper::joomla_module get a module fields IDs since: 3.2.0 return: ?array end note -note right of FilterHelper::joomla_plugin +note left of FilterHelper::joomla_plugin get a plugin fields IDs since: 3.2.0 return: ?array end note -note left of FilterHelper::admin_view +note right of FilterHelper::admin_view get an admin view fields IDs since: 3.2.0 diff --git a/src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.php b/src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.php index 4abcbb3..999c38e 100644 --- a/src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.php +++ b/src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.php @@ -9,14 +9,14 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Componentbuilder\Utilities; +namespace VDM\Joomla\Componentbuilder\Utilities; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; -use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper; -use VastDevelopmentMethod\Joomla\Utilities\JsonHelper; -use VastDevelopmentMethod\Joomla\Utilities\GetHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\GetHelper; /** @@ -465,6 +465,42 @@ abstract class FilterHelper return null; } + /** + * get available repositories of target area + * + * @param int $target The target area + * + * @return array|null The result ids + * @since 3.2.0 + **/ + public static function repositories(int $target): ?array + { + $db = Factory::getDbo(); + $query = $db->getQuery(true); + $query + ->select($db->quoteName(array('repository', 'organisation'))) + ->from($db->quoteName('#__componentbuilder_repository')) + ->where($db->quoteName('published') . ' >= 1') + ->where($db->quoteName('target') . ' = ' . $target) + ->order($db->quoteName('ordering') . ' desc'); + $db->setQuery($query); + $db->execute(); + + if ($db->getNumRows()) + { + $items = $db->loadObjectList(); + $options = []; + foreach($items as $item) + { + $path = $item->organisation . '/' . $item->repository; + $options[$path] = $path; + } + return $options; + } + + return null; + } + /** * Get a component admin views IDs * diff --git a/src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.power b/src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.power index 7c565d5..e98b951 100644 --- a/src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.power +++ b/src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.power @@ -437,6 +437,42 @@ return null; } + /** + * get available repositories of target area + * + * @param int $target The target area + * + * @return array|null The result ids + * @since 3.2.0 + **/ + public static function repositories(int $target): ?array + { + $db = Factory::getDbo(); + $query = $db->getQuery(true); + $query + ->select($db->quoteName(array('repository', 'organisation'))) + ->from($db->quoteName('#__componentbuilder_repository')) + ->where($db->quoteName('published') . ' >= 1') + ->where($db->quoteName('target') . ' = ' . $target) + ->order($db->quoteName('ordering') . ' desc'); + $db->setQuery($query); + $db->execute(); + + if ($db->getNumRows()) + { + $items = $db->loadObjectList(); + $options = []; + foreach($items as $item) + { + $path = $item->organisation . '/' . $item->repository; + $options[$path] = $path; + } + return $options; + } + + return null; + } + /** * Get a component admin views IDs * diff --git a/src/cddcac51-9a46-47c4-ba59-105c70453bd6/settings.json b/src/cddcac51-9a46-47c4-ba59-105c70453bd6/settings.json index bde140f..48cf458 100644 --- a/src/cddcac51-9a46-47c4-ba59-105c70453bd6/settings.json +++ b/src/cddcac51-9a46-47c4-ba59-105c70453bd6/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "cddcac51-9a46-47c4-ba59-105c70453bd6", "implements": null, "load_selection": null, @@ -23,6 +23,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Componentbuilder.Utilities.FilterHelper", "description": "Filter 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/README.md b/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/README.md index 29f6773..c43cd3c 100644 --- a/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/README.md +++ b/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class NamespaceHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities\String** +> namespace: **VDM\Joomla\Utilities\String** +> extends: **** ```uml @startuml abstract NamespaceHelper #Orange { diff --git a/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/code.php b/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/code.php index 5d97c13..55ee2e4 100644 --- a/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/code.php +++ b/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/code.php @@ -9,10 +9,10 @@ * @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; /** diff --git a/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/settings.json b/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/settings.json index 1280566..e614c6e 100644 --- a/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/settings.json +++ b/src/ce8cf834-6bac-44fb-941c-861f7e046cc0/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "ce8cf834-6bac-44fb-941c-861f7e046cc0", "implements": null, "load_selection": null, @@ -15,6 +15,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.NamespaceHelper", "description": "Control the naming of a namespace 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/README.md b/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/README.md index 64eaee2..345798d 100644 --- a/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/README.md +++ b/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/README.md @@ -7,7 +7,7 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class GetHelperExtrusion (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** > extends: **GetHelper** ```uml @startuml diff --git a/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/code.php b/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/code.php index 3958ae3..e607e39 100644 --- a/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/code.php +++ b/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/code.php @@ -9,10 +9,10 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities; +namespace VDM\Joomla\Utilities; -use VastDevelopmentMethod\Joomla\Utilities\GetHelper; +use VDM\Joomla\Utilities\GetHelper; /** diff --git a/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/settings.json b/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/settings.json index cbc62fa..9b8b69b 100644 --- a/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/settings.json +++ b/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/settings.json @@ -17,6 +17,7 @@ "system_name": "Utilities Extrusion GetHelper", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.GetHelperExtrusion", "description": "Some easy get...\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/README.md b/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/README.md new file mode 100644 index 0000000..f629a79 --- /dev/null +++ b/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/README.md @@ -0,0 +1,62 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# interface DeleteInterface (Details) +> namespace: **VDM\Joomla\Interfaces\Data** +> extends: **** +```uml +@startuml +interface DeleteInterface #Lavender { + + table(?string $table) : self + + items(array $conditions) : bool + + truncate() : void + + getTable() : string +} + +note right of DeleteInterface::table + Set the current active table + + since: 3.2.2 + return: self +end note + +note right of DeleteInterface::items + Delete all items in the database that match these conditions + + since: 3.2.2 + return: bool +end note + +note right of DeleteInterface::truncate + Truncate a table + + since: 3.2.2 + return: void +end note + +note right of DeleteInterface::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) + diff --git a/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/code.php b/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/code.php new file mode 100644 index 0000000..46cc708 --- /dev/null +++ b/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/code.php @@ -0,0 +1,60 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Interfaces\Data; + + +/** + * Data Delete + * + * @since 3.2.2 + */ +interface DeleteInterface +{ + /** + * 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; + + /** + * 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; + + /** + * Truncate a table + * + * @param string|null $table The table that should be truncated + * + * @return void + * @since 3.2.2 + **/ + public function truncate(): void; + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string; +} + diff --git a/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/code.power b/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/code.power new file mode 100644 index 0000000..51ec641 --- /dev/null +++ b/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/code.power @@ -0,0 +1,37 @@ + /** + * 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; + + /** + * 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; + + /** + * Truncate a table + * + * @param string|null $table The table that should be truncated + * + * @return void + * @since 3.2.2 + **/ + public function truncate(): void; + + /** + * Get the current active table + * + * @return string + * @since 3.2.2 + */ + public function getTable(): string; \ No newline at end of file diff --git a/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/settings.json b/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/settings.json new file mode 100644 index 0000000..296ebf9 --- /dev/null +++ b/src/d8f9ba53-c490-4e8b-8e9f-6757224e069c/settings.json @@ -0,0 +1,19 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "", + "guid": "d8f9ba53-c490-4e8b-8e9f-6757224e069c", + "implements": null, + "load_selection": null, + "name": "DeleteInterface", + "power_version": "1.0.0", + "system_name": "VDM.Interfaces.Data.DeleteInterface", + "type": "interface", + "use_selection": null, + "extendsinterfaces": null, + "namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Data.DeleteInterface", + "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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file diff --git a/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/README.md b/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/README.md index 4347f74..459b9ef 100644 --- a/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/README.md +++ b/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class GetHelper (Details) -> namespace: **VastDevelopmentMethod\Joomla\Utilities** +> namespace: **VDM\Joomla\Utilities** +> extends: **** ```uml @startuml abstract GetHelper #Orange { diff --git a/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/code.php b/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/code.php index d485ee4..1f89e7b 100644 --- a/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/code.php +++ b/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/code.php @@ -9,11 +9,11 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Utilities; +namespace VDM\Joomla\Utilities; use Joomla\CMS\Factory; -use VastDevelopmentMethod\Joomla\Utilities\Component\Helper; +use VDM\Joomla\Utilities\Component\Helper; /** diff --git a/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/settings.json b/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/settings.json index 232cfac..1643eb9 100644 --- a/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/settings.json +++ b/src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "db87c339-5bb6-4291-a7ef-2c48ea1b06bc", "implements": null, "load_selection": { @@ -22,6 +22,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.GetHelper", "description": "Some easy get...\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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/README.md b/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/README.md index 8ec415c..02118ed 100644 --- a/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/README.md +++ b/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class BaseTable (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction** +> namespace: **VDM\Joomla\Abstraction** +> extends: **** ```uml @startuml abstract BaseTable #Orange { diff --git a/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/code.php b/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/code.php index 0188383..46227ed 100644 --- a/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/code.php +++ b/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/code.php @@ -9,10 +9,10 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Abstraction; +namespace VDM\Joomla\Abstraction; -use VastDevelopmentMethod\Joomla\Interfaces\Tableinterface; +use VDM\Joomla\Interfaces\Tableinterface; /** diff --git a/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/settings.json b/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/settings.json index ebb6500..a4e9877 100644 --- a/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/settings.json +++ b/src/e0f6ddbe-2a35-4537-942c-faff2ebd04f6/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "e0f6ddbe-2a35-4537-942c-faff2ebd04f6", "implements": [ "2da6d6c4-eb29-4d69-8bc2-36d96e916adf" @@ -12,6 +12,7 @@ "system_name": "VDM.Abstraction.BaseTable", "type": "abstract class", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.BaseTable", "description": "Base Table\r\n\r\n@since 3.2.0", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/README.md b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/README.md index e88597e..0ae4dcf 100644 --- a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/README.md +++ b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class Schema (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction** +> namespace: **VDM\Joomla\Abstraction** +> extends: **** ```uml @startuml abstract Schema #Orange { @@ -31,6 +32,7 @@ abstract Schema #Orange { # checkColumnsDataType(string $table, array $columns) : void # getColumnDefinition(string $table, string $field) : ?string # checkDefault(string $table, string $column) : bool + # checkNull(string $table, string $column) : bool # updateColumnsDataType(string $table, array $columns) : void # getTable(string $table) : string # isDataTypeChangeSignificant(string $currentType, string $expectedType) : bool @@ -121,21 +123,28 @@ note right of Schema::checkDefault return: bool end note -note left of Schema::updateColumnsDataType +note left of Schema::checkNull + Check and Update the null value if needed, including existing data adjustments + + since: 3.2.2 + return: bool +end note + +note right of Schema::updateColumnsDataType Update the data type of the given fields. since: 3.2.1 return: void end note -note right of Schema::getTable +note left of Schema::getTable Add the component name to get the full table name. since: 3.2.1 return: string end note -note left of Schema::isDataTypeChangeSignificant +note right of Schema::isDataTypeChangeSignificant Determines if the change in data type between two definitions is significant. This function checks if there's a significant difference between the current data type and the expected data type that would require updating the database schema. @@ -146,7 +155,7 @@ irrelevant for storage but considers size and other modifiers for types like VAR return: bool end note -note right of Schema::adjustExistingDefaults +note left of Schema::adjustExistingDefaults Updates existing rows in a column to a new default value since: 3.2.1 @@ -159,7 +168,7 @@ note right of Schema::adjustExistingDefaults mixed $newDefault end note -note left of Schema::updateColumnDataType +note right of Schema::updateColumnDataType Update the data type of the given field. since: 3.2.1 @@ -171,39 +180,39 @@ note left of Schema::updateColumnDataType string $field end note -note right of Schema::getTableKeys +note left of Schema::getTableKeys Key all needed keys for this table since: 3.2.1 return: string end note -note left of Schema::setKeys +note right of Schema::setKeys Function to set the view keys since: 3.2.1 return: void end note -note right of Schema::setUniqueKey +note left of Schema::setUniqueKey Function to set the unique key since: 3.2.1 return: void end note -note left of Schema::setKey +note right of Schema::setKey Function to set the key since: 3.2.1 return: void end note -note right of Schema::getDefaultValue +note left of Schema::getDefaultValue Adjusts the default value SQL fragment for a database field based on its type and specific rules. If the field is of type DATETIME and the Joomla version is not 3, it sets the default to CURRENT_TIMESTAMP -if not explicitly specified otherwise. For all other types, or when a 'EMPTY' default is specified, it handles -defaults by either leaving them unset or applying the provided default, properly quoted for SQL safety. +if not explicitly specified otherwise. For all other types it handles defaults by either leaving them unset or applying +the provided default, properly quoted for SQL safety. When a 'EMPTY' default is specified, it returns no default at all. (:) since: 3.2.1 return: string @@ -214,7 +223,7 @@ defaults by either leaving them unset or applying the provided default, properly bool $pure = false end note -note left of Schema::quote +note right of Schema::quote Set a value based on data type since: 3.2.0 diff --git a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.php b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.php index d449f12..a41d27b 100644 --- a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.php +++ b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.php @@ -9,13 +9,13 @@ * @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\Version; -use VastDevelopmentMethod\Joomla\Interfaces\Tableinterface as Table; -use VastDevelopmentMethod\Joomla\Interfaces\SchemaInterface; +use VDM\Joomla\Interfaces\Tableinterface as Table; +use VDM\Joomla\Interfaces\SchemaInterface; /** @@ -343,9 +343,17 @@ abstract class Schema implements SchemaInterface 'expected' => $expected['type'] ]; } - // check if update of default values is needed - if ($this->checkDefault($table, $column) && !isset($requireUpdate[$column])) + elseif ($this->checkDefault($table, $column)) + { + $requireUpdate[$column] = [ + 'column' => $column, + 'current' => $current->Type, + 'expected' => $expected['type'] + ]; + } + // check if update of null is needed + elseif ($this->checkNull($table, $column)) { $requireUpdate[$column] = [ 'column' => $column, @@ -391,13 +399,21 @@ abstract class Schema implements SchemaInterface $default = $this->getDefaultValue($type, $db_default); // Prepare the null switch, and auto increment statement - $null_switch = !empty($db['null_switch']) ? " " . $db['null_switch'] : ''; + $null_switch = !empty($db['null_switch']) ? ' ' . $db['null_switch'] : ''; + + // Prepare the auto increment statement $auto_increment = !empty($db['auto_increment']) ? " AUTO_INCREMENT" : ''; + // If there's a default value, the column should not be nullable + if ($default !== '') + { + $null_switch = ''; + } + $this->setKeys($db); // Assemble the SQL snippet for the column definition - return "{$column_name} {$type}{$null_switch}{$default}{$auto_increment}"; + return "{$column_name} {$type}{$null_switch}{$auto_increment}{$default}"; } catch (\Exception $e) { throw new \Exception("Error: failed to generate column definition for ($table.$field). " . $e->getMessage()); } @@ -448,6 +464,61 @@ abstract class Schema implements SchemaInterface return false; } + /** + * Check and Update the null value if needed, including existing data adjustments + * + * @param string $table The table to update. + * @param string $column The column/field to check. + * + * @return bool + * @since 3.2.2 + */ + protected function checkNull(string $table, string $column): bool + { + // Retrieve the expected column configuration + $expected = $this->table->get($table, $column, 'db'); + + // Skip updates if the null_switch is not set + if (!isset($expected['null_switch'])) + { + return false; + } + + // Retrieve the current column configuration + $current = $this->columns[$column]; + + // Skip updates if the Null is not set + if (!isset($current->Null)) + { + return false; + } + + // set the expected NULL + $expected_null = 'NO'; + if ($expected['null_switch'] === "NULL") + { + $expected_null = 'YES'; + } + + // set the current NULL + $current_null = $current->Null; + + // Prepare the type and default value SQL statement + $type = $expected['type'] ?? 'TEXT'; + $db_default = isset($expected['default']) ? $expected['default'] : null; + $default = $this->getDefaultValue($type, $db_default, true); + + // check the null values if they match + if ($current_null !== $expected_null && $current_null === 'NO' && empty($default)) + { + $this->success[] = "Success: updated the ($column) null state in $table table."; + + return true; + } + + return false; + } + /** * Update the data type of the given fields. * @@ -679,8 +750,8 @@ abstract class Schema implements SchemaInterface * Adjusts the default value SQL fragment for a database field based on its type and specific rules. * * If the field is of type DATETIME and the Joomla version is not 3, it sets the default to CURRENT_TIMESTAMP - * if not explicitly specified otherwise. For all other types, or when a 'EMPTY' default is specified, it handles - * defaults by either leaving them unset or applying the provided default, properly quoted for SQL safety. + * if not explicitly specified otherwise. For all other types it handles defaults by either leaving them unset or applying + * the provided default, properly quoted for SQL safety. When a 'EMPTY' default is specified, it returns no default at all. (:) * * @param string $type The type of the database field (e.g., 'DATETIME'). * @param string|null $defaultValue Optional default value for the field, null if not provided. @@ -691,7 +762,7 @@ abstract class Schema implements SchemaInterface */ protected function getDefaultValue(string $type, ?string $defaultValue, bool $pure = false): string { - if ($defaultValue === null) + if ($defaultValue === null || strtoupper($defaultValue) === 'EMPTY') { return ''; } @@ -722,11 +793,7 @@ abstract class Schema implements SchemaInterface return 'NULL'; } - if (is_string($value) && strtoupper($value) === 'EMPTY') - { - return "''"; - } - elseif (is_numeric($value)) + if (is_numeric($value)) { if (filter_var($value, FILTER_VALIDATE_INT)) { diff --git a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.power b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.power index 33941db..2e98c39 100644 --- a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.power +++ b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.power @@ -316,9 +316,17 @@ 'expected' => $expected['type'] ]; } - // check if update of default values is needed - if ($this->checkDefault($table, $column) && !isset($requireUpdate[$column])) + elseif ($this->checkDefault($table, $column)) + { + $requireUpdate[$column] = [ + 'column' => $column, + 'current' => $current->Type, + 'expected' => $expected['type'] + ]; + } + // check if update of null is needed + elseif ($this->checkNull($table, $column)) { $requireUpdate[$column] = [ 'column' => $column, @@ -364,13 +372,21 @@ $default = $this->getDefaultValue($type, $db_default); // Prepare the null switch, and auto increment statement - $null_switch = !empty($db['null_switch']) ? " " . $db['null_switch'] : ''; + $null_switch = !empty($db['null_switch']) ? ' ' . $db['null_switch'] : ''; + + // Prepare the auto increment statement $auto_increment = !empty($db['auto_increment']) ? " AUTO_INCREMENT" : ''; + // If there's a default value, the column should not be nullable + if ($default !== '') + { + $null_switch = ''; + } + $this->setKeys($db); // Assemble the SQL snippet for the column definition - return "{$column_name} {$type}{$null_switch}{$default}{$auto_increment}"; + return "{$column_name} {$type}{$null_switch}{$auto_increment}{$default}"; } catch (\Exception $e) { throw new \Exception("Error: failed to generate column definition for ($table.$field). " . $e->getMessage()); } @@ -421,6 +437,61 @@ return false; } + /** + * Check and Update the null value if needed, including existing data adjustments + * + * @param string $table The table to update. + * @param string $column The column/field to check. + * + * @return bool + * @since 3.2.2 + */ + protected function checkNull(string $table, string $column): bool + { + // Retrieve the expected column configuration + $expected = $this->table->get($table, $column, 'db'); + + // Skip updates if the null_switch is not set + if (!isset($expected['null_switch'])) + { + return false; + } + + // Retrieve the current column configuration + $current = $this->columns[$column]; + + // Skip updates if the Null is not set + if (!isset($current->Null)) + { + return false; + } + + // set the expected NULL + $expected_null = 'NO'; + if ($expected['null_switch'] === "NULL") + { + $expected_null = 'YES'; + } + + // set the current NULL + $current_null = $current->Null; + + // Prepare the type and default value SQL statement + $type = $expected['type'] ?? 'TEXT'; + $db_default = isset($expected['default']) ? $expected['default'] : null; + $default = $this->getDefaultValue($type, $db_default, true); + + // check the null values if they match + if ($current_null !== $expected_null && $current_null === 'NO' && empty($default)) + { + $this->success[] = "Success: updated the ($column) null state in $table table."; + + return true; + } + + return false; + } + /** * Update the data type of the given fields. * @@ -652,8 +723,8 @@ * Adjusts the default value SQL fragment for a database field based on its type and specific rules. * * If the field is of type DATETIME and the Joomla version is not 3, it sets the default to CURRENT_TIMESTAMP - * if not explicitly specified otherwise. For all other types, or when a 'EMPTY' default is specified, it handles - * defaults by either leaving them unset or applying the provided default, properly quoted for SQL safety. + * if not explicitly specified otherwise. For all other types it handles defaults by either leaving them unset or applying + * the provided default, properly quoted for SQL safety. When a 'EMPTY' default is specified, it returns no default at all. (:) * * @param string $type The type of the database field (e.g., 'DATETIME'). * @param string|null $defaultValue Optional default value for the field, null if not provided. @@ -664,7 +735,7 @@ */ protected function getDefaultValue(string $type, ?string $defaultValue, bool $pure = false): string { - if ($defaultValue === null) + if ($defaultValue === null || strtoupper($defaultValue) === 'EMPTY') { return ''; } @@ -695,11 +766,7 @@ return 'NULL'; } - if (is_string($value) && strtoupper($value) === 'EMPTY') - { - return "''"; - } - elseif (is_numeric($value)) + if (is_numeric($value)) { if (filter_var($value, FILTER_VALIDATE_INT)) { diff --git a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/settings.json b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/settings.json index 23c41aa..8e110bf 100644 --- a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/settings.json +++ b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/settings.json @@ -1,7 +1,7 @@ { "add_head": "1", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "f3c04c28-bce4-422e-be93-7d163e4e342b", "implements": [ "4dd11b9b-3c64-460b-aaa6-62ba467db7aa" @@ -17,6 +17,7 @@ "as": "Table" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Schema", "description": "Schema Checking\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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/README.md b/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/README.md index ecfad51..63ddcfb 100644 --- a/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/README.md +++ b/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/README.md @@ -7,7 +7,8 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # trait IsString (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits** +> namespace: **VDM\Joomla\Abstraction\Registry\Traits** +> extends: **** ```uml @startuml class IsString << (T,Orange) >> #Turquoise { diff --git a/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/code.php b/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/code.php index b8c68c5..e0b69ca 100644 --- a/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/code.php +++ b/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/code.php @@ -9,7 +9,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits; +namespace VDM\Joomla\Abstraction\Registry\Traits; /** diff --git a/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/settings.json b/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/settings.json index 74bf66a..dea8354 100644 --- a/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/settings.json +++ b/src/ff7d0111-8f79-42aa-ac14-b53ba2c49369/settings.json @@ -1,7 +1,7 @@ { "add_head": "0", "add_licensing_template": "2", - "extends": "0", + "extends": "", "guid": "ff7d0111-8f79-42aa-ac14-b53ba2c49369", "implements": null, "load_selection": null, @@ -10,6 +10,7 @@ "system_name": "VDM.Abstraction.Registry.Traits.IsString", "type": "trait", "use_selection": null, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.Registry.Traits.IsString", "description": "Is 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 \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", diff --git a/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/README.md b/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/README.md index dbc23a6..f288632 100644 --- a/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/README.md +++ b/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/README.md @@ -7,7 +7,7 @@ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ``` # abstract class BaseConfig (Details) -> namespace: **VastDevelopmentMethod\Joomla\Abstraction** +> namespace: **VDM\Joomla\Abstraction** > extends: **JoomlaRegistry** ```uml @startuml diff --git a/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/code.php b/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/code.php index d19519d..c4debc2 100644 --- a/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/code.php +++ b/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/code.php @@ -9,11 +9,11 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -namespace VastDevelopmentMethod\Joomla\Abstraction; +namespace VDM\Joomla\Abstraction; use Joomla\Registry\Registry as JoomlaRegistry; -use VastDevelopmentMethod\Joomla\Utilities\String\ClassfunctionHelper; +use VDM\Joomla\Utilities\String\ClassfunctionHelper; /** diff --git a/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/settings.json b/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/settings.json index a95b455..315a0c3 100644 --- a/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/settings.json +++ b/src/ffbd4e1f-a342-4080-ab7d-1de3741bf319/settings.json @@ -15,6 +15,7 @@ "as": "default" } }, + "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Abstraction.BaseConfig", "description": "Config\r\n\r\n@since 3.2.0", "extends_custom": "JoomlaRegistry", diff --git a/super-powers.json b/super-powers.json index 4a1e821..fd39144 100644 --- a/super-powers.json +++ b/super-powers.json @@ -1,8 +1,41 @@ { + "008d111c-9d43-427c-8dd4-2653e8b74be8": { + "name": "Load", + "type": "class", + "namespace": "VDM\\Joomla\\Data\\Action", + "code": "src\/008d111c-9d43-427c-8dd4-2653e8b74be8\/code.php", + "power": "src\/008d111c-9d43-427c-8dd4-2653e8b74be8\/code.power", + "settings": "src\/008d111c-9d43-427c-8dd4-2653e8b74be8\/settings.json", + "path": "src\/008d111c-9d43-427c-8dd4-2653e8b74be8", + "spk": "Super__008d111c_9d43_427c_8dd4_2653e8b74be8__Power", + "guid": "008d111c-9d43-427c-8dd4-2653e8b74be8" + }, + "03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13": { + "name": "InsertInterface", + "type": "interface", + "namespace": "VDM\\Joomla\\Interfaces\\Data", + "code": "src\/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13\/code.php", + "power": "src\/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13\/code.power", + "settings": "src\/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13\/settings.json", + "path": "src\/03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13", + "spk": "Super__03bbc8d5_86e8_4d2f_ae5f_0d44a4f7af13__Power", + "guid": "03bbc8d5-86e8-4d2f-ae5f-0d44a4f7af13" + }, + "05744dd3-4030-4cf8-8dda-a93ab809b473": { + "name": "ItemInterface", + "type": "interface", + "namespace": "VDM\\Joomla\\Interfaces\\Data", + "code": "src\/05744dd3-4030-4cf8-8dda-a93ab809b473\/code.php", + "power": "src\/05744dd3-4030-4cf8-8dda-a93ab809b473\/code.power", + "settings": "src\/05744dd3-4030-4cf8-8dda-a93ab809b473\/settings.json", + "path": "src\/05744dd3-4030-4cf8-8dda-a93ab809b473", + "spk": "Super__05744dd3_4030_4cf8_8dda_a93ab809b473__Power", + "guid": "05744dd3-4030-4cf8-8dda-a93ab809b473" + }, "06f8eada-d59b-441c-b287-0aea1793da5a": { "name": "Load", "type": "final class", - "namespace": "VastDevelopmentMethod\\Joomla\\Database", + "namespace": "VDM\\Joomla\\Database", "code": "src\/06f8eada-d59b-441c-b287-0aea1793da5a\/code.php", "power": "src\/06f8eada-d59b-441c-b287-0aea1793da5a\/code.power", "settings": "src\/06f8eada-d59b-441c-b287-0aea1793da5a\/settings.json", @@ -13,7 +46,7 @@ "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a": { "name": "ArrayHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\/code.php", "power": "src\/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\/code.power", "settings": "src\/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\/settings.json", @@ -24,7 +57,7 @@ "11572d9b-e3d5-4b29-904c-9618d8f2bfd8": { "name": "Count", "type": "trait", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction\\Registry\\Traits", + "namespace": "VDM\\Joomla\\Abstraction\\Registry\\Traits", "code": "src\/11572d9b-e3d5-4b29-904c-9618d8f2bfd8\/code.php", "power": "src\/11572d9b-e3d5-4b29-904c-9618d8f2bfd8\/code.power", "settings": "src\/11572d9b-e3d5-4b29-904c-9618d8f2bfd8\/settings.json", @@ -35,7 +68,7 @@ "1198aecf-84c6-45d2-aea8-d531aa4afdfa": { "name": "FormHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/1198aecf-84c6-45d2-aea8-d531aa4afdfa\/code.php", "power": "src\/1198aecf-84c6-45d2-aea8-d531aa4afdfa\/code.power", "settings": "src\/1198aecf-84c6-45d2-aea8-d531aa4afdfa\/settings.json", @@ -46,7 +79,7 @@ "1401a167-0ce4-4f4a-afee-2d8b02ed339b": { "name": "Grep", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction", + "namespace": "VDM\\Joomla\\Abstraction", "code": "src\/1401a167-0ce4-4f4a-afee-2d8b02ed339b\/code.php", "power": "src\/1401a167-0ce4-4f4a-afee-2d8b02ed339b\/code.power", "settings": "src\/1401a167-0ce4-4f4a-afee-2d8b02ed339b\/settings.json", @@ -57,7 +90,7 @@ "152c8793-8b75-4715-996a-257b9f65451c": { "name": "MathHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/152c8793-8b75-4715-996a-257b9f65451c\/code.php", "power": "src\/152c8793-8b75-4715-996a-257b9f65451c\/code.power", "settings": "src\/152c8793-8b75-4715-996a-257b9f65451c\/settings.json", @@ -68,7 +101,7 @@ "1f28cb53-60d9-4db1-b517-3c7dc6b429ef": { "name": "StringHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/1f28cb53-60d9-4db1-b517-3c7dc6b429ef\/code.php", "power": "src\/1f28cb53-60d9-4db1-b517-3c7dc6b429ef\/code.power", "settings": "src\/1f28cb53-60d9-4db1-b517-3c7dc6b429ef\/settings.json", @@ -79,7 +112,7 @@ "215b35ac-1b26-4838-bbcf-d1fdbbd9353f": { "name": "InArray", "type": "trait", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction\\Registry\\Traits", + "namespace": "VDM\\Joomla\\Abstraction\\Registry\\Traits", "code": "src\/215b35ac-1b26-4838-bbcf-d1fdbbd9353f\/code.php", "power": "src\/215b35ac-1b26-4838-bbcf-d1fdbbd9353f\/code.power", "settings": "src\/215b35ac-1b26-4838-bbcf-d1fdbbd9353f\/settings.json", @@ -87,10 +120,21 @@ "spk": "Super__215b35ac_1b26_4838_bbcf_d1fdbbd9353f__Power", "guid": "215b35ac-1b26-4838-bbcf-d1fdbbd9353f" }, + "21bca8a4-5b28-41c4-843e-8097f0ba7cca": { + "name": "Items", + "type": "final class", + "namespace": "VDM\\Joomla\\Data", + "code": "src\/21bca8a4-5b28-41c4-843e-8097f0ba7cca\/code.php", + "power": "src\/21bca8a4-5b28-41c4-843e-8097f0ba7cca\/code.power", + "settings": "src\/21bca8a4-5b28-41c4-843e-8097f0ba7cca\/settings.json", + "path": "src\/21bca8a4-5b28-41c4-843e-8097f0ba7cca", + "spk": "Super__21bca8a4_5b28_41c4_843e_8097f0ba7cca__Power", + "guid": "21bca8a4-5b28-41c4-843e-8097f0ba7cca" + }, "2ad31f74-f579-499d-b98b-c4f54fd615dd": { "name": "LoadInterface", "type": "interface", - "namespace": "VastDevelopmentMethod\\Joomla\\Interfaces", + "namespace": "VDM\\Joomla\\Interfaces", "code": "src\/2ad31f74-f579-499d-b98b-c4f54fd615dd\/code.php", "power": "src\/2ad31f74-f579-499d-b98b-c4f54fd615dd\/code.power", "settings": "src\/2ad31f74-f579-499d-b98b-c4f54fd615dd\/settings.json", @@ -101,7 +145,7 @@ "2da6d6c4-eb29-4d69-8bc2-36d96e916adf": { "name": "Tableinterface", "type": "interface", - "namespace": "VastDevelopmentMethod\\Joomla\\Interfaces", + "namespace": "VDM\\Joomla\\Interfaces", "code": "src\/2da6d6c4-eb29-4d69-8bc2-36d96e916adf\/code.php", "power": "src\/2da6d6c4-eb29-4d69-8bc2-36d96e916adf\/code.power", "settings": "src\/2da6d6c4-eb29-4d69-8bc2-36d96e916adf\/settings.json", @@ -109,10 +153,21 @@ "spk": "Super__2da6d6c4_eb29_4d69_8bc2_36d96e916adf__Power", "guid": "2da6d6c4-eb29-4d69-8bc2-36d96e916adf" }, + "2dcedd6c-c95b-4a37-9cac-95d28faedca3": { + "name": "Model", + "type": "class", + "namespace": "VDM\\Joomla\\Service", + "code": "src\/2dcedd6c-c95b-4a37-9cac-95d28faedca3\/code.php", + "power": "src\/2dcedd6c-c95b-4a37-9cac-95d28faedca3\/code.power", + "settings": "src\/2dcedd6c-c95b-4a37-9cac-95d28faedca3\/settings.json", + "path": "src\/2dcedd6c-c95b-4a37-9cac-95d28faedca3", + "spk": "Super__2dcedd6c_c95b_4a37_9cac_95d28faedca3__Power", + "guid": "2dcedd6c-c95b-4a37-9cac-95d28faedca3" + }, "30c5b4c2-f75f-4d15-869a-f8bfedd87358": { "name": "ClassfunctionHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities\\String", + "namespace": "VDM\\Joomla\\Utilities\\String", "code": "src\/30c5b4c2-f75f-4d15-869a-f8bfedd87358\/code.php", "power": "src\/30c5b4c2-f75f-4d15-869a-f8bfedd87358\/code.power", "settings": "src\/30c5b4c2-f75f-4d15-869a-f8bfedd87358\/settings.json", @@ -120,10 +175,21 @@ "spk": "Super__30c5b4c2_f75f_4d15_869a_f8bfedd87358__Power", "guid": "30c5b4c2-f75f-4d15-869a-f8bfedd87358" }, + "34959721-415b-4b5e-8002-3d1fc84b3b2b": { + "name": "SubformInterface", + "type": "interface", + "namespace": "VDM\\Joomla\\Interfaces\\Data", + "code": "src\/34959721-415b-4b5e-8002-3d1fc84b3b2b\/code.php", + "power": "src\/34959721-415b-4b5e-8002-3d1fc84b3b2b\/code.power", + "settings": "src\/34959721-415b-4b5e-8002-3d1fc84b3b2b\/settings.json", + "path": "src\/34959721-415b-4b5e-8002-3d1fc84b3b2b", + "spk": "Super__34959721_415b_4b5e_8002_3d1fc84b3b2b__Power", + "guid": "34959721-415b-4b5e-8002-3d1fc84b3b2b" + }, "3cf76fbf-fd95-4a33-878e-7aff6d36b7f6": { "name": "PluginHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities\\String", + "namespace": "VDM\\Joomla\\Utilities\\String", "code": "src\/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6\/code.php", "power": "src\/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6\/code.power", "settings": "src\/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6\/settings.json", @@ -131,10 +197,21 @@ "spk": "Super__3cf76fbf_fd95_4a33_878e_7aff6d36b7f6__Power", "guid": "3cf76fbf-fd95-4a33-878e-7aff6d36b7f6" }, + "3fc72954-a303-4cac-b53c-554be38b85e7": { + "name": "Delete", + "type": "class", + "namespace": "VDM\\Joomla\\Data\\Action", + "code": "src\/3fc72954-a303-4cac-b53c-554be38b85e7\/code.php", + "power": "src\/3fc72954-a303-4cac-b53c-554be38b85e7\/code.power", + "settings": "src\/3fc72954-a303-4cac-b53c-554be38b85e7\/settings.json", + "path": "src\/3fc72954-a303-4cac-b53c-554be38b85e7", + "spk": "Super__3fc72954_a303_4cac_b53c_554be38b85e7__Power", + "guid": "3fc72954-a303-4cac-b53c-554be38b85e7" + }, "43134867-5cb8-4280-9be8-309fd2fd135f": { "name": "ActiveRegistry", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction", + "namespace": "VDM\\Joomla\\Abstraction", "code": "src\/43134867-5cb8-4280-9be8-309fd2fd135f\/code.php", "power": "src\/43134867-5cb8-4280-9be8-309fd2fd135f\/code.power", "settings": "src\/43134867-5cb8-4280-9be8-309fd2fd135f\/settings.json", @@ -145,7 +222,7 @@ "4815e1c7-a433-443d-a112-d1e03d7df84b": { "name": "Database", "type": "class", - "namespace": "VastDevelopmentMethod\\Joomla\\Componentbuilder\\Service", + "namespace": "VDM\\Joomla\\Service", "code": "src\/4815e1c7-a433-443d-a112-d1e03d7df84b\/code.php", "power": "src\/4815e1c7-a433-443d-a112-d1e03d7df84b\/code.power", "settings": "src\/4815e1c7-a433-443d-a112-d1e03d7df84b\/settings.json", @@ -156,7 +233,7 @@ "491dbe41-f26c-4de9-8a95-fcf87b35b56f": { "name": "ComponentCodeNameHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities\\String", + "namespace": "VDM\\Joomla\\Utilities\\String", "code": "src\/491dbe41-f26c-4de9-8a95-fcf87b35b56f\/code.php", "power": "src\/491dbe41-f26c-4de9-8a95-fcf87b35b56f\/code.power", "settings": "src\/491dbe41-f26c-4de9-8a95-fcf87b35b56f\/settings.json", @@ -167,7 +244,7 @@ "4b225c51-d293-48e4-b3f6-5136cf5c3f18": { "name": "JsonHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/4b225c51-d293-48e4-b3f6-5136cf5c3f18\/code.php", "power": "src\/4b225c51-d293-48e4-b3f6-5136cf5c3f18\/code.power", "settings": "src\/4b225c51-d293-48e4-b3f6-5136cf5c3f18\/settings.json", @@ -178,7 +255,7 @@ "4dd11b9b-3c64-460b-aaa6-62ba467db7aa": { "name": "SchemaInterface", "type": "interface", - "namespace": "VastDevelopmentMethod\\Joomla\\Interfaces", + "namespace": "VDM\\Joomla\\Interfaces", "code": "src\/4dd11b9b-3c64-460b-aaa6-62ba467db7aa\/code.php", "power": "src\/4dd11b9b-3c64-460b-aaa6-62ba467db7aa\/code.power", "settings": "src\/4dd11b9b-3c64-460b-aaa6-62ba467db7aa\/settings.json", @@ -186,10 +263,21 @@ "spk": "Super__4dd11b9b_3c64_460b_aaa6_62ba467db7aa__Power", "guid": "4dd11b9b-3c64-460b-aaa6-62ba467db7aa" }, + "51de80f2-2868-4c2c-8198-ef79349e9bd7": { + "name": "RemoteInterface", + "type": "interface", + "namespace": "VDM\\Joomla\\Interfaces\\Data", + "code": "src\/51de80f2-2868-4c2c-8198-ef79349e9bd7\/code.php", + "power": "src\/51de80f2-2868-4c2c-8198-ef79349e9bd7\/code.power", + "settings": "src\/51de80f2-2868-4c2c-8198-ef79349e9bd7\/settings.json", + "path": "src\/51de80f2-2868-4c2c-8198-ef79349e9bd7", + "spk": "Super__51de80f2_2868_4c2c_8198_ef79349e9bd7__Power", + "guid": "51de80f2-2868-4c2c-8198-ef79349e9bd7" + }, "524eb8f6-38d4-47dc-92ad-98b94e099ac0": { "name": "Insert", "type": "final class", - "namespace": "VastDevelopmentMethod\\Joomla\\Database", + "namespace": "VDM\\Joomla\\Database", "code": "src\/524eb8f6-38d4-47dc-92ad-98b94e099ac0\/code.php", "power": "src\/524eb8f6-38d4-47dc-92ad-98b94e099ac0\/code.power", "settings": "src\/524eb8f6-38d4-47dc-92ad-98b94e099ac0\/settings.json", @@ -200,7 +288,7 @@ "52a1d14f-304a-431c-8fa4-411179942db5": { "name": "VarExport", "type": "trait", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction\\Registry\\Traits", + "namespace": "VDM\\Joomla\\Abstraction\\Registry\\Traits", "code": "src\/52a1d14f-304a-431c-8fa4-411179942db5\/code.php", "power": "src\/52a1d14f-304a-431c-8fa4-411179942db5\/code.power", "settings": "src\/52a1d14f-304a-431c-8fa4-411179942db5\/settings.json", @@ -211,7 +299,7 @@ "584747d1-3a86-453d-b7a3-a2219de8d777": { "name": "Model", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction", + "namespace": "VDM\\Joomla\\Abstraction", "code": "src\/584747d1-3a86-453d-b7a3-a2219de8d777\/code.php", "power": "src\/584747d1-3a86-453d-b7a3-a2219de8d777\/code.power", "settings": "src\/584747d1-3a86-453d-b7a3-a2219de8d777\/settings.json", @@ -222,7 +310,7 @@ "59b1a2ea-d77e-4040-ac8c-e65cd8743e9b": { "name": "GetString", "type": "trait", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction\\Registry\\Traits", + "namespace": "VDM\\Joomla\\Abstraction\\Registry\\Traits", "code": "src\/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b\/code.php", "power": "src\/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b\/code.power", "settings": "src\/59b1a2ea-d77e-4040-ac8c-e65cd8743e9b\/settings.json", @@ -233,7 +321,7 @@ "640b5352-fb09-425f-a26e-cd44eda03f15": { "name": "Helper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities\\Component", + "namespace": "VDM\\Joomla\\Utilities\\Component", "code": "src\/640b5352-fb09-425f-a26e-cd44eda03f15\/code.php", "power": "src\/640b5352-fb09-425f-a26e-cd44eda03f15\/code.power", "settings": "src\/640b5352-fb09-425f-a26e-cd44eda03f15\/settings.json", @@ -244,7 +332,7 @@ "64a6ff6c-069c-4a11-a76b-db5e36c27690": { "name": "Base64Helper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/64a6ff6c-069c-4a11-a76b-db5e36c27690\/code.php", "power": "src\/64a6ff6c-069c-4a11-a76b-db5e36c27690\/code.power", "settings": "src\/64a6ff6c-069c-4a11-a76b-db5e36c27690\/settings.json", @@ -255,7 +343,7 @@ "64e291c2-11f1-423d-a44d-837cc12cc017": { "name": "Registryinterface", "type": "interface", - "namespace": "VastDevelopmentMethod\\Joomla\\Interfaces", + "namespace": "VDM\\Joomla\\Interfaces", "code": "src\/64e291c2-11f1-423d-a44d-837cc12cc017\/code.php", "power": "src\/64e291c2-11f1-423d-a44d-837cc12cc017\/code.power", "settings": "src\/64e291c2-11f1-423d-a44d-837cc12cc017\/settings.json", @@ -263,10 +351,21 @@ "spk": "Super__64e291c2_11f1_423d_a44d_837cc12cc017__Power", "guid": "64e291c2-11f1-423d-a44d-837cc12cc017" }, + "68a41264-64c0-441a-a3d8-8a5e557b1883": { + "name": "UpdateInterface", + "type": "interface", + "namespace": "VDM\\Joomla\\Interfaces\\Data", + "code": "src\/68a41264-64c0-441a-a3d8-8a5e557b1883\/code.php", + "power": "src\/68a41264-64c0-441a-a3d8-8a5e557b1883\/code.power", + "settings": "src\/68a41264-64c0-441a-a3d8-8a5e557b1883\/settings.json", + "path": "src\/68a41264-64c0-441a-a3d8-8a5e557b1883", + "spk": "Super__68a41264_64c0_441a_a3d8_8a5e557b1883__Power", + "guid": "68a41264-64c0-441a-a3d8-8a5e557b1883" + }, "6cbef8f8-4813-48e3-b05a-65e1aea95171": { "name": "Database", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction", + "namespace": "VDM\\Joomla\\Abstraction", "code": "src\/6cbef8f8-4813-48e3-b05a-65e1aea95171\/code.php", "power": "src\/6cbef8f8-4813-48e3-b05a-65e1aea95171\/code.power", "settings": "src\/6cbef8f8-4813-48e3-b05a-65e1aea95171\/settings.json", @@ -277,7 +376,7 @@ "7179fde6-1e51-4b51-8545-7ca18f74a0f4": { "name": "UpdateInterface", "type": "interface", - "namespace": "VastDevelopmentMethod\\Joomla\\Interfaces", + "namespace": "VDM\\Joomla\\Interfaces", "code": "src\/7179fde6-1e51-4b51-8545-7ca18f74a0f4\/code.php", "power": "src\/7179fde6-1e51-4b51-8545-7ca18f74a0f4\/code.power", "settings": "src\/7179fde6-1e51-4b51-8545-7ca18f74a0f4\/settings.json", @@ -285,10 +384,43 @@ "spk": "Super__7179fde6_1e51_4b51_8545_7ca18f74a0f4__Power", "guid": "7179fde6-1e51-4b51-8545-7ca18f74a0f4" }, + "7212e4db-371f-4cfd-8122-32e9bb100d83": { + "name": "ItemsInterface", + "type": "interface", + "namespace": "VDM\\Joomla\\Interfaces\\Data", + "code": "src\/7212e4db-371f-4cfd-8122-32e9bb100d83\/code.php", + "power": "src\/7212e4db-371f-4cfd-8122-32e9bb100d83\/code.power", + "settings": "src\/7212e4db-371f-4cfd-8122-32e9bb100d83\/settings.json", + "path": "src\/7212e4db-371f-4cfd-8122-32e9bb100d83", + "spk": "Super__7212e4db_371f_4cfd_8122_32e9bb100d83__Power", + "guid": "7212e4db-371f-4cfd-8122-32e9bb100d83" + }, + "728ee726-3f0f-4762-899d-f8c9430cee58": { + "name": "Remote", + "type": "class", + "namespace": "VDM\\Joomla\\Data", + "code": "src\/728ee726-3f0f-4762-899d-f8c9430cee58\/code.php", + "power": "src\/728ee726-3f0f-4762-899d-f8c9430cee58\/code.power", + "settings": "src\/728ee726-3f0f-4762-899d-f8c9430cee58\/settings.json", + "path": "src\/728ee726-3f0f-4762-899d-f8c9430cee58", + "spk": "Super__728ee726_3f0f_4762_899d_f8c9430cee58__Power", + "guid": "728ee726-3f0f-4762-899d-f8c9430cee58" + }, + "7c1fb50f-8fb1-4627-8705-6fedf7182ca5": { + "name": "Upsert", + "type": "final class", + "namespace": "VDM\\Joomla\\Model", + "code": "src\/7c1fb50f-8fb1-4627-8705-6fedf7182ca5\/code.php", + "power": "src\/7c1fb50f-8fb1-4627-8705-6fedf7182ca5\/code.power", + "settings": "src\/7c1fb50f-8fb1-4627-8705-6fedf7182ca5\/settings.json", + "path": "src\/7c1fb50f-8fb1-4627-8705-6fedf7182ca5", + "spk": "Super__7c1fb50f_8fb1_4627_8705_6fedf7182ca5__Power", + "guid": "7c1fb50f-8fb1-4627-8705-6fedf7182ca5" + }, "7d494d91-ab60-43cd-aecf-d50e07f7f30e": { "name": "ToString", "type": "trait", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction\\Registry\\Traits", + "namespace": "VDM\\Joomla\\Abstraction\\Registry\\Traits", "code": "src\/7d494d91-ab60-43cd-aecf-d50e07f7f30e\/code.php", "power": "src\/7d494d91-ab60-43cd-aecf-d50e07f7f30e\/code.power", "settings": "src\/7d494d91-ab60-43cd-aecf-d50e07f7f30e\/settings.json", @@ -299,7 +431,7 @@ "7e822c03-1b20-41d1-9427-f5b8d5836af7": { "name": "Registry", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction", + "namespace": "VDM\\Joomla\\Abstraction", "code": "src\/7e822c03-1b20-41d1-9427-f5b8d5836af7\/code.php", "power": "src\/7e822c03-1b20-41d1-9427-f5b8d5836af7\/code.power", "settings": "src\/7e822c03-1b20-41d1-9427-f5b8d5836af7\/settings.json", @@ -307,10 +439,21 @@ "spk": "Super__7e822c03_1b20_41d1_9427_f5b8d5836af7__Power", "guid": "7e822c03-1b20-41d1-9427-f5b8d5836af7" }, + "85785701-07b2-4f81-bc1e-0f423700c254": { + "name": "Subform", + "type": "class", + "namespace": "VDM\\Joomla\\Data", + "code": "src\/85785701-07b2-4f81-bc1e-0f423700c254\/code.php", + "power": "src\/85785701-07b2-4f81-bc1e-0f423700c254\/code.power", + "settings": "src\/85785701-07b2-4f81-bc1e-0f423700c254\/settings.json", + "path": "src\/85785701-07b2-4f81-bc1e-0f423700c254", + "spk": "Super__85785701_07b2_4f81_bc1e_0f423700c254__Power", + "guid": "85785701-07b2-4f81-bc1e-0f423700c254" + }, "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff": { "name": "ModelInterface", "type": "interface", - "namespace": "VastDevelopmentMethod\\Joomla\\Interfaces", + "namespace": "VDM\\Joomla\\Interfaces", "code": "src\/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff\/code.php", "power": "src\/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff\/code.power", "settings": "src\/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff\/settings.json", @@ -318,10 +461,21 @@ "spk": "Super__8aef58c1_3f70_4bd4_b9e4_3f29fcd41cff__Power", "guid": "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff" }, + "8f83fb79-f92b-4f1f-952b-325f6c22d11e": { + "name": "Update", + "type": "class", + "namespace": "VDM\\Joomla\\Data\\Action", + "code": "src\/8f83fb79-f92b-4f1f-952b-325f6c22d11e\/code.php", + "power": "src\/8f83fb79-f92b-4f1f-952b-325f6c22d11e\/code.power", + "settings": "src\/8f83fb79-f92b-4f1f-952b-325f6c22d11e\/settings.json", + "path": "src\/8f83fb79-f92b-4f1f-952b-325f6c22d11e", + "spk": "Super__8f83fb79_f92b_4f1f_952b_325f6c22d11e__Power", + "guid": "8f83fb79-f92b-4f1f-952b-325f6c22d11e" + }, "91004529-94a9-4590-b842-e7c6b624ecf5": { "name": "ObjectHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/91004529-94a9-4590-b842-e7c6b624ecf5\/code.php", "power": "src\/91004529-94a9-4590-b842-e7c6b624ecf5\/code.power", "settings": "src\/91004529-94a9-4590-b842-e7c6b624ecf5\/settings.json", @@ -329,10 +483,43 @@ "spk": "Super__91004529_94a9_4590_b842_e7c6b624ecf5__Power", "guid": "91004529-94a9-4590-b842-e7c6b624ecf5" }, + "9206082e-a3f7-472e-98b2-de90d06cbdcd": { + "name": "Item", + "type": "final class", + "namespace": "VDM\\Joomla\\Data", + "code": "src\/9206082e-a3f7-472e-98b2-de90d06cbdcd\/code.php", + "power": "src\/9206082e-a3f7-472e-98b2-de90d06cbdcd\/code.power", + "settings": "src\/9206082e-a3f7-472e-98b2-de90d06cbdcd\/settings.json", + "path": "src\/9206082e-a3f7-472e-98b2-de90d06cbdcd", + "spk": "Super__9206082e_a3f7_472e_98b2_de90d06cbdcd__Power", + "guid": "9206082e-a3f7-472e-98b2-de90d06cbdcd" + }, + "92291f1f-f248-4ec0-9f2a-3d47c49eeac1": { + "name": "Delete", + "type": "final class", + "namespace": "VDM\\Joomla\\Database", + "code": "src\/92291f1f-f248-4ec0-9f2a-3d47c49eeac1\/code.php", + "power": "src\/92291f1f-f248-4ec0-9f2a-3d47c49eeac1\/code.power", + "settings": "src\/92291f1f-f248-4ec0-9f2a-3d47c49eeac1\/settings.json", + "path": "src\/92291f1f-f248-4ec0-9f2a-3d47c49eeac1", + "spk": "Super__92291f1f_f248_4ec0_9f2a_3d47c49eeac1__Power", + "guid": "92291f1f-f248-4ec0-9f2a-3d47c49eeac1" + }, + "9c3aa650-e536-4eea-a2d4-73cc3e184aa9": { + "name": "DeleteInterface", + "type": "interface", + "namespace": "VDM\\Joomla\\Interfaces", + "code": "src\/9c3aa650-e536-4eea-a2d4-73cc3e184aa9\/code.php", + "power": "src\/9c3aa650-e536-4eea-a2d4-73cc3e184aa9\/code.power", + "settings": "src\/9c3aa650-e536-4eea-a2d4-73cc3e184aa9\/settings.json", + "path": "src\/9c3aa650-e536-4eea-a2d4-73cc3e184aa9", + "spk": "Super__9c3aa650_e536_4eea_a2d4_73cc3e184aa9__Power", + "guid": "9c3aa650-e536-4eea-a2d4-73cc3e184aa9" + }, "9c513baf-b279-43fd-ae29-a585c8cbc4f0": { "name": "GuidHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/9c513baf-b279-43fd-ae29-a585c8cbc4f0\/code.php", "power": "src\/9c513baf-b279-43fd-ae29-a585c8cbc4f0\/code.power", "settings": "src\/9c513baf-b279-43fd-ae29-a585c8cbc4f0\/settings.json", @@ -343,7 +530,7 @@ "9ef0eb24-aae4-4f5a-99af-d724db44808f": { "name": "FieldHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities\\String", + "namespace": "VDM\\Joomla\\Utilities\\String", "code": "src\/9ef0eb24-aae4-4f5a-99af-d724db44808f\/code.php", "power": "src\/9ef0eb24-aae4-4f5a-99af-d724db44808f\/code.power", "settings": "src\/9ef0eb24-aae4-4f5a-99af-d724db44808f\/settings.json", @@ -354,7 +541,7 @@ "a223b31e-ea1d-4cdf-92ae-5f9becffaff0": { "name": "FileHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/a223b31e-ea1d-4cdf-92ae-5f9becffaff0\/code.php", "power": "src\/a223b31e-ea1d-4cdf-92ae-5f9becffaff0\/code.power", "settings": "src\/a223b31e-ea1d-4cdf-92ae-5f9becffaff0\/settings.json", @@ -362,10 +549,32 @@ "spk": "Super__a223b31e_ea1d_4cdf_92ae_5f9becffaff0__Power", "guid": "a223b31e-ea1d-4cdf-92ae-5f9becffaff0" }, + "a455d916-cfe4-41df-9245-bafb709aacdb": { + "name": "Insert", + "type": "class", + "namespace": "VDM\\Joomla\\Data\\Action", + "code": "src\/a455d916-cfe4-41df-9245-bafb709aacdb\/code.php", + "power": "src\/a455d916-cfe4-41df-9245-bafb709aacdb\/code.power", + "settings": "src\/a455d916-cfe4-41df-9245-bafb709aacdb\/settings.json", + "path": "src\/a455d916-cfe4-41df-9245-bafb709aacdb", + "spk": "Super__a455d916_cfe4_41df_9245_bafb709aacdb__Power", + "guid": "a455d916-cfe4-41df-9245-bafb709aacdb" + }, + "a5daf189-3345-4b13-8716-c51f686f545b": { + "name": "Data", + "type": "class", + "namespace": "VDM\\Joomla\\Service", + "code": "src\/a5daf189-3345-4b13-8716-c51f686f545b\/code.php", + "power": "src\/a5daf189-3345-4b13-8716-c51f686f545b\/code.power", + "settings": "src\/a5daf189-3345-4b13-8716-c51f686f545b\/settings.json", + "path": "src\/a5daf189-3345-4b13-8716-c51f686f545b", + "spk": "Super__a5daf189_3345_4b13_8716_c51f686f545b__Power", + "guid": "a5daf189-3345-4b13-8716-c51f686f545b" + }, "a8935cbe-7701-40dc-bfd5-675f2d600954": { "name": "TypeHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities\\String", + "namespace": "VDM\\Joomla\\Utilities\\String", "code": "src\/a8935cbe-7701-40dc-bfd5-675f2d600954\/code.php", "power": "src\/a8935cbe-7701-40dc-bfd5-675f2d600954\/code.power", "settings": "src\/a8935cbe-7701-40dc-bfd5-675f2d600954\/settings.json", @@ -376,7 +585,7 @@ "ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48": { "name": "InsertInterface", "type": "interface", - "namespace": "VastDevelopmentMethod\\Joomla\\Interfaces", + "namespace": "VDM\\Joomla\\Interfaces", "code": "src\/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48\/code.php", "power": "src\/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48\/code.power", "settings": "src\/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48\/settings.json", @@ -387,7 +596,7 @@ "af0eedbe-603b-4671-8e5a-28165d88254b": { "name": "Activeregistryinterface", "type": "interface", - "namespace": "VastDevelopmentMethod\\Joomla\\Interfaces", + "namespace": "VDM\\Joomla\\Interfaces", "code": "src\/af0eedbe-603b-4671-8e5a-28165d88254b\/code.php", "power": "src\/af0eedbe-603b-4671-8e5a-28165d88254b\/code.power", "settings": "src\/af0eedbe-603b-4671-8e5a-28165d88254b\/settings.json", @@ -398,7 +607,7 @@ "b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce": { "name": "Schema", "type": "final class", - "namespace": "VastDevelopmentMethod\\Joomla\\Componentbuilder\\Table", + "namespace": "VDM\\Joomla\\Componentbuilder\\Table", "code": "src\/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce\/code.php", "power": "src\/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce\/code.power", "settings": "src\/b3d2ec33-76d4-4c3b-bb2c-86ac14a221ce\/settings.json", @@ -409,7 +618,7 @@ "b84e947d-2a13-44f7-ac0f-3902ae55ae0c": { "name": "BaseRegistry", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Componentbuilder\\Abstraction", + "namespace": "VDM\\Joomla\\Componentbuilder\\Abstraction", "code": "src\/b84e947d-2a13-44f7-ac0f-3902ae55ae0c\/code.php", "power": "src\/b84e947d-2a13-44f7-ac0f-3902ae55ae0c\/code.power", "settings": "src\/b84e947d-2a13-44f7-ac0f-3902ae55ae0c\/settings.json", @@ -417,10 +626,21 @@ "spk": "Super__b84e947d_2a13_44f7_ac0f_3902ae55ae0c__Power", "guid": "b84e947d-2a13-44f7-ac0f-3902ae55ae0c" }, + "bb29a833-73f7-4283-9327-bc7e41f0723b": { + "name": "Load", + "type": "final class", + "namespace": "VDM\\Joomla\\Model", + "code": "src\/bb29a833-73f7-4283-9327-bc7e41f0723b\/code.php", + "power": "src\/bb29a833-73f7-4283-9327-bc7e41f0723b\/code.power", + "settings": "src\/bb29a833-73f7-4283-9327-bc7e41f0723b\/settings.json", + "path": "src\/bb29a833-73f7-4283-9327-bc7e41f0723b", + "spk": "Super__bb29a833_73f7_4283_9327_bc7e41f0723b__Power", + "guid": "bb29a833-73f7-4283-9327-bc7e41f0723b" + }, "bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8": { "name": "Table", "type": "class", - "namespace": "VastDevelopmentMethod\\Joomla\\Componentbuilder", + "namespace": "VDM\\Joomla\\Componentbuilder", "code": "src\/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8\/code.php", "power": "src\/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8\/code.power", "settings": "src\/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8\/settings.json", @@ -431,7 +651,7 @@ "c09e8968-c767-4175-bb3d-8432f206a2c7": { "name": "IsArray", "type": "trait", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction\\Registry\\Traits", + "namespace": "VDM\\Joomla\\Abstraction\\Registry\\Traits", "code": "src\/c09e8968-c767-4175-bb3d-8432f206a2c7\/code.php", "power": "src\/c09e8968-c767-4175-bb3d-8432f206a2c7\/code.power", "settings": "src\/c09e8968-c767-4175-bb3d-8432f206a2c7\/settings.json", @@ -442,7 +662,7 @@ "c182506a-ab84-439c-b962-1e606b58d545": { "name": "GrepInterface", "type": "interface", - "namespace": "VastDevelopmentMethod\\Joomla\\Interfaces", + "namespace": "VDM\\Joomla\\Interfaces", "code": "src\/c182506a-ab84-439c-b962-1e606b58d545\/code.php", "power": "src\/c182506a-ab84-439c-b962-1e606b58d545\/code.power", "settings": "src\/c182506a-ab84-439c-b962-1e606b58d545\/settings.json", @@ -450,10 +670,21 @@ "spk": "Super__c182506a_ab84_439c_b962_1e606b58d545__Power", "guid": "c182506a-ab84-439c-b962-1e606b58d545" }, + "c548640c-a461-4424-9ac5-8dfb5ed06d8d": { + "name": "LoadInterface", + "type": "interface", + "namespace": "VDM\\Joomla\\Interfaces\\Data", + "code": "src\/c548640c-a461-4424-9ac5-8dfb5ed06d8d\/code.php", + "power": "src\/c548640c-a461-4424-9ac5-8dfb5ed06d8d\/code.power", + "settings": "src\/c548640c-a461-4424-9ac5-8dfb5ed06d8d\/settings.json", + "path": "src\/c548640c-a461-4424-9ac5-8dfb5ed06d8d", + "spk": "Super__c548640c_a461_4424_9ac5_8dfb5ed06d8d__Power", + "guid": "c548640c-a461-4424-9ac5-8dfb5ed06d8d" + }, "caf33c5d-858c-4f9a-894f-ab302ec5445a": { "name": "FactoryInterface", "type": "interface", - "namespace": "VastDevelopmentMethod\\Joomla\\Interfaces", + "namespace": "VDM\\Joomla\\Interfaces", "code": "src\/caf33c5d-858c-4f9a-894f-ab302ec5445a\/code.php", "power": "src\/caf33c5d-858c-4f9a-894f-ab302ec5445a\/code.power", "settings": "src\/caf33c5d-858c-4f9a-894f-ab302ec5445a\/settings.json", @@ -464,7 +695,7 @@ "cce56585-58b0-4f72-a92c-e2635ea52d83": { "name": "Update", "type": "final class", - "namespace": "VastDevelopmentMethod\\Joomla\\Database", + "namespace": "VDM\\Joomla\\Database", "code": "src\/cce56585-58b0-4f72-a92c-e2635ea52d83\/code.php", "power": "src\/cce56585-58b0-4f72-a92c-e2635ea52d83\/code.power", "settings": "src\/cce56585-58b0-4f72-a92c-e2635ea52d83\/settings.json", @@ -475,7 +706,7 @@ "cddcac51-9a46-47c4-ba59-105c70453bd6": { "name": "FilterHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Componentbuilder\\Utilities", + "namespace": "VDM\\Joomla\\Componentbuilder\\Utilities", "code": "src\/cddcac51-9a46-47c4-ba59-105c70453bd6\/code.php", "power": "src\/cddcac51-9a46-47c4-ba59-105c70453bd6\/code.power", "settings": "src\/cddcac51-9a46-47c4-ba59-105c70453bd6\/settings.json", @@ -486,7 +717,7 @@ "ce8cf834-6bac-44fb-941c-861f7e046cc0": { "name": "NamespaceHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities\\String", + "namespace": "VDM\\Joomla\\Utilities\\String", "code": "src\/ce8cf834-6bac-44fb-941c-861f7e046cc0\/code.php", "power": "src\/ce8cf834-6bac-44fb-941c-861f7e046cc0\/code.power", "settings": "src\/ce8cf834-6bac-44fb-941c-861f7e046cc0\/settings.json", @@ -497,7 +728,7 @@ "cefe4092-a4c2-41a6-a683-bd3ab5419cc6": { "name": "GetHelperExtrusion", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/cefe4092-a4c2-41a6-a683-bd3ab5419cc6\/code.php", "power": "src\/cefe4092-a4c2-41a6-a683-bd3ab5419cc6\/code.power", "settings": "src\/cefe4092-a4c2-41a6-a683-bd3ab5419cc6\/settings.json", @@ -505,10 +736,21 @@ "spk": "Super__cefe4092_a4c2_41a6_a683_bd3ab5419cc6__Power", "guid": "cefe4092-a4c2-41a6-a683-bd3ab5419cc6" }, + "d8f9ba53-c490-4e8b-8e9f-6757224e069c": { + "name": "DeleteInterface", + "type": "interface", + "namespace": "VDM\\Joomla\\Interfaces\\Data", + "code": "src\/d8f9ba53-c490-4e8b-8e9f-6757224e069c\/code.php", + "power": "src\/d8f9ba53-c490-4e8b-8e9f-6757224e069c\/code.power", + "settings": "src\/d8f9ba53-c490-4e8b-8e9f-6757224e069c\/settings.json", + "path": "src\/d8f9ba53-c490-4e8b-8e9f-6757224e069c", + "spk": "Super__d8f9ba53_c490_4e8b_8e9f_6757224e069c__Power", + "guid": "d8f9ba53-c490-4e8b-8e9f-6757224e069c" + }, "db87c339-5bb6-4291-a7ef-2c48ea1b06bc": { "name": "GetHelper", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Utilities", + "namespace": "VDM\\Joomla\\Utilities", "code": "src\/db87c339-5bb6-4291-a7ef-2c48ea1b06bc\/code.php", "power": "src\/db87c339-5bb6-4291-a7ef-2c48ea1b06bc\/code.power", "settings": "src\/db87c339-5bb6-4291-a7ef-2c48ea1b06bc\/settings.json", @@ -519,7 +761,7 @@ "e0f6ddbe-2a35-4537-942c-faff2ebd04f6": { "name": "BaseTable", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction", + "namespace": "VDM\\Joomla\\Abstraction", "code": "src\/e0f6ddbe-2a35-4537-942c-faff2ebd04f6\/code.php", "power": "src\/e0f6ddbe-2a35-4537-942c-faff2ebd04f6\/code.power", "settings": "src\/e0f6ddbe-2a35-4537-942c-faff2ebd04f6\/settings.json", @@ -530,7 +772,7 @@ "f3c04c28-bce4-422e-be93-7d163e4e342b": { "name": "Schema", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction", + "namespace": "VDM\\Joomla\\Abstraction", "code": "src\/f3c04c28-bce4-422e-be93-7d163e4e342b\/code.php", "power": "src\/f3c04c28-bce4-422e-be93-7d163e4e342b\/code.power", "settings": "src\/f3c04c28-bce4-422e-be93-7d163e4e342b\/settings.json", @@ -541,7 +783,7 @@ "ff7d0111-8f79-42aa-ac14-b53ba2c49369": { "name": "IsString", "type": "trait", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction\\Registry\\Traits", + "namespace": "VDM\\Joomla\\Abstraction\\Registry\\Traits", "code": "src\/ff7d0111-8f79-42aa-ac14-b53ba2c49369\/code.php", "power": "src\/ff7d0111-8f79-42aa-ac14-b53ba2c49369\/code.power", "settings": "src\/ff7d0111-8f79-42aa-ac14-b53ba2c49369\/settings.json", @@ -552,7 +794,7 @@ "ffbd4e1f-a342-4080-ab7d-1de3741bf319": { "name": "BaseConfig", "type": "abstract class", - "namespace": "VastDevelopmentMethod\\Joomla\\Abstraction", + "namespace": "VDM\\Joomla\\Abstraction", "code": "src\/ffbd4e1f-a342-4080-ab7d-1de3741bf319\/code.php", "power": "src\/ffbd4e1f-a342-4080-ab7d-1de3741bf319\/code.power", "settings": "src\/ffbd4e1f-a342-4080-ab7d-1de3741bf319\/settings.json",