Compare commits

...

21 Commits
master ... dev

Author SHA1 Message Date
5fa6f7ad67
update 2024-05-26 17:39:15 2024-05-26 17:39:23 +02:00
428bbdc503
update 2024-05-25 20:54:21 2024-05-25 20:54:21 +02:00
60fe05b75c
update 2024-05-22 10:57:27 2024-05-22 10:57:27 +02:00
4335ebb2af
update 2024-05-16 16:19:46 2024-05-16 16:19:46 +02:00
8f0a6aa0b1
update 2024-05-16 15:19:46 2024-05-16 15:19:46 +02:00
42310f5d44
update 2024-04-29 11:28:11 2024-04-29 11:28:11 +02:00
37ad7da5ad
update 2024-04-27 15:33:41 2024-04-27 15:33:41 +02:00
5e42dd1f70
update 2024-04-25 17:46:59 2024-04-25 17:47:04 +02:00
de1a49f601
update 2024-04-25 16:46:58 2024-04-25 16:46:58 +02:00
0c98ab5bb5
update 2024-04-24 21:22:23 2024-04-24 21:22:23 +02:00
c9c9e1f3d3
update 2024-04-22 00:47:33 2024-04-22 00:47:33 +02:00
4134cff484
update 2024-04-20 20:05:37 2024-04-20 20:05:38 +02:00
3bdd6c6667
update 2024-04-18 14:43:56 2024-04-18 14:43:56 +02:00
4bbcb6c3d6
update 2024-04-17 10:40:23 2024-04-17 10:40:24 +02:00
41aa3a166c
update 2024-04-16 17:05:43 2024-04-16 17:05:43 +02:00
e328ad5ce3
update 2024-04-16 16:05:26 2024-04-16 16:05:26 +02:00
a39b1880d9
update 2024-04-15 06:03:20 2024-04-15 06:03:20 +02:00
6748fd95ed
update 2024-04-13 20:01:28 2024-04-13 20:01:28 +02:00
cd0cb2ba43
update 2024-04-13 19:01:25 2024-04-13 19:01:25 +02:00
668c954e00
update 2024-04-12 19:17:27 2024-04-12 19:17:32 +02:00
4441974faa
update 2024-04-12 17:17:01 2024-04-12 17:17:05 +02:00
414 changed files with 8307 additions and 1748 deletions

View File

@ -30,6 +30,7 @@ This repository contains an index (see below) of all the approved powers within
- **abstract class Factory** | [Details](src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac) | [Code](src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/code.php) | [Settings](src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/settings.json) | Super__d910d8b8_4c23_4f3e_8cda_438f2d2bd7ac__Power - **abstract class Factory** | [Details](src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac) | [Code](src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/code.php) | [Settings](src/d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac/settings.json) | Super__d910d8b8_4c23_4f3e_8cda_438f2d2bd7ac__Power
- **final class Component** | [Details](src/e2472b22-a329-44d8-b4a2-ae3ba99e17a0) | [Code](src/e2472b22-a329-44d8-b4a2-ae3ba99e17a0/code.php) | [Settings](src/e2472b22-a329-44d8-b4a2-ae3ba99e17a0/settings.json) | Super__e2472b22_a329_44d8_b4a2_ae3ba99e17a0__Power - **final class Component** | [Details](src/e2472b22-a329-44d8-b4a2-ae3ba99e17a0) | [Code](src/e2472b22-a329-44d8-b4a2-ae3ba99e17a0/code.php) | [Settings](src/e2472b22-a329-44d8-b4a2-ae3ba99e17a0/settings.json) | Super__e2472b22_a329_44d8_b4a2_ae3ba99e17a0__Power
- **final class JoomlaPower** | [Details](src/3730a000-ab64-477d-8b0f-70eaf71b517a) | [Code](src/3730a000-ab64-477d-8b0f-70eaf71b517a/code.php) | [Settings](src/3730a000-ab64-477d-8b0f-70eaf71b517a/settings.json) | Super__3730a000_ab64_477d_8b0f_70eaf71b517a__Power
- **class Config** | [Details](src/fa4bf18e-301e-42e3-91fb-6e0096c07adc) | [Code](src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.php) | [Settings](src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/settings.json) | Super__fa4bf18e_301e_42e3_91fb_6e0096c07adc__Power - **class Config** | [Details](src/fa4bf18e-301e-42e3-91fb-6e0096c07adc) | [Code](src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.php) | [Settings](src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/settings.json) | Super__fa4bf18e_301e_42e3_91fb_6e0096c07adc__Power
- **class Customcode** | [Details](src/313b43c4-98c3-4f62-9177-2d73ec8eba31) | [Code](src/313b43c4-98c3-4f62-9177-2d73ec8eba31/code.php) | [Settings](src/313b43c4-98c3-4f62-9177-2d73ec8eba31/settings.json) | Super__313b43c4_98c3_4f62_9177_2d73ec8eba31__Power - **class Customcode** | [Details](src/313b43c4-98c3-4f62-9177-2d73ec8eba31) | [Code](src/313b43c4-98c3-4f62-9177-2d73ec8eba31/code.php) | [Settings](src/313b43c4-98c3-4f62-9177-2d73ec8eba31/settings.json) | Super__313b43c4_98c3_4f62_9177_2d73ec8eba31__Power
- **class Field** | [Details](src/d7ba2d5d-10b6-470d-978d-9f91ea65ee75) | [Code](src/d7ba2d5d-10b6-470d-978d-9f91ea65ee75/code.php) | [Settings](src/d7ba2d5d-10b6-470d-978d-9f91ea65ee75/settings.json) | Super__d7ba2d5d_10b6_470d_978d_9f91ea65ee75__Power - **class Field** | [Details](src/d7ba2d5d-10b6-470d-978d-9f91ea65ee75) | [Code](src/d7ba2d5d-10b6-470d-978d-9f91ea65ee75/code.php) | [Settings](src/d7ba2d5d-10b6-470d-978d-9f91ea65ee75/settings.json) | Super__d7ba2d5d_10b6_470d_978d_9f91ea65ee75__Power
@ -40,14 +41,22 @@ This repository contains an index (see below) of all the approved powers within
- **Namespace**: [VDM\Joomla\Componentbuilder\Interfaces](#vdm-joomla-componentbuilder-interfaces) - **Namespace**: [VDM\Joomla\Componentbuilder\Interfaces](#vdm-joomla-componentbuilder-interfaces)
- **interface Cryptinterface** | [Details](src/81de8f57-dd9c-4a17-964f-848cd4a0743b) | [Code](src/81de8f57-dd9c-4a17-964f-848cd4a0743b/code.php) | [Settings](src/81de8f57-dd9c-4a17-964f-848cd4a0743b/settings.json) | Super__81de8f57_dd9c_4a17_964f_848cd4a0743b__Power - **interface Cryptinterface** | [Details](src/81de8f57-dd9c-4a17-964f-848cd4a0743b) | [Code](src/81de8f57-dd9c-4a17-964f-848cd4a0743b/code.php) | [Settings](src/81de8f57-dd9c-4a17-964f-848cd4a0743b/settings.json) | Super__81de8f57_dd9c_4a17_964f_848cd4a0743b__Power
- **interface 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 Serverinterface** | [Details](src/86ac0760-26f5-4746-9c7f-ce77860f80f8) | [Code](src/86ac0760-26f5-4746-9c7f-ce77860f80f8/code.php) | [Settings](src/86ac0760-26f5-4746-9c7f-ce77860f80f8/settings.json) | Super__86ac0760_26f5_4746_9c7f_ce77860f80f8__Power - **interface Serverinterface** | [Details](src/86ac0760-26f5-4746-9c7f-ce77860f80f8) | [Code](src/86ac0760-26f5-4746-9c7f-ce77860f80f8/code.php) | [Settings](src/86ac0760-26f5-4746-9c7f-ce77860f80f8/settings.json) | Super__86ac0760_26f5_4746_9c7f_ce77860f80f8__Power
- **interface SuperInterface** | [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
- **Namespace**: [VDM\Joomla\Componentbuilder\JoomlaPower](#vdm-joomla-componentbuilder-joomlapower)
- **abstract class Factory** | [Details](src/6ee3dc9e-1949-4da5-a74f-d9eb7f14e400) | [Code](src/6ee3dc9e-1949-4da5-a74f-d9eb7f14e400/code.php) | [Settings](src/6ee3dc9e-1949-4da5-a74f-d9eb7f14e400/settings.json) | Super__6ee3dc9e_1949_4da5_a74f_d9eb7f14e400__Power
- **final class Grep** | [Details](src/355bf21a-f859-4528-9110-bcd2c6d05ea7) | [Code](src/355bf21a-f859-4528-9110-bcd2c6d05ea7/code.php) | [Settings](src/355bf21a-f859-4528-9110-bcd2c6d05ea7/settings.json) | Super__355bf21a_f859_4528_9110_bcd2c6d05ea7__Power
- **final class Super** | [Details](src/39a75870-a7f7-45fd-937d-5ba97b85b8ad) | [Code](src/39a75870-a7f7-45fd-937d-5ba97b85b8ad/code.php) | [Settings](src/39a75870-a7f7-45fd-937d-5ba97b85b8ad/settings.json) | Super__39a75870_a7f7_45fd_937d_5ba97b85b8ad__Power
- **class Config** | [Details](src/0b821bba-7503-4448-90e7-f3c1bd51dfd6) | [Code](src/0b821bba-7503-4448-90e7-f3c1bd51dfd6/code.php) | [Settings](src/0b821bba-7503-4448-90e7-f3c1bd51dfd6/settings.json) | Super__0b821bba_7503_4448_90e7_f3c1bd51dfd6__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Power](#vdm-joomla-componentbuilder-power) - **Namespace**: [VDM\Joomla\Componentbuilder\Power](#vdm-joomla-componentbuilder-power)
- **abstract class Factory** | [Details](src/a5734b9e-a72d-494c-bc72-c3bc7506015f) | [Code](src/a5734b9e-a72d-494c-bc72-c3bc7506015f/code.php) | [Settings](src/a5734b9e-a72d-494c-bc72-c3bc7506015f/settings.json) | Super__a5734b9e_a72d_494c_bc72_c3bc7506015f__Power - **abstract class Factory** | [Details](src/a5734b9e-a72d-494c-bc72-c3bc7506015f) | [Code](src/a5734b9e-a72d-494c-bc72-c3bc7506015f/code.php) | [Settings](src/a5734b9e-a72d-494c-bc72-c3bc7506015f/settings.json) | Super__a5734b9e_a72d_494c_bc72_c3bc7506015f__Power
- **final class Generator** | [Details](src/505801ac-d3e2-44c6-a300-9a57a96170c6) | [Code](src/505801ac-d3e2-44c6-a300-9a57a96170c6/code.php) | [Settings](src/505801ac-d3e2-44c6-a300-9a57a96170c6/settings.json) | Super__505801ac_d3e2_44c6_a300_9a57a96170c6__Power - **final class Generator** | [Details](src/505801ac-d3e2-44c6-a300-9a57a96170c6) | [Code](src/505801ac-d3e2-44c6-a300-9a57a96170c6/code.php) | [Settings](src/505801ac-d3e2-44c6-a300-9a57a96170c6/settings.json) | Super__505801ac_d3e2_44c6_a300_9a57a96170c6__Power
- **final class Grep** | [Details](src/6784dd52-0909-451a-a872-9a942a023c68) | [Code](src/6784dd52-0909-451a-a872-9a942a023c68/code.php) | [Settings](src/6784dd52-0909-451a-a872-9a942a023c68/settings.json) | Super__6784dd52_0909_451a_a872_9a942a023c68__Power - **final class Grep** | [Details](src/6784dd52-0909-451a-a872-9a942a023c68) | [Code](src/6784dd52-0909-451a-a872-9a942a023c68/code.php) | [Settings](src/6784dd52-0909-451a-a872-9a942a023c68/settings.json) | Super__6784dd52_0909_451a_a872_9a942a023c68__Power
- **final class Super** | [Details](src/3ab0eba9-f37b-4b37-aec1-2e78067f2aff) | [Code](src/3ab0eba9-f37b-4b37-aec1-2e78067f2aff/code.php) | [Settings](src/3ab0eba9-f37b-4b37-aec1-2e78067f2aff/settings.json) | Super__3ab0eba9_f37b_4b37_aec1_2e78067f2aff__Power
- **class Config** | [Details](src/be4ccfae-65a9-401e-bdbe-637d8c226954) | [Code](src/be4ccfae-65a9-401e-bdbe-637d8c226954/code.php) | [Settings](src/be4ccfae-65a9-401e-bdbe-637d8c226954/settings.json) | Super__be4ccfae_65a9_401e_bdbe_637d8c226954__Power - **class Config** | [Details](src/be4ccfae-65a9-401e-bdbe-637d8c226954) | [Code](src/be4ccfae-65a9-401e-bdbe-637d8c226954/code.php) | [Settings](src/be4ccfae-65a9-401e-bdbe-637d8c226954/settings.json) | Super__be4ccfae_65a9_401e_bdbe_637d8c226954__Power
- **class Super** | [Details](src/3ab0eba9-f37b-4b37-aec1-2e78067f2aff) | [Code](src/3ab0eba9-f37b-4b37-aec1-2e78067f2aff/code.php) | [Settings](src/3ab0eba9-f37b-4b37-aec1-2e78067f2aff/settings.json) | Super__3ab0eba9_f37b_4b37_aec1_2e78067f2aff__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Service](#vdm-joomla-componentbuilder-service) - **Namespace**: [VDM\Joomla\Componentbuilder\Service](#vdm-joomla-componentbuilder-service)
- **class CoreRules** | [Details](src/f65b52c2-593a-4c35-89d1-4a8e57a1adf0) | [Code](src/f65b52c2-593a-4c35-89d1-4a8e57a1adf0/code.php) | [Settings](src/f65b52c2-593a-4c35-89d1-4a8e57a1adf0/settings.json) | Super__f65b52c2_593a_4c35_89d1_4a8e57a1adf0__Power - **class CoreRules** | [Details](src/f65b52c2-593a-4c35-89d1-4a8e57a1adf0) | [Code](src/f65b52c2-593a-4c35-89d1-4a8e57a1adf0/code.php) | [Settings](src/f65b52c2-593a-4c35-89d1-4a8e57a1adf0/settings.json) | Super__f65b52c2_593a_4c35_89d1_4a8e57a1adf0__Power
@ -252,6 +261,10 @@ This repository contains an index (see below) of all the approved powers within
- **final class Event** | [Details](src/4729c2b0-f12b-4397-8d77-055d38bca98b) | [Code](src/4729c2b0-f12b-4397-8d77-055d38bca98b/code.php) | [Settings](src/4729c2b0-f12b-4397-8d77-055d38bca98b/settings.json) | Super__4729c2b0_f12b_4397_8d77_055d38bca98b__Power - **final class Event** | [Details](src/4729c2b0-f12b-4397-8d77-055d38bca98b) | [Code](src/4729c2b0-f12b-4397-8d77-055d38bca98b/code.php) | [Settings](src/4729c2b0-f12b-4397-8d77-055d38bca98b/settings.json) | Super__4729c2b0_f12b_4397_8d77_055d38bca98b__Power
- **final class Header** | [Details](src/1ee227b9-da0f-4e7b-ae66-99a9d53f6f49) | [Code](src/1ee227b9-da0f-4e7b-ae66-99a9d53f6f49/code.php) | [Settings](src/1ee227b9-da0f-4e7b-ae66-99a9d53f6f49/settings.json) | Super__1ee227b9_da0f_4e7b_ae66_99a9d53f6f49__Power - **final class Header** | [Details](src/1ee227b9-da0f-4e7b-ae66-99a9d53f6f49) | [Code](src/1ee227b9-da0f-4e7b-ae66-99a9d53f6f49/code.php) | [Settings](src/1ee227b9-da0f-4e7b-ae66-99a9d53f6f49/settings.json) | Super__1ee227b9_da0f_4e7b_ae66_99a9d53f6f49__Power
- **final class History** | [Details](src/25c7ca86-6088-4f5f-b9fe-13504779c6ba) | [Code](src/25c7ca86-6088-4f5f-b9fe-13504779c6ba/code.php) | [Settings](src/25c7ca86-6088-4f5f-b9fe-13504779c6ba/settings.json) | Super__25c7ca86_6088_4f5f_b9fe_13504779c6ba__Power - **final class History** | [Details](src/25c7ca86-6088-4f5f-b9fe-13504779c6ba) | [Code](src/25c7ca86-6088-4f5f-b9fe-13504779c6ba/code.php) | [Settings](src/25c7ca86-6088-4f5f-b9fe-13504779c6ba/settings.json) | Super__25c7ca86_6088_4f5f_b9fe_13504779c6ba__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\JoomlaPower](#vdm-joomla-componentbuilder-compiler-joomlapower)
- **final class Extractor** | [Details](src/82505f3f-297f-4d75-a581-929ab3e93689) | [Code](src/82505f3f-297f-4d75-a581-929ab3e93689/code.php) | [Settings](src/82505f3f-297f-4d75-a581-929ab3e93689/settings.json) | Super__82505f3f_297f_4d75_a581_929ab3e93689__Power
- **final class Injector** | [Details](src/a6052fe9-0d2b-4b36-b3e7-03b47c483542) | [Code](src/a6052fe9-0d2b-4b36-b3e7-03b47c483542/code.php) | [Settings](src/a6052fe9-0d2b-4b36-b3e7-03b47c483542/settings.json) | Super__a6052fe9_0d2b_4b36_b3e7_03b47c483542__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\JoomlaThree](#vdm-joomla-componentbuilder-compiler-joomlathree) - **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\JoomlaThree](#vdm-joomla-componentbuilder-compiler-joomlathree)
- **final class Event** | [Details](src/4b86f62e-ce41-4325-a11a-08148807d0df) | [Code](src/4b86f62e-ce41-4325-a11a-08148807d0df/code.php) | [Settings](src/4b86f62e-ce41-4325-a11a-08148807d0df/settings.json) | Super__4b86f62e_ce41_4325_a11a_08148807d0df__Power - **final class Event** | [Details](src/4b86f62e-ce41-4325-a11a-08148807d0df) | [Code](src/4b86f62e-ce41-4325-a11a-08148807d0df/code.php) | [Settings](src/4b86f62e-ce41-4325-a11a-08148807d0df/settings.json) | Super__4b86f62e_ce41_4325_a11a_08148807d0df__Power
@ -318,11 +331,11 @@ This repository contains an index (see below) of all the approved powers within
- **class Reverse** | [Details](src/ca111518-e47c-4049-b1b2-cb010f23866f) | [Code](src/ca111518-e47c-4049-b1b2-cb010f23866f/code.php) | [Settings](src/ca111518-e47c-4049-b1b2-cb010f23866f/settings.json) | Super__ca111518_e47c_4049_b1b2_cb010f23866f__Power - **class Reverse** | [Details](src/ca111518-e47c-4049-b1b2-cb010f23866f) | [Code](src/ca111518-e47c-4049-b1b2-cb010f23866f/code.php) | [Settings](src/ca111518-e47c-4049-b1b2-cb010f23866f/settings.json) | Super__ca111518_e47c_4049_b1b2_cb010f23866f__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\Power](#vdm-joomla-componentbuilder-compiler-power) - **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\Power](#vdm-joomla-componentbuilder-compiler-power)
- **final class Extractor** | [Details](src/eeb03266-22fd-45bb-953a-961bb6be3a54) | [Code](src/eeb03266-22fd-45bb-953a-961bb6be3a54/code.php) | [Settings](src/eeb03266-22fd-45bb-953a-961bb6be3a54/settings.json) | Super__eeb03266_22fd_45bb_953a_961bb6be3a54__Power
- **final class Injector** | [Details](src/763d137c-42bc-4282-98d8-cc5c0654985f) | [Code](src/763d137c-42bc-4282-98d8-cc5c0654985f/code.php) | [Settings](src/763d137c-42bc-4282-98d8-cc5c0654985f/settings.json) | Super__763d137c_42bc_4282_98d8_cc5c0654985f__Power
- **final class Parser** | [Details](src/95d0e03f-24fd-4412-bc2e-f0899fcc3205) | [Code](src/95d0e03f-24fd-4412-bc2e-f0899fcc3205/code.php) | [Settings](src/95d0e03f-24fd-4412-bc2e-f0899fcc3205/settings.json) | Super__95d0e03f_24fd_4412_bc2e_f0899fcc3205__Power - **final class Parser** | [Details](src/95d0e03f-24fd-4412-bc2e-f0899fcc3205) | [Code](src/95d0e03f-24fd-4412-bc2e-f0899fcc3205/code.php) | [Settings](src/95d0e03f-24fd-4412-bc2e-f0899fcc3205/settings.json) | Super__95d0e03f_24fd_4412_bc2e_f0899fcc3205__Power
- **class Autoloader** | [Details](src/6e64917c-d687-4ef3-a655-811319f5a81e) | [Code](src/6e64917c-d687-4ef3-a655-811319f5a81e/code.php) | [Settings](src/6e64917c-d687-4ef3-a655-811319f5a81e/settings.json) | Super__6e64917c_d687_4ef3_a655_811319f5a81e__Power - **class Autoloader** | [Details](src/6e64917c-d687-4ef3-a655-811319f5a81e) | [Code](src/6e64917c-d687-4ef3-a655-811319f5a81e/code.php) | [Settings](src/6e64917c-d687-4ef3-a655-811319f5a81e/settings.json) | Super__6e64917c_d687_4ef3_a655_811319f5a81e__Power
- **class Extractor** | [Details](src/eeb03266-22fd-45bb-953a-961bb6be3a54) | [Code](src/eeb03266-22fd-45bb-953a-961bb6be3a54/code.php) | [Settings](src/eeb03266-22fd-45bb-953a-961bb6be3a54/settings.json) | Super__eeb03266_22fd_45bb_953a_961bb6be3a54__Power
- **class Infusion** | [Details](src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c) | [Code](src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/code.php) | [Settings](src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/settings.json) | Super__0419081e_4cb3_4c65_8c6a_ffe941fb0f1c__Power - **class Infusion** | [Details](src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c) | [Code](src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/code.php) | [Settings](src/0419081e-4cb3-4c65-8c6a-ffe941fb0f1c/settings.json) | Super__0419081e_4cb3_4c65_8c6a_ffe941fb0f1c__Power
- **class Injector** | [Details](src/763d137c-42bc-4282-98d8-cc5c0654985f) | [Code](src/763d137c-42bc-4282-98d8-cc5c0654985f/code.php) | [Settings](src/763d137c-42bc-4282-98d8-cc5c0654985f/settings.json) | Super__763d137c_42bc_4282_98d8_cc5c0654985f__Power
- **class Plantuml** | [Details](src/ff5e9e63-86d0-4691-ab59-d4b9d9154096) | [Code](src/ff5e9e63-86d0-4691-ab59-d4b9d9154096/code.php) | [Settings](src/ff5e9e63-86d0-4691-ab59-d4b9d9154096/settings.json) | Super__ff5e9e63_86d0_4691_ab59_d4b9d9154096__Power - **class Plantuml** | [Details](src/ff5e9e63-86d0-4691-ab59-d4b9d9154096) | [Code](src/ff5e9e63-86d0-4691-ab59-d4b9d9154096/code.php) | [Settings](src/ff5e9e63-86d0-4691-ab59-d4b9d9154096/settings.json) | Super__ff5e9e63_86d0_4691_ab59_d4b9d9154096__Power
- **class Structure** | [Details](src/324566de-0f7d-4b6e-9caf-8424d55013ae) | [Code](src/324566de-0f7d-4b6e-9caf-8424d55013ae/code.php) | [Settings](src/324566de-0f7d-4b6e-9caf-8424d55013ae/settings.json) | Super__324566de_0f7d_4b6e_9caf_8424d55013ae__Power - **class Structure** | [Details](src/324566de-0f7d-4b6e-9caf-8424d55013ae) | [Code](src/324566de-0f7d-4b6e-9caf-8424d55013ae/code.php) | [Settings](src/324566de-0f7d-4b6e-9caf-8424d55013ae/settings.json) | Super__324566de_0f7d_4b6e_9caf_8424d55013ae__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\Service](#vdm-joomla-componentbuilder-compiler-service) - **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\Service](#vdm-joomla-componentbuilder-compiler-service)
@ -342,6 +355,7 @@ This repository contains an index (see below) of all the approved powers within
- **class Field** | [Details](src/c6c30d66-3106-44eb-9272-b2cf7ec74613) | [Code](src/c6c30d66-3106-44eb-9272-b2cf7ec74613/code.php) | [Settings](src/c6c30d66-3106-44eb-9272-b2cf7ec74613/settings.json) | Super__c6c30d66_3106_44eb_9272_b2cf7ec74613__Power - **class Field** | [Details](src/c6c30d66-3106-44eb-9272-b2cf7ec74613) | [Code](src/c6c30d66-3106-44eb-9272-b2cf7ec74613/code.php) | [Settings](src/c6c30d66-3106-44eb-9272-b2cf7ec74613/settings.json) | Super__c6c30d66_3106_44eb_9272_b2cf7ec74613__Power
- **class Header** | [Details](src/36d49d4a-8d0e-435f-ab4c-8f247d96fd4d) | [Code](src/36d49d4a-8d0e-435f-ab4c-8f247d96fd4d/code.php) | [Settings](src/36d49d4a-8d0e-435f-ab4c-8f247d96fd4d/settings.json) | Super__36d49d4a_8d0e_435f_ab4c_8f247d96fd4d__Power - **class Header** | [Details](src/36d49d4a-8d0e-435f-ab4c-8f247d96fd4d) | [Code](src/36d49d4a-8d0e-435f-ab4c-8f247d96fd4d/code.php) | [Settings](src/36d49d4a-8d0e-435f-ab4c-8f247d96fd4d/settings.json) | Super__36d49d4a_8d0e_435f_ab4c_8f247d96fd4d__Power
- **class History** | [Details](src/63782f74-7b03-4745-aa40-0adf8ed4e704) | [Code](src/63782f74-7b03-4745-aa40-0adf8ed4e704/code.php) | [Settings](src/63782f74-7b03-4745-aa40-0adf8ed4e704/settings.json) | Super__63782f74_7b03_4745_aa40_0adf8ed4e704__Power - **class History** | [Details](src/63782f74-7b03-4745-aa40-0adf8ed4e704) | [Code](src/63782f74-7b03-4745-aa40-0adf8ed4e704/code.php) | [Settings](src/63782f74-7b03-4745-aa40-0adf8ed4e704/settings.json) | Super__63782f74_7b03_4745_aa40_0adf8ed4e704__Power
- **class JoomlaPower** | [Details](src/5716c79f-a1c9-4059-9d00-8cccb9f9e061) | [Code](src/5716c79f-a1c9-4059-9d00-8cccb9f9e061/code.php) | [Settings](src/5716c79f-a1c9-4059-9d00-8cccb9f9e061/settings.json) | Super__5716c79f_a1c9_4059_9d00_8cccb9f9e061__Power
- **class Joomlamodule** | [Details](src/295186de-5954-4a65-a4c1-2f79ef305743) | [Code](src/295186de-5954-4a65-a4c1-2f79ef305743/code.php) | [Settings](src/295186de-5954-4a65-a4c1-2f79ef305743/settings.json) | Super__295186de_5954_4a65_a4c1_2f79ef305743__Power - **class Joomlamodule** | [Details](src/295186de-5954-4a65-a4c1-2f79ef305743) | [Code](src/295186de-5954-4a65-a4c1-2f79ef305743/code.php) | [Settings](src/295186de-5954-4a65-a4c1-2f79ef305743/settings.json) | Super__295186de_5954_4a65_a4c1_2f79ef305743__Power
- **class Joomlaplugin** | [Details](src/9eba241c-af90-42dd-ae05-92ff4d8391d3) | [Code](src/9eba241c-af90-42dd-ae05-92ff4d8391d3/code.php) | [Settings](src/9eba241c-af90-42dd-ae05-92ff4d8391d3/settings.json) | Super__9eba241c_af90_42dd_ae05_92ff4d8391d3__Power - **class Joomlaplugin** | [Details](src/9eba241c-af90-42dd-ae05-92ff4d8391d3) | [Code](src/9eba241c-af90-42dd-ae05-92ff4d8391d3/code.php) | [Settings](src/9eba241c-af90-42dd-ae05-92ff4d8391d3/settings.json) | Super__9eba241c_af90_42dd_ae05_92ff4d8391d3__Power
- **class Language** | [Details](src/9f00e793-86f8-4ef9-b775-a3eb129f83c0) | [Code](src/9f00e793-86f8-4ef9-b775-a3eb129f83c0/code.php) | [Settings](src/9f00e793-86f8-4ef9-b775-a3eb129f83c0/settings.json) | Super__9f00e793_86f8_4ef9_b775_a3eb129f83c0__Power - **class Language** | [Details](src/9f00e793-86f8-4ef9-b775-a3eb129f83c0) | [Code](src/9f00e793-86f8-4ef9-b775-a3eb129f83c0/code.php) | [Settings](src/9f00e793-86f8-4ef9-b775-a3eb129f83c0/settings.json) | Super__9f00e793_86f8_4ef9_b775_a3eb129f83c0__Power
@ -371,11 +385,29 @@ This repository contains an index (see below) of all the approved powers within
- **class Pathfix** | [Details](src/cdc9b06d-8333-4fa7-ab4d-b810dd90f95f) | [Code](src/cdc9b06d-8333-4fa7-ab4d-b810dd90f95f/code.php) | [Settings](src/cdc9b06d-8333-4fa7-ab4d-b810dd90f95f/settings.json) | Super__cdc9b06d_8333_4fa7_ab4d_b810dd90f95f__Power - **class Pathfix** | [Details](src/cdc9b06d-8333-4fa7-ab4d-b810dd90f95f) | [Code](src/cdc9b06d-8333-4fa7-ab4d-b810dd90f95f/code.php) | [Settings](src/cdc9b06d-8333-4fa7-ab4d-b810dd90f95f/settings.json) | Super__cdc9b06d_8333_4fa7_ab4d_b810dd90f95f__Power
- **class Paths** | [Details](src/6f20369a-8536-4870-a1a3-cda254c939c8) | [Code](src/6f20369a-8536-4870-a1a3-cda254c939c8/code.php) | [Settings](src/6f20369a-8536-4870-a1a3-cda254c939c8/settings.json) | Super__6f20369a_8536_4870_a1a3_cda254c939c8__Power - **class Paths** | [Details](src/6f20369a-8536-4870-a1a3-cda254c939c8) | [Code](src/6f20369a-8536-4870-a1a3-cda254c939c8/code.php) | [Settings](src/6f20369a-8536-4870-a1a3-cda254c939c8/settings.json) | Super__6f20369a_8536_4870_a1a3_cda254c939c8__Power
- **class Structure** | [Details](src/1efdded5-d6c8-452c-8f37-0374483a7b3f) | [Code](src/1efdded5-d6c8-452c-8f37-0374483a7b3f/code.php) | [Settings](src/1efdded5-d6c8-452c-8f37-0374483a7b3f/settings.json) | Super__1efdded5_d6c8_452c_8f37_0374483a7b3f__Power - **class Structure** | [Details](src/1efdded5-d6c8-452c-8f37-0374483a7b3f) | [Code](src/1efdded5-d6c8-452c-8f37-0374483a7b3f/code.php) | [Settings](src/1efdded5-d6c8-452c-8f37-0374483a7b3f/settings.json) | Super__1efdded5_d6c8_452c_8f37_0374483a7b3f__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Interfaces\Database](#vdm-joomla-componentbuilder-interfaces-database)
- **interface InsertInterface** | [Details](src/95c02df3-fe0a-405b-b506-b7a5b8605b66) | [Code](src/95c02df3-fe0a-405b-b506-b7a5b8605b66/code.php) | [Settings](src/95c02df3-fe0a-405b-b506-b7a5b8605b66/settings.json) | Super__95c02df3_fe0a_405b_b506_b7a5b8605b66__Power
- **interface UpdateInterface** | [Details](src/69c29be3-ab25-4f56-944e-7ada6307b10c) | [Code](src/69c29be3-ab25-4f56-944e-7ada6307b10c/code.php) | [Settings](src/69c29be3-ab25-4f56-944e-7ada6307b10c/settings.json) | Super__69c29be3_ab25_4f56_944e_7ada6307b10c__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\JoomlaPower\Database](#vdm-joomla-componentbuilder-joomlapower-database)
- **final class Insert** | [Details](src/9d53d45e-9b4d-45ec-827b-4916b91c907e) | [Code](src/9d53d45e-9b4d-45ec-827b-4916b91c907e/code.php) | [Settings](src/9d53d45e-9b4d-45ec-827b-4916b91c907e/settings.json) | Super__9d53d45e_9b4d_45ec_827b_4916b91c907e__Power
- **final class Load** | [Details](src/b4ea5de3-653f-43f9-b927-4ba6456b4d0a) | [Code](src/b4ea5de3-653f-43f9-b927-4ba6456b4d0a/code.php) | [Settings](src/b4ea5de3-653f-43f9-b927-4ba6456b4d0a/settings.json) | Super__b4ea5de3_653f_43f9_b927_4ba6456b4d0a__Power
- **final class Update** | [Details](src/679473f6-3ea2-49d5-8273-1b29c8f0ad2b) | [Code](src/679473f6-3ea2-49d5-8273-1b29c8f0ad2b/code.php) | [Settings](src/679473f6-3ea2-49d5-8273-1b29c8f0ad2b/settings.json) | Super__679473f6_3ea2_49d5_8273_1b29c8f0ad2b__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\JoomlaPower\Model](#vdm-joomla-componentbuilder-joomlapower-model)
- **final class Load** | [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
- **final class Upsert** | [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
- **Namespace**: [VDM\Joomla\Componentbuilder\JoomlaPower\Service](#vdm-joomla-componentbuilder-joomlapower-service)
- **class Database** | [Details](src/a2992a91-eec2-4957-811b-8cde22aa1438) | [Code](src/a2992a91-eec2-4957-811b-8cde22aa1438/code.php) | [Settings](src/a2992a91-eec2-4957-811b-8cde22aa1438/settings.json) | Super__a2992a91_eec2_4957_811b_8cde22aa1438__Power
- **class JoomlaPower** | [Details](src/38e1ca3e-1908-459a-be87-9f83b292058f) | [Code](src/38e1ca3e-1908-459a-be87-9f83b292058f/code.php) | [Settings](src/38e1ca3e-1908-459a-be87-9f83b292058f/settings.json) | Super__38e1ca3e_1908_459a_be87_9f83b292058f__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Power\Database](#vdm-joomla-componentbuilder-power-database) - **Namespace**: [VDM\Joomla\Componentbuilder\Power\Database](#vdm-joomla-componentbuilder-power-database)
- **final class Insert** | [Details](src/380bb7a3-cdcc-4336-a699-5070cbf521a5) | [Code](src/380bb7a3-cdcc-4336-a699-5070cbf521a5/code.php) | [Settings](src/380bb7a3-cdcc-4336-a699-5070cbf521a5/settings.json) | Super__380bb7a3_cdcc_4336_a699_5070cbf521a5__Power - **interface LoadInterface** | [Details](src/99786f53-64b7-4d52-95b0-5306e7386c3f) | [Code](src/99786f53-64b7-4d52-95b0-5306e7386c3f/code.php) | [Settings](src/99786f53-64b7-4d52-95b0-5306e7386c3f/settings.json) | Super__99786f53_64b7_4d52_95b0_5306e7386c3f__Power
- **final class Load** | [Details](src/1f86db0f-e271-45df-8795-3e503ec76698) | [Code](src/1f86db0f-e271-45df-8795-3e503ec76698/code.php) | [Settings](src/1f86db0f-e271-45df-8795-3e503ec76698/settings.json) | Super__1f86db0f_e271_45df_8795_3e503ec76698__Power - **class Insert** | [Details](src/380bb7a3-cdcc-4336-a699-5070cbf521a5) | [Code](src/380bb7a3-cdcc-4336-a699-5070cbf521a5/code.php) | [Settings](src/380bb7a3-cdcc-4336-a699-5070cbf521a5/settings.json) | Super__380bb7a3_cdcc_4336_a699_5070cbf521a5__Power
- **final class Update** | [Details](src/e543c123-b1d9-4a0b-83b2-a9d371da5ff3) | [Code](src/e543c123-b1d9-4a0b-83b2-a9d371da5ff3/code.php) | [Settings](src/e543c123-b1d9-4a0b-83b2-a9d371da5ff3/settings.json) | Super__e543c123_b1d9_4a0b_83b2_a9d371da5ff3__Power - **class Load** | [Details](src/1f86db0f-e271-45df-8795-3e503ec76698) | [Code](src/1f86db0f-e271-45df-8795-3e503ec76698/code.php) | [Settings](src/1f86db0f-e271-45df-8795-3e503ec76698/settings.json) | Super__1f86db0f_e271_45df_8795_3e503ec76698__Power
- **class Update** | [Details](src/e543c123-b1d9-4a0b-83b2-a9d371da5ff3) | [Code](src/e543c123-b1d9-4a0b-83b2-a9d371da5ff3/code.php) | [Settings](src/e543c123-b1d9-4a0b-83b2-a9d371da5ff3/settings.json) | Super__e543c123_b1d9_4a0b_83b2_a9d371da5ff3__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Power\Generator](#vdm-joomla-componentbuilder-power-generator) - **Namespace**: [VDM\Joomla\Componentbuilder\Power\Generator](#vdm-joomla-componentbuilder-power-generator)
- **final class Bucket** | [Details](src/5d4278f0-7db2-498f-872a-c974bd8ce334) | [Code](src/5d4278f0-7db2-498f-872a-c974bd8ce334/code.php) | [Settings](src/5d4278f0-7db2-498f-872a-c974bd8ce334/settings.json) | Super__5d4278f0_7db2_498f_872a_c974bd8ce334__Power - **final class Bucket** | [Details](src/5d4278f0-7db2-498f-872a-c974bd8ce334) | [Code](src/5d4278f0-7db2-498f-872a-c974bd8ce334/code.php) | [Settings](src/5d4278f0-7db2-498f-872a-c974bd8ce334/settings.json) | Super__5d4278f0_7db2_498f_872a_c974bd8ce334__Power
@ -386,8 +418,8 @@ This repository contains an index (see below) of all the approved powers within
- **final class ServiceProviderBuilder** | [Details](src/8a2a3ee5-6ce2-4604-91e2-01f770228960) | [Code](src/8a2a3ee5-6ce2-4604-91e2-01f770228960/code.php) | [Settings](src/8a2a3ee5-6ce2-4604-91e2-01f770228960/settings.json) | Super__8a2a3ee5_6ce2_4604_91e2_01f770228960__Power - **final class ServiceProviderBuilder** | [Details](src/8a2a3ee5-6ce2-4604-91e2-01f770228960) | [Code](src/8a2a3ee5-6ce2-4604-91e2-01f770228960/code.php) | [Settings](src/8a2a3ee5-6ce2-4604-91e2-01f770228960/settings.json) | Super__8a2a3ee5_6ce2_4604_91e2_01f770228960__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Power\Model](#vdm-joomla-componentbuilder-power-model) - **Namespace**: [VDM\Joomla\Componentbuilder\Power\Model](#vdm-joomla-componentbuilder-power-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 - **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 - **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\Componentbuilder\Power\Service](#vdm-joomla-componentbuilder-power-service) - **Namespace**: [VDM\Joomla\Componentbuilder\Power\Service](#vdm-joomla-componentbuilder-power-service)
- **class Database** | [Details](src/7243aaf6-b76c-4391-8698-50abbfc98fbe) | [Code](src/7243aaf6-b76c-4391-8698-50abbfc98fbe/code.php) | [Settings](src/7243aaf6-b76c-4391-8698-50abbfc98fbe/settings.json) | Super__7243aaf6_b76c_4391_8698_50abbfc98fbe__Power - **class Database** | [Details](src/7243aaf6-b76c-4391-8698-50abbfc98fbe) | [Code](src/7243aaf6-b76c-4391-8698-50abbfc98fbe/code.php) | [Settings](src/7243aaf6-b76c-4391-8698-50abbfc98fbe/settings.json) | Super__7243aaf6_b76c_4391_8698_50abbfc98fbe__Power
@ -457,6 +489,10 @@ This repository contains an index (see below) of all the approved powers within
- **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\Interfaces\Model](#vdm-joomla-componentbuilder-compiler-interfaces-model) - **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\Interfaces\Model](#vdm-joomla-componentbuilder-compiler-interfaces-model)
- **interface CustomtabsInterface** | [Details](src/fcf42c53-0967-4c87-9699-a4d86adfdadf) | [Code](src/fcf42c53-0967-4c87-9699-a4d86adfdadf/code.php) | [Settings](src/fcf42c53-0967-4c87-9699-a4d86adfdadf/settings.json) | Super__fcf42c53_0967_4c87_9699_a4d86adfdadf__Power - **interface CustomtabsInterface** | [Details](src/fcf42c53-0967-4c87-9699-a4d86adfdadf) | [Code](src/fcf42c53-0967-4c87-9699-a4d86adfdadf/code.php) | [Settings](src/fcf42c53-0967-4c87-9699-a4d86adfdadf/settings.json) | Super__fcf42c53_0967_4c87_9699_a4d86adfdadf__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\Interfaces\Power](#vdm-joomla-componentbuilder-compiler-interfaces-power)
- **interface ExtractorInterface** | [Details](src/c159425c-51f9-4a15-af99-f2d0c6d7aae8) | [Code](src/c159425c-51f9-4a15-af99-f2d0c6d7aae8/code.php) | [Settings](src/c159425c-51f9-4a15-af99-f2d0c6d7aae8/settings.json) | Super__c159425c_51f9_4a15_af99_f2d0c6d7aae8__Power
- **interface InjectorInterface** | [Details](src/e923311a-4058-4e81-9f67-5956fd0c627c) | [Code](src/e923311a-4058-4e81-9f67-5956fd0c627c/code.php) | [Settings](src/e923311a-4058-4e81-9f67-5956fd0c627c/settings.json) | Super__e923311a_4058_4e81_9f67_5956fd0c627c__Power
- **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\Model\JoomlaFive](#vdm-joomla-componentbuilder-compiler-model-joomlafive) - **Namespace**: [VDM\Joomla\Componentbuilder\Compiler\Model\JoomlaFive](#vdm-joomla-componentbuilder-compiler-model-joomlafive)
- **final class Customtabs** | [Details](src/92cc3144-1d3d-45b2-b49f-c7d356950033) | [Code](src/92cc3144-1d3d-45b2-b49f-c7d356950033/code.php) | [Settings](src/92cc3144-1d3d-45b2-b49f-c7d356950033/settings.json) | Super__92cc3144_1d3d_45b2_b49f_c7d356950033__Power - **final class Customtabs** | [Details](src/92cc3144-1d3d-45b2-b49f-c7d356950033) | [Code](src/92cc3144-1d3d-45b2-b49f-c7d356950033/code.php) | [Settings](src/92cc3144-1d3d-45b2-b49f-c7d356950033/settings.json) | Super__92cc3144_1d3d_45b2_b49f_c7d356950033__Power

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -18,8 +18,8 @@ use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Application\CMSApplication; use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use Joomla\CMS\Version; use Joomla\CMS\Version;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;

View File

@ -15,7 +15,7 @@ namespace VDM\Joomla\Componentbuilder\Power\Service;
use Joomla\DI\Container; use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface; use Joomla\DI\ServiceProviderInterface;
use VDM\Joomla\Componentbuilder\Power\Config; use VDM\Joomla\Componentbuilder\Power\Config;
use VDM\Joomla\Componentbuilder\Table; use VastDevelopmentMethod\Joomla\Componentbuilder\Table;
use VDM\Joomla\Componentbuilder\Power\Grep; use VDM\Joomla\Componentbuilder\Power\Grep;
use VDM\Joomla\Componentbuilder\Power\Super as Superpower; use VDM\Joomla\Componentbuilder\Power\Super as Superpower;
use VDM\Joomla\Componentbuilder\Compiler\Power\Parser; use VDM\Joomla\Componentbuilder\Compiler\Power\Parser;

View File

@ -14,8 +14,8 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\Component\Helper; use VastDevelopmentMethod\Joomla\Utilities\Component\Helper;
/** /**

View File

@ -21,9 +21,9 @@ use VDM\Joomla\Componentbuilder\Compiler\Power\Repo\Readme as RepoReadme;
use VDM\Joomla\Componentbuilder\Compiler\Power\Repos\Readme as ReposReadme; use VDM\Joomla\Componentbuilder\Compiler\Power\Repos\Readme as ReposReadme;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder; use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VastDevelopmentMethod\Joomla\Utilities\ObjectHelper;
/** /**

View File

@ -14,10 +14,10 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Customcode\Extractor;
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\Folder; use Joomla\CMS\Filesystem\Folder;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\JsonHelper; use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\GetHelper; use VastDevelopmentMethod\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\String\ClassfunctionHelper; use VastDevelopmentMethod\Joomla\Utilities\String\ClassfunctionHelper;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder; use VDM\Joomla\Componentbuilder\Compiler\Placeholder;

View File

@ -25,8 +25,8 @@ use VDM\Joomla\Componentbuilder\Compiler\Creator\Layout;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Creator\Fieldsetinterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Creator\Fieldsetinterface;

View File

@ -0,0 +1,38 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# final class Load (Details)
> namespace: **VDM\Joomla\Componentbuilder\JoomlaPower\Model**
> extends: **ExtendingLoad**
```uml
@startuml
class Load << (F,LightGreen) >> #RoyalBlue {
# getTable() : string
}
note right of Load::getTable
Get the current active table
since: 3.2.0
return: string
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,37 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Componentbuilder\JoomlaPower\Model;
use VastDevelopmentMethod\Joomla\Interfaces\ModelInterface;
use VDM\Joomla\Componentbuilder\Power\Model\Load as ExtendingLoad;
/**
* Joomla Power Model Load
*
* @since 3.2.0
*/
final class Load extends ExtendingLoad implements ModelInterface
{
/**
* Get the current active table
*
* @return string
* @since 3.2.0
*/
protected function getTable(): string
{
return 'joomla_power';
}
}

View File

@ -0,0 +1,10 @@
/**
* Get the current active table
*
* @return string
* @since 3.2.0
*/
protected function getTable(): string
{
return 'joomla_power';
}

View File

@ -0,0 +1,20 @@
{
"add_head": "0",
"add_licensing_template": "2",
"extends": "bb29a833-73f7-4283-9327-bc7e41f0723b",
"guid": "05744dd3-4030-4cf8-8dda-a93ab809b473",
"implements": [
"8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff"
],
"load_selection": null,
"name": "Load",
"power_version": "1.0.0",
"system_name": "JCB.JoomlaPower.Model.Load",
"type": "final class",
"use_selection": null,
"namespace": "VDM\\Joomla\\Componentbuilder.JoomlaPower.Model.Load",
"description": "Joomla Power Model Load\r\n\r\n@since 3.2.0",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
"head": "",
"composer": ""
}

View File

@ -21,8 +21,8 @@ use VDM\Joomla\Componentbuilder\Compiler\Customcode;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;
use VDM\Joomla\Componentbuilder\Compiler\Model\Dynamicget; use VDM\Joomla\Componentbuilder\Compiler\Model\Dynamicget;
use VDM\Joomla\Utilities\JsonHelper; use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
/** /**

View File

@ -14,7 +14,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service;
use Joomla\DI\Container; use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface; use Joomla\DI\ServiceProviderInterface;
use VDM\Joomla\Componentbuilder\Server\Model\Load as ServerLoad; use VastDevelopmentMethod\Joomla\Componentbuilder\Server\Model\Load as ServerLoad;
use VDM\Joomla\Componentbuilder\Compiler\Model\Joomlaplugins; use VDM\Joomla\Componentbuilder\Compiler\Model\Joomlaplugins;
use VDM\Joomla\Componentbuilder\Compiler\Model\Joomlamodules; use VDM\Joomla\Componentbuilder\Compiler\Model\Joomlamodules;
use VDM\Joomla\Componentbuilder\Compiler\Model\Historycomponent; use VDM\Joomla\Componentbuilder\Compiler\Model\Historycomponent;

View File

@ -12,7 +12,7 @@
namespace VDM\Joomla\Componentbuilder\Compiler; namespace VDM\Joomla\Componentbuilder\Compiler;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;

View File

@ -26,10 +26,10 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
use VDM\Joomla\Componentbuilder\Compiler\Builder\TemplateData; use VDM\Joomla\Componentbuilder\Compiler\Builder\TemplateData;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VastDevelopmentMethod\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\FileHelper; use VastDevelopmentMethod\Joomla\Utilities\FileHelper;
/** /**

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -12,9 +12,9 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Abstraction\Registry\Traits\ToString; use VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits\ToString;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -0,0 +1,115 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# class Config (Details)
> namespace: **VDM\Joomla\Componentbuilder\JoomlaPower**
> extends: **BaseConfig**
```uml
@startuml
class Config #Gold {
# JoomlaRegistry $config
+ __construct(?Input $input = null, ?JoomlaRegistry $params = null, ...)
# getGiteatoken() : ?string
# getAddcustomgiteaurl() : int
# getCustomgiteaurl() : ?string
# getCustomgiteatoken() : ?string
# getJoomlapowerscoreorganisation() : string
# getJoomlapowersinitrepos() : array
# getTmppath() : string
# getLocaljoomlapowersrepositorypath() : string
# getApprovedjoomlapaths() : array
}
note right of Config::__construct
Constructor
since: 3.2.0
arguments:
?Input $input = null
?JoomlaRegistry $params = null
?JoomlaRegistry $config = null
end note
note left of Config::getGiteatoken
get Gitea Access Token
since: 3.2.0
return: ?string
end note
note right of Config::getAddcustomgiteaurl
get Add Custom Gitea URL
since: 3.2.0
return: int
end note
note left of Config::getCustomgiteaurl
get Custom Gitea URL
since: 3.2.0
return: ?string
end note
note right of Config::getCustomgiteatoken
get Custom Gitea Access Token
since: 3.2.0
return: ?string
end note
note left of Config::getJoomlapowerscoreorganisation
Get super power core organisation
since: 3.2.0
return: string
end note
note right of Config::getJoomlapowersinitrepos
Get Joomla power init repos
since: 3.2.0
return: array
end note
note left of Config::getTmppath
get temporary path
since: 3.2.0
return: string
end note
note right of Config::getLocaljoomlapowersrepositorypath
Get local joomla super powers repository path
since: 3.2.0
return: string
end note
note left of Config::getApprovedjoomlapaths
Get joomla power approved paths
since: 3.2.0
return: array
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,182 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Componentbuilder\JoomlaPower;
use Joomla\Registry\Registry as JoomlaRegistry;
use Joomla\CMS\Factory as JoomlaFactory;
use VastDevelopmentMethod\Joomla\Utilities\GetHelper;
use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig;
/**
* Compiler Configurations
*
* All these functions are accessed via the direct name without the get:
* example: $this->component_code_name calls: $this->getComponentcodename()
*
* All values once called are cached, yet can be updated directly:
* example: $this->component_code_name = 'new_code_name'; // be warned!
*
* @since 3.2.0
*/
class Config extends BaseConfig
{
/**
* The Global Joomla Configuration
*
* @var JoomlaRegistry
* @since 3.2.0
*/
protected JoomlaRegistry $config;
/**
* Constructor
*
* @param Input|null $input Input
* @param Registry|null $params The component parameters
* @param Registry|null $config The Joomla configuration
*
* @throws \Exception
* @since 3.2.0
*/
public function __construct(?Input $input = null, ?JoomlaRegistry $params = null, ?JoomlaRegistry $config = null)
{
parent::__construct($input, $params);
$this->config = $config ?: JoomlaFactory::getConfig();
}
/**
* get Gitea Access Token
*
* @return string the access token
* @since 3.2.0
*/
protected function getGiteatoken(): ?string
{
return $this->custom_gitea_token ?? $this->params->get('gitea_token');
}
/**
* get Add Custom Gitea URL
*
* @return int the add switch
* @since 3.2.0
*/
protected function getAddcustomgiteaurl(): int
{
return $this->params->get('add_custom_gitea_url', 1);
}
/**
* get Custom Gitea URL
*
* @return string the custom gitea url
* @since 3.2.0
*/
protected function getCustomgiteaurl(): ?string
{
if ($this->add_custom_gitea_url == 2)
{
return $this->params->get('custom_gitea_url');
}
return null;
}
/**
* get Custom Gitea Access Token
*
* @return string the custom access token
* @since 3.2.0
*/
protected function getCustomgiteatoken(): ?string
{
if ($this->add_custom_gitea_url == 2)
{
return $this->params->get('custom_gitea_token');
}
return null;
}
/**
* Get super power core organisation
*
* @return string The super power core organisation
* @since 3.2.0
*/
protected function getJoomlapowerscoreorganisation(): string
{
// the VDM default organisation is [joomla]
$organisation = 'joomla';
return $this->params->get('joomla_powers_core_organisation', $organisation);
}
/**
* Get Joomla power init repos
*
* @return array The init repositories on Gitea
* @since 3.2.0
*/
protected function getJoomlapowersinitrepos(): array
{
// some defaults repos we need by JCB
$repos = [];
$repos[$this->joomla_powers_core_organisation . '.joomla-powers'] = (object) ['owner' => $this->joomla_powers_core_organisation, 'repo' => 'joomla-powers', 'branch' => 'master'];
return $repos;
}
/**
* get temporary path
*
* @return string The temporary path
* @since 3.2.0
*/
protected function getTmppath(): string
{
// get the temporary path
return $this->config->get('tmp_path');
}
/**
* Get local joomla super powers repository path
*
* @return string The path to the local repository
* @since 3.2.0
*/
protected function getLocaljoomlapowersrepositorypath(): string
{
$default = $this->tmp_path . '/joomla_powers';
return $this->params->get('local_joomla_powers_repository_path', $default);
}
/**
* Get joomla power approved paths
*
* @return array The paths to the repositories on Gitea
* @since 3.2.0
*/
protected function getApprovedjoomlapaths(): array
{
// some defaults repos we need by JCB
$approved = $this->joomla_powers_init_repos;
return array_values($approved);
}
}

View File

@ -0,0 +1,146 @@
/**
* The Global Joomla Configuration
*
* @var JoomlaRegistry
* @since 3.2.0
*/
protected JoomlaRegistry $config;
/**
* Constructor
*
* @param Input|null $input Input
* @param Registry|null $params The component parameters
* @param Registry|null $config The Joomla configuration
*
* @throws \Exception
* @since 3.2.0
*/
public function __construct(?Input $input = null, ?JoomlaRegistry $params = null, ?JoomlaRegistry $config = null)
{
parent::__construct($input, $params);
$this->config = $config ?: JoomlaFactory::getConfig();
}
/**
* get Gitea Access Token
*
* @return string the access token
* @since 3.2.0
*/
protected function getGiteatoken(): ?string
{
return $this->custom_gitea_token ?? $this->params->get('gitea_token');
}
/**
* get Add Custom Gitea URL
*
* @return int the add switch
* @since 3.2.0
*/
protected function getAddcustomgiteaurl(): int
{
return $this->params->get('add_custom_gitea_url', 1);
}
/**
* get Custom Gitea URL
*
* @return string the custom gitea url
* @since 3.2.0
*/
protected function getCustomgiteaurl(): ?string
{
if ($this->add_custom_gitea_url == 2)
{
return $this->params->get('custom_gitea_url');
}
return null;
}
/**
* get Custom Gitea Access Token
*
* @return string the custom access token
* @since 3.2.0
*/
protected function getCustomgiteatoken(): ?string
{
if ($this->add_custom_gitea_url == 2)
{
return $this->params->get('custom_gitea_token');
}
return null;
}
/**
* Get super power core organisation
*
* @return string The super power core organisation
* @since 3.2.0
*/
protected function getJoomlapowerscoreorganisation(): string
{
// the VDM default organisation is [joomla]
$organisation = 'joomla';
return $this->params->get('joomla_powers_core_organisation', $organisation);
}
/**
* Get Joomla power init repos
*
* @return array The init repositories on Gitea
* @since 3.2.0
*/
protected function getJoomlapowersinitrepos(): array
{
// some defaults repos we need by JCB
$repos = [];
$repos[$this->joomla_powers_core_organisation . '.joomla-powers'] = (object) ['owner' => $this->joomla_powers_core_organisation, 'repo' => 'joomla-powers', 'branch' => 'master'];
return $repos;
}
/**
* get temporary path
*
* @return string The temporary path
* @since 3.2.0
*/
protected function getTmppath(): string
{
// get the temporary path
return $this->config->get('tmp_path');
}
/**
* Get local joomla super powers repository path
*
* @return string The path to the local repository
* @since 3.2.0
*/
protected function getLocaljoomlapowersrepositorypath(): string
{
$default = $this->tmp_path . '/joomla_powers';
return $this->params->get('local_joomla_powers_repository_path', $default);
}
/**
* Get joomla power approved paths
*
* @return array The paths to the repositories on Gitea
* @since 3.2.0
*/
protected function getApprovedjoomlapaths(): array
{
// some defaults repos we need by JCB
$approved = $this->joomla_powers_init_repos;
return array_values($approved);
}

View File

@ -0,0 +1,27 @@
{
"add_head": "1",
"add_licensing_template": "2",
"extends": "9769f3b2-17bf-4f20-b54b-3a4ebe572b36",
"guid": "0b821bba-7503-4448-90e7-f3c1bd51dfd6",
"implements": null,
"load_selection": null,
"name": "Config",
"power_version": "1.0.0",
"system_name": "JCB.JoomlaPower.Config",
"type": "class",
"use_selection": {
"use_selection0": {
"use": "db87c339-5bb6-4291-a7ef-2c48ea1b06bc",
"as": "default"
},
"use_selection1": {
"use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef",
"as": "default"
}
},
"namespace": "VDM\\Joomla\\Componentbuilder.JoomlaPower.Config",
"description": "Compiler Configurations\r\n\r\n\tAll these functions are accessed via the direct name without the get:\r\n\texample: $this->component_code_name calls: $this->getComponentcodename()\r\n\r\n\tAll values once called are cached, yet can be updated directly:\r\n\texample: $this->component_code_name = 'new_code_name'; \/\/ be warned!\r\n\r\n@since 3.2.0",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
"head": "use Joomla\\Registry\\Registry as JoomlaRegistry;\r\nuse Joomla\\CMS\\Factory as JoomlaFactory;",
"composer": ""
}

View File

@ -17,7 +17,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Builder\FootableScripts;
use VDM\Joomla\Componentbuilder\Compiler\Builder\GoogleChart; use VDM\Joomla\Componentbuilder\Compiler\Builder\GoogleChart;
use VDM\Joomla\Componentbuilder\Compiler\Builder\GetModule; use VDM\Joomla\Componentbuilder\Compiler\Builder\GetModule;
use VDM\Joomla\Componentbuilder\Compiler\Builder\UikitComp; use VDM\Joomla\Componentbuilder\Compiler\Builder\UikitComp;
use VDM\Joomla\Utilities\Component\Helper; use VastDevelopmentMethod\Joomla\Utilities\Component\Helper;
/** /**

View File

@ -12,6 +12,8 @@
```uml ```uml
@startuml @startuml
class DatabaseKeys << (F,LightGreen) >> #RoyalBlue { class DatabaseKeys << (F,LightGreen) >> #RoyalBlue {
# bool $addAsArray
# bool $uniqueArray
} }
@enduml @enduml

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**
@ -23,5 +23,20 @@ use VDM\Joomla\Abstraction\Registry;
*/ */
final class DatabaseKeys extends Registry implements Registryinterface final class DatabaseKeys extends Registry implements Registryinterface
{ {
/**
* Base switch to add values as string or array
*
* @var boolean
* @since 3.2.0
**/
protected bool $addAsArray = true;
/**
* Base switch to keep array values unique
*
* @var boolean
* @since 3.2.2
**/
protected bool $uniqueArray = true;
} }

View File

@ -1 +1,15 @@
###CODEPOWER### /**
* Base switch to add values as string or array
*
* @var boolean
* @since 3.2.0
**/
protected bool $addAsArray = true;
/**
* Base switch to keep array values unique
*
* @var boolean
* @since 3.2.2
**/
protected bool $uniqueArray = true;

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Model; namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Utilities\JsonHelper; use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
/** /**
@ -39,7 +39,18 @@ class Permissions
if (ArrayHelper::check($item->addpermissions)) if (ArrayHelper::check($item->addpermissions))
{ {
$item->permissions = array_values($item->addpermissions); if (isset($item->addpermissions["action"]) && is_array($item->addpermissions["action"])
&& isset($item->addpermissions["implementation"]) && is_array($item->addpermissions["implementation"]))
{
foreach ($item->addpermissions["action"] as $k => $action)
{
$item->permissions[] = ['action' => $action, 'implementation' => $item->addpermissions["implementation"][$k]];
}
}
else
{
$item->permissions = array_values($item->addpermissions);
}
} }
unset($item->addpermissions); unset($item->addpermissions);

View File

@ -14,7 +14,18 @@
if (ArrayHelper::check($item->addpermissions)) if (ArrayHelper::check($item->addpermissions))
{ {
$item->permissions = array_values($item->addpermissions); if (isset($item->addpermissions["action"]) && is_array($item->addpermissions["action"])
&& isset($item->addpermissions["implementation"]) && is_array($item->addpermissions["implementation"]))
{
foreach ($item->addpermissions["action"] as $k => $action)
{
$item->permissions[] = ['action' => $action, 'implementation' => $item->addpermissions["implementation"][$k]];
}
}
else
{
$item->permissions = array_values($item->addpermissions);
}
} }
unset($item->addpermissions); unset($item->addpermissions);

View File

@ -12,9 +12,9 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Abstraction\Registry\Traits\Count; use VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits\Count;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -19,7 +19,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Builder\Contributors;
use VDM\Joomla\Componentbuilder\Compiler\Builder\ConfigFieldsets; use VDM\Joomla\Componentbuilder\Compiler\Builder\ConfigFieldsets;
use VDM\Joomla\Componentbuilder\Compiler\Builder\ExtensionsParams; use VDM\Joomla\Componentbuilder\Compiler\Builder\ExtensionsParams;
use VDM\Joomla\Componentbuilder\Compiler\Builder\ConfigFieldsetsCustomfield as Customfield; use VDM\Joomla\Componentbuilder\Compiler\Builder\ConfigFieldsetsCustomfield as Customfield;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;

View File

@ -19,8 +19,8 @@ use VDM\Joomla\Componentbuilder\Compiler\Creator\RouterConstructorDefault as Def
use VDM\Joomla\Componentbuilder\Compiler\Creator\RouterConstructorManual as ManualConstructor; use VDM\Joomla\Componentbuilder\Compiler\Creator\RouterConstructorManual as ManualConstructor;
use VDM\Joomla\Componentbuilder\Compiler\Creator\RouterMethodsDefault as DefaultMethods; use VDM\Joomla\Componentbuilder\Compiler\Creator\RouterMethodsDefault as DefaultMethods;
use VDM\Joomla\Componentbuilder\Compiler\Creator\RouterMethodsManual as ManualMethods; use VDM\Joomla\Componentbuilder\Compiler\Creator\RouterMethodsManual as ManualMethods;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
/** /**

View File

@ -13,8 +13,8 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Field;
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\GetHelper; use VastDevelopmentMethod\Joomla\Utilities\GetHelper;
/** /**

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Model; namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Utilities\JsonHelper; use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
/** /**

View File

@ -26,9 +26,9 @@ use VDM\Joomla\Componentbuilder\Compiler\Builder\PermissionViews;
use VDM\Joomla\Componentbuilder\Compiler\Builder\PermissionFields; use VDM\Joomla\Componentbuilder\Compiler\Builder\PermissionFields;
use VDM\Joomla\Componentbuilder\Compiler\Builder\PermissionComponent; use VDM\Joomla\Componentbuilder\Compiler\Builder\PermissionComponent;
use VDM\Joomla\Componentbuilder\Compiler\Creator\CustomButtonPermissions; use VDM\Joomla\Componentbuilder\Compiler\Creator\CustomButtonPermissions;
use VDM\Joomla\Utilities\MathHelper; use VastDevelopmentMethod\Joomla\Utilities\MathHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
/** /**
@ -460,7 +460,7 @@ final class AccessSections
} }
} }
$this->permission ->set( $this->permission->set(
$custom_admin_view, $customAdminCode, $customAdminCode, $custom_admin_view, $customAdminCode, $customAdminCode,
$menuControllers, 'customAdmin' $menuControllers, 'customAdmin'
); );
@ -661,7 +661,8 @@ final class AccessSections
} }
} }
} }
$this->permission ->set(
$this->permission->set(
$view, $nameView, $nameViews, $menuControllers $view, $nameView, $nameViews, $menuControllers
); );
} }

View File

@ -420,7 +420,7 @@
} }
} }
$this->permission ->set( $this->permission->set(
$custom_admin_view, $customAdminCode, $customAdminCode, $custom_admin_view, $customAdminCode, $customAdminCode,
$menuControllers, 'customAdmin' $menuControllers, 'customAdmin'
); );
@ -621,7 +621,8 @@
} }
} }
} }
$this->permission ->set(
$this->permission->set(
$view, $nameView, $nameViews, $menuControllers $view, $nameView, $nameViews, $menuControllers
); );
} }

View File

@ -15,7 +15,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaFive;
use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder; use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission; use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;

View File

@ -16,9 +16,9 @@ use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HistoryInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HistoryInterface;
use VDM\Joomla\Componentbuilder\Compiler\Model\Updatesql; use VDM\Joomla\Componentbuilder\Compiler\Model\Updatesql;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VastDevelopmentMethod\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\JsonHelper; use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
/** /**

View File

@ -12,9 +12,9 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Abstraction\Registry\Traits\InArray; use VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits\InArray;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -12,9 +12,9 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Abstraction\Registry\Traits\ToString; use VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits\ToString;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -15,7 +15,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaFour;
use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder; use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission; use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;

View File

@ -15,11 +15,11 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Customcode;
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use Joomla\CMS\Application\CMSApplication; use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\GetHelper; use VastDevelopmentMethod\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\FileHelper; use VastDevelopmentMethod\Joomla\Utilities\FileHelper;
use VDM\Joomla\Utilities\String\FieldHelper; use VastDevelopmentMethod\Joomla\Utilities\String\FieldHelper;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder\Reverse; use VDM\Joomla\Componentbuilder\Compiler\Placeholder\Reverse;

View File

@ -17,10 +17,10 @@ use Joomla\CMS\User\User;
use Joomla\CMS\Application\CMSApplication; use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\Path; use Joomla\CMS\Filesystem\Path;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\GetHelper; use VastDevelopmentMethod\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\FileHelper; use VastDevelopmentMethod\Joomla\Utilities\FileHelper;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder; use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Customcode\ExternalInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Customcode\ExternalInterface;

View File

@ -12,9 +12,9 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Model; namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\JsonHelper; use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
/** /**

View File

@ -13,8 +13,8 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Extension\JoomlaThree;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Extension\InstallInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Extension\InstallInterface;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\GetScriptInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\GetScriptInterface;

View File

@ -12,7 +12,7 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Utilities; namespace VDM\Joomla\Componentbuilder\Compiler\Utilities;
use VDM\Joomla\Componentbuilder\Abstraction\BaseRegistry; use VastDevelopmentMethod\Joomla\Componentbuilder\Abstraction\BaseRegistry;
/** /**

View File

@ -22,8 +22,8 @@ use VDM\Joomla\Componentbuilder\Compiler\Builder\Category;
use VDM\Joomla\Componentbuilder\Compiler\Builder\AccessSwitchList; use VDM\Joomla\Componentbuilder\Compiler\Builder\AccessSwitchList;
use VDM\Joomla\Componentbuilder\Compiler\Builder\Filter; use VDM\Joomla\Componentbuilder\Compiler\Builder\Filter;
use VDM\Joomla\Componentbuilder\Compiler\Builder\Tags; use VDM\Joomla\Componentbuilder\Compiler\Builder\Tags;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HeaderInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HeaderInterface;

View File

@ -23,8 +23,8 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\Paths;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; use VDM\Joomla\Componentbuilder\Compiler\Utilities\File;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
/** /**

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -6,13 +6,14 @@
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ ██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# final class Load (Details) # class Load (Details)
> namespace: **VDM\Joomla\Componentbuilder\Power\Database** > namespace: **VDM\Joomla\Componentbuilder\Power\Database**
```uml ```uml
@startuml @startuml
class Load << (F,LightGreen) >> #RoyalBlue { class Load #Gold {
# Model $model # Model $model
# Database $load # Database $load
# string $table
+ __construct(Model $model, Database $load) + __construct(Model $model, Database $load)
+ value(array $keys, string $field) : mixed + value(array $keys, string $field) : mixed
+ item(array $keys) : ?object + item(array $keys) : ?object

View File

@ -12,8 +12,9 @@
namespace VDM\Joomla\Componentbuilder\Power\Database; namespace VDM\Joomla\Componentbuilder\Power\Database;
use VDM\Joomla\Componentbuilder\Power\Model\Load as Model; use VastDevelopmentMethod\Joomla\Interfaces\ModelInterface as Model;
use VDM\Joomla\Database\Load as Database; use VastDevelopmentMethod\Joomla\Database\Load as Database;
use VDM\Joomla\Componentbuilder\Power\Database\LoadInterface;
/** /**
@ -21,7 +22,7 @@ use VDM\Joomla\Database\Load as Database;
* *
* @since 2.0.1 * @since 2.0.1
*/ */
final class Load class Load implements LoadInterface
{ {
/** /**
* Model Load * Model Load
@ -39,6 +40,14 @@ final class Load
*/ */
protected Database $load; protected Database $load;
/**
* Table Name
*
* @var string
* @since 3.2.1
*/
protected string $table = 'power';
/** /**
* Constructor * Constructor
* *
@ -74,11 +83,11 @@ final class Load
return $this->model->value( return $this->model->value(
$this->load->value( $this->load->value(
["a.{$field}" => $field], ["a.{$field}" => $field],
['a' => 'power'], ['a' => $this->table],
$this->prefix($keys) $this->prefix($keys)
), ),
$field, $field,
'power' $this->table
); );
} }
@ -101,10 +110,10 @@ final class Load
return $this->model->item( return $this->model->item(
$this->load->item( $this->load->item(
['all' => 'a.*'], ['all' => 'a.*'],
['a' => 'power'], ['a' => $this->table],
$this->prefix($keys) $this->prefix($keys)
), ),
'power' $this->table
); );
} }
@ -130,9 +139,9 @@ final class Load
{ {
return $this->model->items( return $this->model->items(
$this->load->items( $this->load->items(
['all' => 'a.*'], ['a' => 'power'], $this->prefix($keys) ['all' => 'a.*'], ['a' => $this->table], $this->prefix($keys)
), ),
'power' $this->table
); );
} }

View File

@ -14,6 +14,14 @@
*/ */
protected Database $load; protected Database $load;
/**
* Table Name
*
* @var string
* @since 3.2.1
*/
protected string $table = 'power';
/** /**
* Constructor * Constructor
* *
@ -49,11 +57,11 @@
return $this->model->value( return $this->model->value(
$this->load->value( $this->load->value(
["a.{$field}" => $field], ["a.{$field}" => $field],
['a' => 'power'], ['a' => $this->table],
$this->prefix($keys) $this->prefix($keys)
), ),
$field, $field,
'power' $this->table
); );
} }
@ -76,10 +84,10 @@
return $this->model->item( return $this->model->item(
$this->load->item( $this->load->item(
['all' => 'a.*'], ['all' => 'a.*'],
['a' => 'power'], ['a' => $this->table],
$this->prefix($keys) $this->prefix($keys)
), ),
'power' $this->table
); );
} }
@ -105,9 +113,9 @@
{ {
return $this->model->items( return $this->model->items(
$this->load->items( $this->load->items(
['all' => 'a.*'], ['a' => 'power'], $this->prefix($keys) ['all' => 'a.*'], ['a' => $this->table], $this->prefix($keys)
), ),
'power' $this->table
); );
} }

View File

@ -3,15 +3,17 @@
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "0",
"guid": "1f86db0f-e271-45df-8795-3e503ec76698", "guid": "1f86db0f-e271-45df-8795-3e503ec76698",
"implements": null, "implements": [
"99786f53-64b7-4d52-95b0-5306e7386c3f"
],
"load_selection": null, "load_selection": null,
"name": "Load", "name": "Load",
"power_version": "1.0.0", "power_version": "1.0.0",
"system_name": "JCB.Power.Database.Load", "system_name": "JCB.Power.Database.Load",
"type": "final class", "type": "class",
"use_selection": { "use_selection": {
"use_selection0": { "use_selection0": {
"use": "bb29a833-73f7-4283-9327-bc7e41f0723b", "use": "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff",
"as": "Model" "as": "Model"
}, },
"use_selection1": { "use_selection1": {

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -16,9 +16,9 @@ use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Language; use VDM\Joomla\Componentbuilder\Compiler\Language;
use VDM\Joomla\Componentbuilder\Compiler\Builder\ConfigFieldsetsCustomfield as Customfield; use VDM\Joomla\Componentbuilder\Compiler\Builder\ConfigFieldsetsCustomfield as Customfield;
use VDM\Joomla\Componentbuilder\Compiler\Builder\ConfigFieldsets; use VDM\Joomla\Componentbuilder\Compiler\Builder\ConfigFieldsets;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\GetHelper; use VastDevelopmentMethod\Joomla\Utilities\GetHelper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;

View File

@ -28,13 +28,13 @@ use VDM\Joomla\Componentbuilder\Compiler\Creator\ConfigFieldsetsGooglechart;
use VDM\Joomla\Componentbuilder\Compiler\Creator\ConfigFieldsetsEmailHelper; use VDM\Joomla\Componentbuilder\Compiler\Creator\ConfigFieldsetsEmailHelper;
use VDM\Joomla\Componentbuilder\Compiler\Creator\ConfigFieldsetsEncryption; use VDM\Joomla\Componentbuilder\Compiler\Creator\ConfigFieldsetsEncryption;
use VDM\Joomla\Componentbuilder\Compiler\Creator\ConfigFieldsetsCustomfield; use VDM\Joomla\Componentbuilder\Compiler\Creator\ConfigFieldsetsCustomfield;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
use VDM\Joomla\Utilities\GetHelper; use VastDevelopmentMethod\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
use VDM\Joomla\Utilities\MathHelper; use VastDevelopmentMethod\Joomla\Utilities\MathHelper;
/** /**

View File

@ -12,22 +12,24 @@
@startuml @startuml
class FileInjector << (F,LightGreen) >> #RoyalBlue { class FileInjector << (F,LightGreen) >> #RoyalBlue {
# Power $power # Power $power
+ __construct(Power $power) # JoomlaPower $joomla
+ __construct(Power $power, JoomlaPower $joomla)
+ add(string $file, string $data, ...) : void + add(string $file, string $data, ...) : void
- openFileWithLock(string $file) : resource - openFileWithLock(string $file) : resource
- processFile(resource $actual_file, resource $temp_file, ...) : void - processFile(resource $actual_file, resource $temp_file, ...) : void
- truncateIfNeeded(resource $actual_file, string $data, ...) : void - truncateIfNeeded(resource $actual_file, string $data, ...) : void
- copyRemainingData(resource $actual_file, resource $temp_file, ...) : void - copyRemainingData(resource $actual_file, resource $temp_file, ...) : void
- injectSuperPowers(resource $actual_file) : void - injectSuperPowers(resource $actual_file) : void
- injectJoomlaPowers(resource $actual_file) : void
} }
note right of FileInjector::__construct note right of FileInjector::__construct
Constructor. Constructor.
since: 3.2.0 since: 3.2.1
end note end note
note right of FileInjector::add note left of FileInjector::add
Inserts or replaces data in a file at a specific position. Inserts or replaces data in a file at a specific position.
since: 3.2.0 since: 3.2.0
@ -47,7 +49,7 @@ note right of FileInjector::openFileWithLock
return: resource return: resource
end note end note
note right of FileInjector::processFile note left of FileInjector::processFile
Processes the file for data insertion and copying the remaining data. Processes the file for data insertion and copying the remaining data.
since: 3.2.0 since: 3.2.0
@ -73,7 +75,7 @@ note right of FileInjector::truncateIfNeeded
int $position int $position
end note end note
note right of FileInjector::copyRemainingData note left of FileInjector::copyRemainingData
Copies the remaining data from the temporary stream to the actual file. Copies the remaining data from the temporary stream to the actual file.
since: 3.2.0 since: 3.2.0
@ -93,6 +95,13 @@ note right of FileInjector::injectSuperPowers
return: void return: void
end note end note
note left of FileInjector::injectJoomlaPowers
Injects Joomla powers into the file content, if found, and updates the file.
since: 3.2.1
return: void
end note
@enduml @enduml
``` ```

View File

@ -13,7 +13,8 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Utilities;
use VDM\Joomla\Componentbuilder\Compiler\Power\Injector as Power; use VDM\Joomla\Componentbuilder\Compiler\Power\Injector as Power;
use VDM\Joomla\Utilities\MathHelper; use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Injector as JoomlaPower;
use VastDevelopmentMethod\Joomla\Utilities\MathHelper;
/** /**
@ -33,23 +34,41 @@ final class FileInjector
protected Power $power; protected Power $power;
/** /**
* The pattern to get the powers * The Joomla Injector Class.
*
* @var JoomlaPower
* @since 3.2.1
*/
protected JoomlaPower $joomla;
/**
* The power pattern to get the powers
* *
* @var string * @var string
* @since 3.2.0 * @since 3.2.0
**/ **/
protected string $pattern = '/Super_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/'; protected string $powerPattern = '/Super_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
/**
* The Joomla power pattern to get the powers
*
* @var string
* @since 3.2.1
**/
protected string $joomlaPattern = '/Joomla_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
/** /**
* Constructor. * Constructor.
* *
* @param Power $power The Injector Class. * @param Power $power The Injector Class.
* @param JoomlaPower $joomla The Joomla Injector Class.
* *
* @since 3.2.0 * @since 3.2.1
*/ */
public function __construct(Power $power) public function __construct(Power $power, JoomlaPower $joomla)
{ {
$this->power = $power; $this->power = $power;
$this->joomla = $joomla;
} }
/** /**
@ -72,7 +91,9 @@ final class FileInjector
throw new \InvalidArgumentException('Position cannot be negative.'); throw new \InvalidArgumentException('Position cannot be negative.');
} }
$found_super_powers = preg_match($this->pattern, $data); $found_joomla_powers = preg_match($this->joomlaPattern, $data);
$found_super_powers = preg_match($this->powerPattern, $data);
$actual_file = $this->openFileWithLock($file); $actual_file = $this->openFileWithLock($file);
try try
@ -85,6 +106,11 @@ final class FileInjector
$this->processFile($actual_file, $temp_file, $data, $position, $replace); $this->processFile($actual_file, $temp_file, $data, $position, $replace);
if ($found_joomla_powers)
{
$this->injectJoomlaPowers($actual_file);
}
if ($found_super_powers) if ($found_super_powers)
{ {
$this->injectSuperPowers($actual_file); $this->injectSuperPowers($actual_file);
@ -209,5 +235,27 @@ final class FileInjector
fwrite($actual_file, $power_data); fwrite($actual_file, $power_data);
} }
/**
* Injects Joomla powers into the file content, if found, and updates the file.
*
* @param resource $actual_file The file handle of the actual file.
*
* @return void
* @since 3.2.1
*/
private function injectJoomlaPowers($actual_file): void
{
rewind($actual_file);
$power_data = $this->joomla->power(
stream_get_contents($actual_file)
);
ftruncate($actual_file, 0);
rewind($actual_file);
fwrite($actual_file, $power_data);
}
} }

View File

@ -7,23 +7,41 @@
protected Power $power; protected Power $power;
/** /**
* The pattern to get the powers * The Joomla Injector Class.
*
* @var JoomlaPower
* @since 3.2.1
*/
protected JoomlaPower $joomla;
/**
* The power pattern to get the powers
* *
* @var string * @var string
* @since 3.2.0 * @since 3.2.0
**/ **/
protected string $pattern = '/Super_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/'; protected string $powerPattern = '/Super_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
/**
* The Joomla power pattern to get the powers
*
* @var string
* @since 3.2.1
**/
protected string $joomlaPattern = '/Joomla_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
/** /**
* Constructor. * Constructor.
* *
* @param Power $power The Injector Class. * @param Power $power The Injector Class.
* @param JoomlaPower $joomla The Joomla Injector Class.
* *
* @since 3.2.0 * @since 3.2.1
*/ */
public function __construct(Power $power) public function __construct(Power $power, JoomlaPower $joomla)
{ {
$this->power = $power; $this->power = $power;
$this->joomla = $joomla;
} }
/** /**
@ -46,7 +64,9 @@
throw new \InvalidArgumentException('Position cannot be negative.'); throw new \InvalidArgumentException('Position cannot be negative.');
} }
$found_super_powers = preg_match($this->pattern, $data); $found_joomla_powers = preg_match($this->joomlaPattern, $data);
$found_super_powers = preg_match($this->powerPattern, $data);
$actual_file = $this->openFileWithLock($file); $actual_file = $this->openFileWithLock($file);
try try
@ -59,6 +79,11 @@
$this->processFile($actual_file, $temp_file, $data, $position, $replace); $this->processFile($actual_file, $temp_file, $data, $position, $replace);
if ($found_joomla_powers)
{
$this->injectJoomlaPowers($actual_file);
}
if ($found_super_powers) if ($found_super_powers)
{ {
$this->injectSuperPowers($actual_file); $this->injectSuperPowers($actual_file);
@ -183,3 +208,25 @@
fwrite($actual_file, $power_data); fwrite($actual_file, $power_data);
} }
/**
* Injects Joomla powers into the file content, if found, and updates the file.
*
* @param resource $actual_file The file handle of the actual file.
*
* @return void
* @since 3.2.1
*/
private function injectJoomlaPowers($actual_file): void
{
rewind($actual_file);
$power_data = $this->joomla->power(
stream_get_contents($actual_file)
);
ftruncate($actual_file, 0);
rewind($actual_file);
fwrite($actual_file, $power_data);
}

View File

@ -15,6 +15,10 @@
"as": "Power" "as": "Power"
}, },
"use_selection1": { "use_selection1": {
"use": "a6052fe9-0d2b-4b36-b3e7-03b47c483542",
"as": "JoomlaPower"
},
"use_selection2": {
"use": "152c8793-8b75-4715-996a-257b9f65451c", "use": "152c8793-8b75-4715-996a-257b9f65451c",
"as": "default" "as": "default"
} }

View File

@ -13,7 +13,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaThree;
use Joomla\CMS\Filesystem\Folder; use Joomla\CMS\Filesystem\Folder;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\CoreRuleInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\CoreRuleInterface;

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -14,8 +14,8 @@ namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaFour;
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Utilities\JsonHelper; use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HistoryInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HistoryInterface;

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -15,7 +15,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Customcode; use VDM\Joomla\Componentbuilder\Compiler\Customcode;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
/** /**

View File

@ -12,7 +12,7 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -15,7 +15,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaThree;
use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder; use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission; use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -62,7 +62,7 @@ class Placeholder implements ServiceProviderInterface
* *
* @param Container $container The DI container. * @param Container $container The DI container.
* *
* @return Worker * @return Reverse
* @since 3.2.0 * @since 3.2.0
*/ */
public function getPlaceholderReverse(Container $container): Reverse public function getPlaceholderReverse(Container $container): Reverse
@ -72,7 +72,8 @@ class Placeholder implements ServiceProviderInterface
$container->get('Placeholder'), $container->get('Placeholder'),
$container->get('Language'), $container->get('Language'),
$container->get('Language.Extractor'), $container->get('Language.Extractor'),
$container->get('Power.Extractor') $container->get('Power.Extractor'),
$container->get('Joomla.Power.Extractor')
); );
} }
} }

View File

@ -35,7 +35,7 @@
* *
* @param Container $container The DI container. * @param Container $container The DI container.
* *
* @return Worker * @return Reverse
* @since 3.2.0 * @since 3.2.0
*/ */
public function getPlaceholderReverse(Container $container): Reverse public function getPlaceholderReverse(Container $container): Reverse
@ -45,6 +45,7 @@
$container->get('Placeholder'), $container->get('Placeholder'),
$container->get('Language'), $container->get('Language'),
$container->get('Language.Extractor'), $container->get('Language.Extractor'),
$container->get('Power.Extractor') $container->get('Power.Extractor'),
$container->get('Joomla.Power.Extractor')
); );
} }

View File

@ -19,9 +19,10 @@ class Customcode #Gold {
# Placeholder $placeholder # Placeholder $placeholder
# Extractor $extractor # Extractor $extractor
# Power $power # Power $power
# JoomlaPower $joomla
# External $external # External $external
# $db # $db
+ __construct(?Config $config = null, ?Placeholder $placeholder = null, ...) + __construct(Config $config, Placeholder $placeholder, ...)
+ update(string $string, int $debug) : string + update(string $string, int $debug) : string
+ set(string $string, int $debug, ...) : string + set(string $string, int $debug, ...) : string
+ get(?array $ids = null, bool $setLang = true, ...) : bool + get(?array $ids = null, bool $setLang = true, ...) : bool
@ -36,11 +37,12 @@ note right of Customcode::__construct
since: 3.2.0 since: 3.2.0
arguments: arguments:
?Config $config = null Config $config
?Placeholder $placeholder = null Placeholder $placeholder
?Extractor $extractor = null Extractor $extractor
?Power $power = null Power $power
?External $external = null JoomlaPower $joomla
External $external
end note end note
note right of Customcode::update note right of Customcode::update

View File

@ -18,11 +18,12 @@ use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder; use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
use VDM\Joomla\Componentbuilder\Compiler\Language\Extractor; use VDM\Joomla\Componentbuilder\Compiler\Language\Extractor;
use VDM\Joomla\Componentbuilder\Compiler\Power\Extractor as Power; use VDM\Joomla\Componentbuilder\Compiler\Power\Extractor as Power;
use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Extractor as JoomlaPower;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\External; use VDM\Joomla\Componentbuilder\Compiler\Customcode\External;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\GetHelper; use VastDevelopmentMethod\Joomla\Utilities\GetHelper;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\CustomcodeInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\CustomcodeInterface;
@ -111,6 +112,14 @@ class Customcode implements CustomcodeInterface
**/ **/
protected Power $power; protected Power $power;
/**
* Joomla Power Extractor
*
* @var Power
* @since 3.2.0
**/
protected JoomlaPower $joomla;
/** /**
* Compiler Custom Code External * Compiler Custom Code External
* *
@ -129,23 +138,25 @@ class Customcode implements CustomcodeInterface
/** /**
* Constructor. * Constructor.
* *
* @param Config|null $config The compiler config object. * @param Config $config The compiler config object.
* @param Placeholder|null $placeholder The compiler placeholder object. * @param Placeholder $placeholder The compiler placeholder object.
* @param Extractor|null $extractor The compiler language extractor object. * @param Extractor $extractor The compiler language extractor object.
* @param Power|null $power The compiler power extractor object. * @param Power $power The compiler power extractor object.
* @param External|null $external The compiler external custom code object. * @param JoomlaPower $joomla The compiler joomla power extractor object.
* @param \JDatabaseDriver $db The Database Driver object. * @param External $external The compiler external custom code object.
* @param \JDatabaseDriver $db The Database Driver object.
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Config $config = null, ?Placeholder $placeholder = null, public function __construct(Config $config, Placeholder $placeholder,
?Extractor $extractor = null, ?Power $power = null, ?External $external = null) Extractor $extractor, Power $power, JoomlaPower $joomla, External $external)
{ {
$this->config = $config ?: Compiler::_('Config'); $this->config = $config;
$this->placeholder = $placeholder ?: Compiler::_('Placeholder'); $this->placeholder = $placeholder;
$this->extractor = $extractor ?: Compiler::_('Language.Extractor'); $this->extractor = $extractor;
$this->power = $power ?: Compiler::_('Power.Extractor'); $this->power = $power;
$this->external = $external ?: Compiler::_('Customcode.External'); $this->joomla = $joomla;
$this->external = $external;
$this->db = Factory::getDbo(); $this->db = Factory::getDbo();
} }
@ -170,8 +181,9 @@ class Customcode implements CustomcodeInterface
) )
); );
// extract any found super powers // extract any found powers
$this->power->search($string); $this->power->search($string);
$this->joomla->search($string);
} }
// if debug // if debug
if ($debug) if ($debug)

View File

@ -76,6 +76,14 @@
**/ **/
protected Power $power; protected Power $power;
/**
* Joomla Power Extractor
*
* @var Power
* @since 3.2.0
**/
protected JoomlaPower $joomla;
/** /**
* Compiler Custom Code External * Compiler Custom Code External
* *
@ -94,23 +102,25 @@
/** /**
* Constructor. * Constructor.
* *
* @param Config|null $config The compiler config object. * @param Config $config The compiler config object.
* @param Placeholder|null $placeholder The compiler placeholder object. * @param Placeholder $placeholder The compiler placeholder object.
* @param Extractor|null $extractor The compiler language extractor object. * @param Extractor $extractor The compiler language extractor object.
* @param Power|null $power The compiler power extractor object. * @param Power $power The compiler power extractor object.
* @param External|null $external The compiler external custom code object. * @param JoomlaPower $joomla The compiler joomla power extractor object.
* @param \JDatabaseDriver $db The Database Driver object. * @param External $external The compiler external custom code object.
* @param \JDatabaseDriver $db The Database Driver object.
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Config $config = null, ?Placeholder $placeholder = null, public function __construct(Config $config, Placeholder $placeholder,
?Extractor $extractor = null, ?Power $power = null, ?External $external = null) Extractor $extractor, Power $power, JoomlaPower $joomla, External $external)
{ {
$this->config = $config ?: Compiler::_('Config'); $this->config = $config;
$this->placeholder = $placeholder ?: Compiler::_('Placeholder'); $this->placeholder = $placeholder;
$this->extractor = $extractor ?: Compiler::_('Language.Extractor'); $this->extractor = $extractor;
$this->power = $power ?: Compiler::_('Power.Extractor'); $this->power = $power;
$this->external = $external ?: Compiler::_('Customcode.External'); $this->joomla = $joomla;
$this->external = $external;
$this->db = Factory::getDbo(); $this->db = Factory::getDbo();
} }
@ -135,8 +145,9 @@
) )
); );
// extract any found super powers // extract any found powers
$this->power->search($string); $this->power->search($string);
$this->joomla->search($string);
} }
// if debug // if debug
if ($debug) if ($debug)

View File

@ -12,43 +12,47 @@
"system_name": "JCB.Compiler.Customcode", "system_name": "JCB.Compiler.Customcode",
"type": "class", "type": "class",
"use_selection": { "use_selection": {
"use_selection3": { "use_selection0": {
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac", "use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
"as": "Compiler" "as": "Compiler"
}, },
"use_selection4": { "use_selection1": {
"use": "fa4bf18e-301e-42e3-91fb-6e0096c07adc", "use": "fa4bf18e-301e-42e3-91fb-6e0096c07adc",
"as": "default" "as": "default"
}, },
"use_selection5": { "use_selection2": {
"use": "06453ada-e370-49f0-b262-e3f5a8ed0c2c", "use": "06453ada-e370-49f0-b262-e3f5a8ed0c2c",
"as": "default" "as": "default"
}, },
"use_selection6": { "use_selection3": {
"use": "d33b9278-c409-4aec-a047-b72f56712391", "use": "d33b9278-c409-4aec-a047-b72f56712391",
"as": "default" "as": "default"
}, },
"use_selection7": { "use_selection4": {
"use": "eeb03266-22fd-45bb-953a-961bb6be3a54", "use": "eeb03266-22fd-45bb-953a-961bb6be3a54",
"as": "Power" "as": "Power"
}, },
"use_selection8": { "use_selection5": {
"use": "82505f3f-297f-4d75-a581-929ab3e93689",
"as": "JoomlaPower"
},
"use_selection6": {
"use": "1cef0266-99e2-40d8-919f-c2ce32226b0a", "use": "1cef0266-99e2-40d8-919f-c2ce32226b0a",
"as": "default" "as": "default"
}, },
"use_selection9": { "use_selection7": {
"use": "500f3a7f-c16d-4dd4-81b2-2df6776b5388", "use": "500f3a7f-c16d-4dd4-81b2-2df6776b5388",
"as": "default" "as": "default"
}, },
"use_selection1": { "use_selection8": {
"use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef", "use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef",
"as": "default" "as": "default"
}, },
"use_selection0": { "use_selection9": {
"use": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a", "use": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a",
"as": "default" "as": "default"
}, },
"use_selection2": { "use_selection10": {
"use": "db87c339-5bb6-4291-a7ef-2c48ea1b06bc", "use": "db87c339-5bb6-4291-a7ef-2c48ea1b06bc",
"as": "default" "as": "default"
} }

View File

@ -12,9 +12,9 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Abstraction\Registry\Traits\VarExport; use VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits\VarExport;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -25,11 +25,11 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\Paths;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Folder; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Folder;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; use VDM\Joomla\Componentbuilder\Compiler\Utilities\File;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files;
use VDM\Joomla\Utilities\ObjectHelper; use VastDevelopmentMethod\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\JsonHelper; use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\FileHelper; use VastDevelopmentMethod\Joomla\Utilities\FileHelper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;

View File

@ -14,7 +14,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Customcode; use VDM\Joomla\Componentbuilder\Compiler\Customcode;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
/** /**

View File

@ -12,9 +12,9 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Abstraction\Registry\Traits\InArray; use VastDevelopmentMethod\Joomla\Abstraction\Registry\Traits\InArray;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Builder; namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
use VDM\Joomla\Interfaces\Registryinterface; use VastDevelopmentMethod\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\Registry; use VastDevelopmentMethod\Joomla\Abstraction\Registry;
/** /**

View File

@ -14,7 +14,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Builder\MysqlTableSetting; use VDM\Joomla\Componentbuilder\Compiler\Builder\MysqlTableSetting;
use VDM\Joomla\Utilities\StringHelper; use VastDevelopmentMethod\Joomla\Utilities\StringHelper;
/** /**

View File

@ -0,0 +1,69 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# final class Grep (Details)
> namespace: **VDM\Joomla\Componentbuilder\JoomlaPower**
> extends: **ExtendingGrep**
```uml
@startuml
class Grep << (F,LightGreen) >> #RoyalBlue {
# array $order
# remoteIndex(object $path) : void
- searchRemote(string $guid) : ?object
- getRemote(object $path, string $guid) : ?object
- loadRemoteFile(string $owner, string $repo, ...) : mixed
}
note right of Grep::remoteIndex
Load the remote repository index of powers
since: 3.2.0
return: void
end note
note right of Grep::searchRemote
Search for a remote power
since: 3.2.0
return: ?object
end note
note right of Grep::getRemote
Get a remote power
since: 3.2.0
return: ?object
end note
note right of Grep::loadRemoteFile
Load the remote file
since: 3.2.0
return: mixed
arguments:
string $owner
string $repo
string $path
?string $branch
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,165 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Componentbuilder\JoomlaPower;
use Joomla\CMS\Language\Text;
use VastDevelopmentMethod\Joomla\Utilities\FileHelper;
use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
use VastDevelopmentMethod\Joomla\Interfaces\GrepInterface;
use VastDevelopmentMethod\Joomla\Abstraction\Grep as ExtendingGrep;
/**
* Global Resource Empowerment Platform
*
* The Grep feature will try to find your joomla power in the repositories listed in the global
* Options of JCB in the super powers tab, and if it can't be found there will try the global core
* Super powers of JCB. All searches are performed according the the [algorithm:cascading]
* See documentation for more details: https://git.vdm.dev/joomla/super-powers/wiki
*
* @since 3.2.1
*/
final class Grep extends ExtendingGrep implements GrepInterface
{
/**
* Order of global search
*
* @var array
* @since 3.2.1
**/
protected array $order = ['remote'];
/**
* Load the remote repository index of powers
*
* @param object $path The repository path details
*
* @return void
* @since 3.2.0
*/
protected function remoteIndex(object &$path): void
{
if (isset($path->index))
{
return;
}
try
{
$path->index = $this->contents->get($path->owner, $path->repo, 'joomla-powers.json', $path->branch);
}
catch (\Exception $e)
{
$this->app->enqueueMessage(
Text::sprintf('COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path->path, $e->getMessage()),
'Error'
);
$path->index = null;
}
}
/**
* Search for a remote power
*
* @param string $guid The global unique id of the power
*
* @return object|null
* @since 3.2.0
*/
private function searchRemote(string $guid): ?object
{
// we can only search if we have paths
if ($this->path && $this->paths)
{
foreach ($this->paths as $path)
{
// get local index
$this->remoteIndex($path);
if (!empty($path->index) && isset($path->index->{$guid}))
{
return $this->getRemote($path, $guid);
}
}
}
return null;
}
/**
* Get a remote power
*
* @param object $path The repository path details
* @param string $guid The global unique id of the power
*
* @return object|null
* @since 3.2.0
*/
private function getRemote(object $path, string $guid): ?object
{
if (empty($path->index->{$guid}->settings))
{
return null;
}
// get the settings
if (($power = $this->loadRemoteFile($path->owner, $path->repo, $path->index->{$guid}->settings, $path->branch)) !== null &&
isset($power->guid))
{
// set the git details in params
$power->params = (object) [
'git' => [
'owner' => $path->owner,
'repo' => $path->repo,
'branch' => $path->branch
]
];
return $power;
}
return null;
}
/**
* Load the remote file
*
* @param string $owner The repository owner
* @param string $repo The repository name
* @param string $path The repository path to file
* @param string|null $branch The repository branch name
*
* @return mixed
* @since 3.2.0
*/
private function loadRemoteFile(string $owner, string $repo, string $path, ?string $branch)
{
try
{
$data = $this->contents->get($owner, $repo, $path, $branch);
}
catch (\Exception $e)
{
$this->app->enqueueMessage(
Text::sprintf('COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path, $e->getMessage()),
'Error'
);
return null;
}
return $data;
}
}

View File

@ -0,0 +1,130 @@
/**
* Order of global search
*
* @var array
* @since 3.2.1
**/
protected array $order = ['remote'];
/**
* Load the remote repository index of powers
*
* @param object $path The repository path details
*
* @return void
* @since 3.2.0
*/
protected function remoteIndex(object &$path): void
{
if (isset($path->index))
{
return;
}
try
{
$path->index = $this->contents->get($path->owner, $path->repo, 'joomla-powers.json', $path->branch);
}
catch (\Exception $e)
{
$this->app->enqueueMessage(
Text::sprintf('<p>Super Power</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>', $this->contents->api(), $path->path, $e->getMessage()),
'Error'
);
$path->index = null;
}
}
/**
* Search for a remote power
*
* @param string $guid The global unique id of the power
*
* @return object|null
* @since 3.2.0
*/
private function searchRemote(string $guid): ?object
{
// we can only search if we have paths
if ($this->path && $this->paths)
{
foreach ($this->paths as $path)
{
// get local index
$this->remoteIndex($path);
if (!empty($path->index) && isset($path->index->{$guid}))
{
return $this->getRemote($path, $guid);
}
}
}
return null;
}
/**
* Get a remote power
*
* @param object $path The repository path details
* @param string $guid The global unique id of the power
*
* @return object|null
* @since 3.2.0
*/
private function getRemote(object $path, string $guid): ?object
{
if (empty($path->index->{$guid}->settings))
{
return null;
}
// get the settings
if (($power = $this->loadRemoteFile($path->owner, $path->repo, $path->index->{$guid}->settings, $path->branch)) !== null &&
isset($power->guid))
{
// set the git details in params
$power->params = (object) [
'git' => [
'owner' => $path->owner,
'repo' => $path->repo,
'branch' => $path->branch
]
];
return $power;
}
return null;
}
/**
* Load the remote file
*
* @param string $owner The repository owner
* @param string $repo The repository name
* @param string $path The repository path to file
* @param string|null $branch The repository branch name
*
* @return mixed
* @since 3.2.0
*/
private function loadRemoteFile(string $owner, string $repo, string $path, ?string $branch)
{
try
{
$data = $this->contents->get($owner, $repo, $path, $branch);
}
catch (\Exception $e)
{
$this->app->enqueueMessage(
Text::sprintf('<p>File at <b>%s/%s</b> gave the following error!<br />%s</p>', $this->contents->api(), $path, $e->getMessage()),
'Error'
);
return null;
}
return $data;
}

View File

@ -0,0 +1,29 @@
{
"add_head": "1",
"add_licensing_template": "2",
"extends": "1401a167-0ce4-4f4a-afee-2d8b02ed339b",
"guid": "355bf21a-f859-4528-9110-bcd2c6d05ea7",
"implements": [
"c182506a-ab84-439c-b962-1e606b58d545"
],
"load_selection": null,
"name": "Grep",
"power_version": "1.0.0",
"system_name": "JCB.JoomlaPower.Grep",
"type": "final class",
"use_selection": {
"use_selection0": {
"use": "a223b31e-ea1d-4cdf-92ae-5f9becffaff0",
"as": "default"
},
"use_selection1": {
"use": "4b225c51-d293-48e4-b3f6-5136cf5c3f18",
"as": "default"
}
},
"namespace": "VDM\\Joomla\\Componentbuilder.JoomlaPower.Grep",
"description": "Global Resource Empowerment Platform\r\n\r\n The Grep feature will try to find your joomla power in the repositories listed in the global\r\n Options of JCB in the super powers tab, and if it can't be found there will try the global core\r\n Super powers of JCB. All searches are performed according the the [algorithm:cascading]\r\n See documentation for more details: https:\/\/git.vdm.dev\/joomla\/super-powers\/wiki\r\n\r\n@since 3.2.1",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
"head": "use Joomla\\CMS\\Language\\Text;",
"composer": ""
}

View File

@ -0,0 +1,184 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# final class JoomlaPower (Details)
> namespace: **VDM\Joomla\Componentbuilder\Compiler**
```uml
@startuml
class JoomlaPower << (F,LightGreen) >> #RoyalBlue {
+ array $active
+ array $namespace
+ array $superpowers
# string $fixUrl
# array $state
# array $retry
# Config $config
# Placeholder $placeholder
# Customcode $customcode
# Gui $gui
# Superpower $superpower
# $db
# $app
+ __construct(Config $config, Placeholder $placeholder, ...)
+ load(array $guids) : void
+ get(string $guid, int $build) : ?object
- set(string $guid) : bool
- convertSettingsToArray(string $settingsJson) : ?array
- setTargetVersion(string $guid, ?array $settings) : bool
- setNamespaceAndType(string $guid, array $namespace) : void
- setClassAndNamespace(string $guid) : void
- handlePowerNotFound(string $guid) : bool
- extractLastNameFromNamespace(string $namespace) : ?string
- removeLastNameFromNamespace(string $namespace) : string
- isPowerSet(string $guid) : bool
- isGuidValid(string $guid) : bool
- getPowerData(string $guid) : ?object
- getCleanNamespace(string $namespace) : string
- getUseNamespace(string $namespace, string $as = 'default') : string
- setSuperPowers(string $guid) : void
}
note right of JoomlaPower::__construct
Constructor.
since: 3.2.1
arguments:
Config $config
Placeholder $placeholder
Customcode $customcode
Gui $gui
Superpower $superpower
end note
note left of JoomlaPower::load
load all the powers linked to this component
since: 3.2.1
return: void
end note
note right of JoomlaPower::get
Get a power
since: 3.2.1
return: ?object
end note
note left of JoomlaPower::set
Set a Joomla power
since: 3.2.1
return: bool
end note
note right of JoomlaPower::convertSettingsToArray
Convert settings JSON string to array
since: 3.2.2
return: ?array
end note
note left of JoomlaPower::setTargetVersion
Set the target version based on Joomla version and settings
since: 3.2.2
return: bool
end note
note right of JoomlaPower::setNamespaceAndType
Set namespace and type for the active power
since: 3.2.2
return: void
end note
note left of JoomlaPower::setClassAndNamespace
Set class name and namespace for the active power
since: 3.2.2
return: void
end note
note right of JoomlaPower::handlePowerNotFound
Handle power not found scenario
since: 3.2.2
return: bool
end note
note left of JoomlaPower::extractLastNameFromNamespace
Extracts the last part of a namespace string, which is typically the class name.
since: 3.2.1
return: ?string
end note
note right of JoomlaPower::removeLastNameFromNamespace
Removes the last name from the namespace.
since: 3.2.1
return: string
end note
note left of JoomlaPower::isPowerSet
Check if the power is already set
since: 3.2.1
return: bool
end note
note right of JoomlaPower::isGuidValid
Validate the GUID
since: 3.2.1
return: bool
end note
note left of JoomlaPower::getPowerData
Get the power data from the database
since: 3.2.1
return: ?object
end note
note right of JoomlaPower::getCleanNamespace
Get Clean Namespace without use or ; as part of the name space
since: 3.2.1
return: string
end note
note left of JoomlaPower::getUseNamespace
Get [use Namespace\Class;]
since: 3.2.1
return: string
end note
note right of JoomlaPower::setSuperPowers
Set the super powers of this power
since: 3.2.1
return: void
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,542 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Componentbuilder\Compiler;
use Joomla\CMS\Factory;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
use VDM\Joomla\Componentbuilder\Compiler\Customcode;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;
use VDM\Joomla\Componentbuilder\JoomlaPower\Super as SuperPower;
use VastDevelopmentMethod\Joomla\Utilities\ArrayHelper;
use VastDevelopmentMethod\Joomla\Utilities\JsonHelper;
use VastDevelopmentMethod\Joomla\Utilities\GuidHelper;
use VastDevelopmentMethod\Joomla\Utilities\String\NamespaceHelper;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\PowerInterface;
/**
* Joomla Power
*
* @since 3.2.1
*/
final class JoomlaPower implements PowerInterface
{
/**
* All loaded powers
*
* @var array
* @since 3.2.1
**/
public array $active = [];
/**
* All power namespaces
*
* @var array
* @since 3.2.1
**/
public array $namespace = [];
/**
* All super powers of this build
*
* @var array
* @since 3.2.1
**/
public array $superpowers = [];
/**
* Old super powers found in the local repos
*
* @var array
* @since 3.2.1
**/
public array $old_superpowers = [];
/**
* The url to the power, if there is an error.
*
* @var string
* @since 3.2.1
**/
protected string $fixUrl;
/**
* The state of all loaded powers
*
* @var array
* @since 3.2.1
**/
protected array $state = [];
/**
* The state of retry to loaded powers
*
* @var array
* @since 3.2.1
**/
protected array $retry = [];
/**
* Compiler Config
*
* @var Config
* @since 3.2.1
**/
protected Config $config;
/**
* Compiler Placeholder
*
* @var Placeholder
* @since 3.2.1
**/
protected Placeholder $placeholder;
/**
* Compiler Customcode
*
* @var Customcode
* @since 3.2.1
**/
protected Customcode $customcode;
/**
* Compiler Customcode in Gui
*
* @var Gui
* @since 3.2.1
**/
protected Gui $gui;
/**
* The JCB Superpower class
*
* @var Superpower
* @since 3.2.1
**/
protected Superpower $superpower;
/**
* Database object to query local DB
*
* @since 3.2.1
**/
protected $db;
/**
* Database object to query local DB
*
* @since 3.2.1
**/
protected $app;
/**
* Constructor.
*
* @param Config $config The compiler config object.
* @param Placeholder $placeholder The compiler placeholder object.
* @param Customcode $customcode The compiler customcode object.
* @param Gui $gui The compiler customcode gui object.
* @param Superpower $superpower The JCB superpower object.
*
* @throws \Exception
* @since 3.2.1
*/
public function __construct(Config $config, Placeholder $placeholder,
Customcode $customcode, Gui $gui, Superpower $superpower)
{
$this->config = $config;
$this->placeholder = $placeholder;
$this->customcode = $customcode;
$this->gui = $gui;
$this->superpower = $superpower;
$this->db = Factory::getDbo();
$this->app = Factory::getApplication();
}
/**
* load all the powers linked to this component
*
* @param array $guids The global unique ids of the linked powers
*
* @return void
* @since 3.2.1
*/
public function load(array $guids)
{
if (ArrayHelper::check($guids))
{
foreach ($guids as $guid => $build)
{
$this->get($guid, $build);
}
}
}
/**
* Get a power
*
* @param string $guid The global unique id of the power
* @param int $build Force build switch (to override global switch)
*
* @return object|null
* @since 3.2.1
*/
public function get(string $guid, int $build = 0): ?object
{
if (($this->config->get('add_power', true) || $build == 1) && $this->set($guid))
{
return $this->active[$guid];
}
return null;
}
/**
* Set a Joomla power
*
* @param string $guid The global unique id of the power
*
* @return bool true on successful setting of a power
* @since 3.2.1
*/
private function set(string $guid): bool
{
// Check if power is already set
if ($this->isPowerSet($guid))
{
return $this->state[$guid];
}
// Validate GUID
if (!$this->isGuidValid($guid))
{
$this->state[$guid] = false;
return false;
}
// Get the power data
$this->active[$guid] = $this->getPowerData($guid);
// Validate power data object
if ($this->active[$guid] === null)
{
return $this->handlePowerNotFound($guid);
}
// Prevent recursive loading of the same power
$this->state[$guid] = true;
// Convert settings to array if valid JSON
$settings = $this->convertSettingsToArray(
$this->active[$guid]->settings
);
// Set the target version if settings array is valid
if (!$this->setTargetVersion($guid, $settings))
{
return false;
}
// Set class name and namespace
$this->setClassAndNamespace($guid);
return true;
}
/**
* Convert settings JSON string to array
*
* @param string $settingsJson
*
* @return array|null
* @since 3.2.2
*/
private function convertSettingsToArray(string $settingsJson): ?array
{
if (JsonHelper::check($settingsJson))
{
return json_decode($settingsJson, true);
}
return null;
}
/**
* Set the target version based on Joomla version and settings
*
* @param string $guid
* @param array|null $settings
*
* @return bool
* @since 3.2.2
*/
private function setTargetVersion(string $guid, ?array $settings): bool
{
$joomla_version = $this->config->joomla_version;
if (!$joomla_version || !ArrayHelper::check($settings))
{
return false;
}
$joomla_version_target = null;
$target_found = false;
foreach ($settings as $namespace)
{
// Set default values for all versions
if ($namespace['joomla_version'] == 0)
{
$this->setNamespaceAndType($guid, $namespace);
$target_found = true;
}
// Check for direct target version
if ($joomla_version == $namespace['joomla_version'])
{
$joomla_version_target = $namespace;
break;
}
}
if ($joomla_version_target)
{
$this->setNamespaceAndType($guid, $joomla_version_target);
$target_found = true;
}
if (!$target_found)
{
$this->app->enqueueMessage(
Text::sprintf('COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_WAS_FOUND_BUT_MISSING_A_NAMESPACE_VALUE_FOR_JOOMLA_SP', $guid, $joomla_version),
'Error'
);
$this->state[$guid] = false;
return false;
}
return true;
}
/**
* Set namespace and type for the active power
*
* @param string $guid
* @param array $namespace
*
* @since 3.2.2
*/
private function setNamespaceAndType(string $guid, array $namespace): void
{
$this->active[$guid]->namespace = $namespace['namespace'];
$this->active[$guid]->type = $namespace['type'] ?? 'class';
}
/**
* Set class name and namespace for the active power
*
* @param string $guid
*
* @since 3.2.2
*/
private function setClassAndNamespace(string $guid): void
{
$this->active[$guid]->class_name = $this->extractLastNameFromNamespace(
$this->active[$guid]->namespace
);
$this->active[$guid]->_namespace = $this->removeLastNameFromNamespace(
$this->active[$guid]->namespace
);
}
/**
* Handle power not found scenario
*
* @param string $guid
*
* @return bool
* @since 3.2.2
*/
private function handlePowerNotFound(string $guid): bool
{
if (empty($this->retry[$guid]) && $this->superpower->load($guid, ['remote', 'local']))
{
// Retry loading the power
unset($this->state[$guid]);
unset($this->active[$guid]);
$this->retry[$guid] = true;
return $this->set($guid);
}
$this->app->enqueueMessage(
Text::sprintf('COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP', $guid),
'Error'
);
$this->state[$guid] = false;
return false;
}
/**
* Extracts the last part of a namespace string, which is typically the class name.
*
* @param string $namespace The namespace string to extract from.
*
* @return string|null The extracted class name.
* @since 3.2.1
*/
private function extractLastNameFromNamespace(string $namespace): ?string
{
$parts = explode('\\', $namespace);
$result = end($parts);
// Remove '\\' from the beginning and end of the resulting string
$result = trim($result, '\\');
// If the resulting string is empty, return null
return empty($result) ? null : $result;
}
/**
* Removes the last name from the namespace.
*
* @param string $namespace The namespace
*
* @return string The namespace shortened
* @since 3.2.1
*/
private function removeLastNameFromNamespace(string $namespace): string
{
// Remove '\\' from the beginning and end of the resulting string
$namespace = trim($namespace, '\\');
$parts = explode('\\', $namespace);
// Remove the last part (the class name)
array_pop($parts);
// Reassemble the namespace without the class name
return implode('\\', $parts);
}
/**
* Check if the power is already set
*
* @param string $guid The global unique id of the power
*
* @return bool true if the power is already set
* @since 3.2.1
*/
private function isPowerSet(string $guid): bool
{
return isset($this->state[$guid]);
}
/**
* Validate the GUID
*
* @param string $guid The global unique id of the power
*
* @return bool true if the GUID is valid
* @since 3.2.1
*/
private function isGuidValid(string $guid): bool
{
return GuidHelper::valid($guid);
}
/**
* Get the power data from the database
*
* @param string $guid The global unique id of the power
*
* @return object|null The power data
* @since 3.2.1
*/
private function getPowerData(string $guid): ?object
{
$query = $this->db->getQuery(true);
$query->select('a.*');
$query->from('#__componentbuilder_joomla_power AS a');
$query->where($this->db->quoteName('a.guid') . ' = ' . $this->db->quote($guid));
$this->db->setQuery($query);
$this->db->execute();
if ($this->db->getNumRows())
{
return $this->db->loadObject();
}
return null;
}
/**
* Get Clean Namespace without use or ; as part of the name space
*
* @param string $namespace The actual name space
* @param bool $removeNumbers The switch to remove numbers
*
* @return string
* @since 3.2.1
*/
private function getCleanNamespace(string $namespace): string
{
// trim possible (use) or (;) or (starting or ending \) added to the namespace
return NamespaceHelper::safe(str_replace(['use ', ';'], '', $namespace));
}
/**
* Get [use Namespace\Class;]
*
* @param string $namespace The actual name space
* @param string $as The use as name (default is none)
*
* @return string
* @since 3.2.1
*/
private function getUseNamespace(string $namespace, string $as = 'default'): string
{
// check if it has an AS option
if ($as !== 'default')
{
return 'use ' . $namespace . ' as ' . $as . ';';
}
return 'use ' . $namespace . ';';
}
/**
* Set the super powers of this power
*
* @param string $guid The global unique id of the power
*
* @return void
* @since 3.2.1
*/
private function setSuperPowers(string $guid): void
{
// soon
}
}

View File

@ -0,0 +1,504 @@
/**
* All loaded powers
*
* @var array
* @since 3.2.1
**/
public array $active = [];
/**
* All power namespaces
*
* @var array
* @since 3.2.1
**/
public array $namespace = [];
/**
* All super powers of this build
*
* @var array
* @since 3.2.1
**/
public array $superpowers = [];
/**
* Old super powers found in the local repos
*
* @var array
* @since 3.2.1
**/
public array $old_superpowers = [];
/**
* The url to the power, if there is an error.
*
* @var string
* @since 3.2.1
**/
protected string $fixUrl;
/**
* The state of all loaded powers
*
* @var array
* @since 3.2.1
**/
protected array $state = [];
/**
* The state of retry to loaded powers
*
* @var array
* @since 3.2.1
**/
protected array $retry = [];
/**
* Compiler Config
*
* @var Config
* @since 3.2.1
**/
protected Config $config;
/**
* Compiler Placeholder
*
* @var Placeholder
* @since 3.2.1
**/
protected Placeholder $placeholder;
/**
* Compiler Customcode
*
* @var Customcode
* @since 3.2.1
**/
protected Customcode $customcode;
/**
* Compiler Customcode in Gui
*
* @var Gui
* @since 3.2.1
**/
protected Gui $gui;
/**
* The JCB Superpower class
*
* @var Superpower
* @since 3.2.1
**/
protected Superpower $superpower;
/**
* Database object to query local DB
*
* @since 3.2.1
**/
protected $db;
/**
* Database object to query local DB
*
* @since 3.2.1
**/
protected $app;
/**
* Constructor.
*
* @param Config $config The compiler config object.
* @param Placeholder $placeholder The compiler placeholder object.
* @param Customcode $customcode The compiler customcode object.
* @param Gui $gui The compiler customcode gui object.
* @param Superpower $superpower The JCB superpower object.
*
* @throws \Exception
* @since 3.2.1
*/
public function __construct(Config $config, Placeholder $placeholder,
Customcode $customcode, Gui $gui, Superpower $superpower)
{
$this->config = $config;
$this->placeholder = $placeholder;
$this->customcode = $customcode;
$this->gui = $gui;
$this->superpower = $superpower;
$this->db = Factory::getDbo();
$this->app = Factory::getApplication();
}
/**
* load all the powers linked to this component
*
* @param array $guids The global unique ids of the linked powers
*
* @return void
* @since 3.2.1
*/
public function load(array $guids)
{
if (ArrayHelper::check($guids))
{
foreach ($guids as $guid => $build)
{
$this->get($guid, $build);
}
}
}
/**
* Get a power
*
* @param string $guid The global unique id of the power
* @param int $build Force build switch (to override global switch)
*
* @return object|null
* @since 3.2.1
*/
public function get(string $guid, int $build = 0): ?object
{
if (($this->config->get('add_power', true) || $build == 1) && $this->set($guid))
{
return $this->active[$guid];
}
return null;
}
/**
* Set a Joomla power
*
* @param string $guid The global unique id of the power
*
* @return bool true on successful setting of a power
* @since 3.2.1
*/
private function set(string $guid): bool
{
// Check if power is already set
if ($this->isPowerSet($guid))
{
return $this->state[$guid];
}
// Validate GUID
if (!$this->isGuidValid($guid))
{
$this->state[$guid] = false;
return false;
}
// Get the power data
$this->active[$guid] = $this->getPowerData($guid);
// Validate power data object
if ($this->active[$guid] === null)
{
return $this->handlePowerNotFound($guid);
}
// Prevent recursive loading of the same power
$this->state[$guid] = true;
// Convert settings to array if valid JSON
$settings = $this->convertSettingsToArray(
$this->active[$guid]->settings
);
// Set the target version if settings array is valid
if (!$this->setTargetVersion($guid, $settings))
{
return false;
}
// Set class name and namespace
$this->setClassAndNamespace($guid);
return true;
}
/**
* Convert settings JSON string to array
*
* @param string $settingsJson
*
* @return array|null
* @since 3.2.2
*/
private function convertSettingsToArray(string $settingsJson): ?array
{
if (JsonHelper::check($settingsJson))
{
return json_decode($settingsJson, true);
}
return null;
}
/**
* Set the target version based on Joomla version and settings
*
* @param string $guid
* @param array|null $settings
*
* @return bool
* @since 3.2.2
*/
private function setTargetVersion(string $guid, ?array $settings): bool
{
$joomla_version = $this->config->joomla_version;
if (!$joomla_version || !ArrayHelper::check($settings))
{
return false;
}
$joomla_version_target = null;
$target_found = false;
foreach ($settings as $namespace)
{
// Set default values for all versions
if ($namespace['joomla_version'] == 0)
{
$this->setNamespaceAndType($guid, $namespace);
$target_found = true;
}
// Check for direct target version
if ($joomla_version == $namespace['joomla_version'])
{
$joomla_version_target = $namespace;
break;
}
}
if ($joomla_version_target)
{
$this->setNamespaceAndType($guid, $joomla_version_target);
$target_found = true;
}
if (!$target_found)
{
$this->app->enqueueMessage(
Text::sprintf('<p>Joomla Power <b>guid:%s</b> was found, but missing a namespace value for Joomla %s!</p>', $guid, $joomla_version),
'Error'
);
$this->state[$guid] = false;
return false;
}
return true;
}
/**
* Set namespace and type for the active power
*
* @param string $guid
* @param array $namespace
*
* @since 3.2.2
*/
private function setNamespaceAndType(string $guid, array $namespace): void
{
$this->active[$guid]->namespace = $namespace['namespace'];
$this->active[$guid]->type = $namespace['type'] ?? 'class';
}
/**
* Set class name and namespace for the active power
*
* @param string $guid
*
* @since 3.2.2
*/
private function setClassAndNamespace(string $guid): void
{
$this->active[$guid]->class_name = $this->extractLastNameFromNamespace(
$this->active[$guid]->namespace
);
$this->active[$guid]->_namespace = $this->removeLastNameFromNamespace(
$this->active[$guid]->namespace
);
}
/**
* Handle power not found scenario
*
* @param string $guid
*
* @return bool
* @since 3.2.2
*/
private function handlePowerNotFound(string $guid): bool
{
if (empty($this->retry[$guid]) && $this->superpower->load($guid, ['remote', 'local']))
{
// Retry loading the power
unset($this->state[$guid]);
unset($this->active[$guid]);
$this->retry[$guid] = true;
return $this->set($guid);
}
$this->app->enqueueMessage(
Text::sprintf('<p>Joomla Power <b>guid:%s</b> not found!</p>', $guid),
'Error'
);
$this->state[$guid] = false;
return false;
}
/**
* Extracts the last part of a namespace string, which is typically the class name.
*
* @param string $namespace The namespace string to extract from.
*
* @return string|null The extracted class name.
* @since 3.2.1
*/
private function extractLastNameFromNamespace(string $namespace): ?string
{
$parts = explode('\\', $namespace);
$result = end($parts);
// Remove '\\' from the beginning and end of the resulting string
$result = trim($result, '\\');
// If the resulting string is empty, return null
return empty($result) ? null : $result;
}
/**
* Removes the last name from the namespace.
*
* @param string $namespace The namespace
*
* @return string The namespace shortened
* @since 3.2.1
*/
private function removeLastNameFromNamespace(string $namespace): string
{
// Remove '\\' from the beginning and end of the resulting string
$namespace = trim($namespace, '\\');
$parts = explode('\\', $namespace);
// Remove the last part (the class name)
array_pop($parts);
// Reassemble the namespace without the class name
return implode('\\', $parts);
}
/**
* Check if the power is already set
*
* @param string $guid The global unique id of the power
*
* @return bool true if the power is already set
* @since 3.2.1
*/
private function isPowerSet(string $guid): bool
{
return isset($this->state[$guid]);
}
/**
* Validate the GUID
*
* @param string $guid The global unique id of the power
*
* @return bool true if the GUID is valid
* @since 3.2.1
*/
private function isGuidValid(string $guid): bool
{
return GuidHelper::valid($guid);
}
/**
* Get the power data from the database
*
* @param string $guid The global unique id of the power
*
* @return object|null The power data
* @since 3.2.1
*/
private function getPowerData(string $guid): ?object
{
$query = $this->db->getQuery(true);
$query->select('a.*');
$query->from('#__componentbuilder_joomla_power AS a');
$query->where($this->db->quoteName('a.guid') . ' = ' . $this->db->quote($guid));
$this->db->setQuery($query);
$this->db->execute();
if ($this->db->getNumRows())
{
return $this->db->loadObject();
}
return null;
}
/**
* Get Clean Namespace without use or ; as part of the name space
*
* @param string $namespace The actual name space
* @param bool $removeNumbers The switch to remove numbers
*
* @return string
* @since 3.2.1
*/
private function getCleanNamespace(string $namespace): string
{
// trim possible (use) or (;) or (starting or ending \) added to the namespace
return NamespaceHelper::safe(str_replace(['use ', ';'], '', $namespace));
}
/**
* Get [use Namespace\Class;]
*
* @param string $namespace The actual name space
* @param string $as The use as name (default is none)
*
* @return string
* @since 3.2.1
*/
private function getUseNamespace(string $namespace, string $as = 'default'): string
{
// check if it has an AS option
if ($as !== 'default')
{
return 'use ' . $namespace . ' as ' . $as . ';';
}
return 'use ' . $namespace . ';';
}
/**
* Set the super powers of this power
*
* @param string $guid The global unique id of the power
*
* @return void
* @since 3.2.1
*/
private function setSuperPowers(string $guid): void
{
// soon
}

View File

@ -0,0 +1,57 @@
{
"add_head": "1",
"add_licensing_template": "2",
"extends": "0",
"guid": "3730a000-ab64-477d-8b0f-70eaf71b517a",
"implements": [
"1133c2d7-ba7e-4c95-8cde-01f084d04682"
],
"load_selection": null,
"name": "JoomlaPower",
"power_version": "1.0.0",
"system_name": "JCB.Compiler.JoomlaPower",
"type": "final class",
"use_selection": {
"use_selection0": {
"use": "fa4bf18e-301e-42e3-91fb-6e0096c07adc",
"as": "default"
},
"use_selection1": {
"use": "06453ada-e370-49f0-b262-e3f5a8ed0c2c",
"as": "default"
},
"use_selection2": {
"use": "313b43c4-98c3-4f62-9177-2d73ec8eba31",
"as": "default"
},
"use_selection3": {
"use": "1bd48df2-4f7e-4581-9fe9-4b54e59105e3",
"as": "default"
},
"use_selection4": {
"use": "39a75870-a7f7-45fd-937d-5ba97b85b8ad",
"as": "SuperPower"
},
"use_selection5": {
"use": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a",
"as": "default"
},
"use_selection6": {
"use": "4b225c51-d293-48e4-b3f6-5136cf5c3f18",
"as": "default"
},
"use_selection7": {
"use": "9c513baf-b279-43fd-ae29-a585c8cbc4f0",
"as": "default"
},
"use_selection8": {
"use": "ce8cf834-6bac-44fb-941c-861f7e046cc0",
"as": "default"
}
},
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.JoomlaPower",
"description": "Joomla Power\r\n\r\n@since 3.2.1",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
"head": "use Joomla\\CMS\\Factory;\r\nuse Joomla\\CMS\\Application\\CMSApplication;\r\nuse Joomla\\CMS\\Language\\Text;",
"composer": ""
}

View File

@ -6,13 +6,14 @@
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ ██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
``` ```
# final class Insert (Details) # class Insert (Details)
> namespace: **VDM\Joomla\Componentbuilder\Power\Database** > namespace: **VDM\Joomla\Componentbuilder\Power\Database**
```uml ```uml
@startuml @startuml
class Insert << (F,LightGreen) >> #RoyalBlue { class Insert #Gold {
# Model $model # Model $model
# Database $database # Database $database
# string $table
+ __construct(Model $model, Database $database) + __construct(Model $model, Database $database)
+ value(mixed $value, string $field, ...) : bool + value(mixed $value, string $field, ...) : bool
+ row(array $item) : bool + row(array $item) : bool

View File

@ -12,8 +12,9 @@
namespace VDM\Joomla\Componentbuilder\Power\Database; namespace VDM\Joomla\Componentbuilder\Power\Database;
use VDM\Joomla\Componentbuilder\Power\Model\Upsert as Model; use VastDevelopmentMethod\Joomla\Interfaces\ModelInterface as Model;
use VDM\Joomla\Database\Insert as Database; use VastDevelopmentMethod\Joomla\Database\Insert as Database;
use VDM\Joomla\Componentbuilder\Interfaces\Database\InsertInterface;
/** /**
@ -21,7 +22,7 @@ use VDM\Joomla\Database\Insert as Database;
* *
* @since 3.2.0 * @since 3.2.0
*/ */
final class Insert class Insert implements InsertInterface
{ {
/** /**
* Model * Model
@ -39,6 +40,14 @@ final class Insert
*/ */
protected Database $database; protected Database $database;
/**
* Table Name
*
* @var string
* @since 3.2.1
*/
protected string $table = 'power';
/** /**
* Constructor * Constructor
* *
@ -88,10 +97,10 @@ final class Insert
public function row(array $item): bool public function row(array $item): bool
{ {
// check if object could be modelled // check if object could be modelled
if (($item = $this->model->row($item, 'power')) !== null) if (($item = $this->model->row($item, $this->table)) !== null)
{ {
// Insert the column of this table // Insert the column of this table
return $this->database->row($item, 'power'); return $this->database->row($item, $this->table);
} }
return false; return false;
} }
@ -108,10 +117,10 @@ final class Insert
public function rows(?array $items): bool public function rows(?array $items): bool
{ {
// check if object could be modelled // check if object could be modelled
if (($items = $this->model->rows($items, 'power')) !== null) if (($items = $this->model->rows($items, $this->table)) !== null)
{ {
// Insert the column of this table // Insert the column of this table
return $this->database->rows($items, 'power'); return $this->database->rows($items, $this->table);
} }
return false; return false;
} }
@ -128,10 +137,10 @@ final class Insert
public function item(object $item): bool public function item(object $item): bool
{ {
// check if object could be modelled // check if object could be modelled
if (($item = $this->model->item($item, 'power')) !== null) if (($item = $this->model->item($item, $this->table)) !== null)
{ {
// Insert the column of this table // Insert the column of this table
return $this->database->item($item, 'power'); return $this->database->item($item, $this->table);
} }
return false; return false;
} }
@ -148,13 +157,12 @@ final class Insert
public function items(?array $items): bool public function items(?array $items): bool
{ {
// check if object could be modelled // check if object could be modelled
if (($items = $this->model->items($items, 'power')) !== null) if (($items = $this->model->items($items, $this->table)) !== null)
{ {
// Update the column of this table using guid as the primary key. // Update the column of this table using guid as the primary key.
return $this->database->items($items, 'power'); return $this->database->items($items, $this->table);
} }
return false; return false;
} }
} }

View File

@ -14,6 +14,14 @@
*/ */
protected Database $database; protected Database $database;
/**
* Table Name
*
* @var string
* @since 3.2.1
*/
protected string $table = 'power';
/** /**
* Constructor * Constructor
* *
@ -63,10 +71,10 @@
public function row(array $item): bool public function row(array $item): bool
{ {
// check if object could be modelled // check if object could be modelled
if (($item = $this->model->row($item, 'power')) !== null) if (($item = $this->model->row($item, $this->table)) !== null)
{ {
// Insert the column of this table // Insert the column of this table
return $this->database->row($item, 'power'); return $this->database->row($item, $this->table);
} }
return false; return false;
} }
@ -83,10 +91,10 @@
public function rows(?array $items): bool public function rows(?array $items): bool
{ {
// check if object could be modelled // check if object could be modelled
if (($items = $this->model->rows($items, 'power')) !== null) if (($items = $this->model->rows($items, $this->table)) !== null)
{ {
// Insert the column of this table // Insert the column of this table
return $this->database->rows($items, 'power'); return $this->database->rows($items, $this->table);
} }
return false; return false;
} }
@ -103,10 +111,10 @@
public function item(object $item): bool public function item(object $item): bool
{ {
// check if object could be modelled // check if object could be modelled
if (($item = $this->model->item($item, 'power')) !== null) if (($item = $this->model->item($item, $this->table)) !== null)
{ {
// Insert the column of this table // Insert the column of this table
return $this->database->item($item, 'power'); return $this->database->item($item, $this->table);
} }
return false; return false;
} }
@ -123,10 +131,10 @@
public function items(?array $items): bool public function items(?array $items): bool
{ {
// check if object could be modelled // check if object could be modelled
if (($items = $this->model->items($items, 'power')) !== null) if (($items = $this->model->items($items, $this->table)) !== null)
{ {
// Update the column of this table using guid as the primary key. // Update the column of this table using guid as the primary key.
return $this->database->items($items, 'power'); return $this->database->items($items, $this->table);
} }
return false; return false;
} }

View File

@ -3,15 +3,17 @@
"add_licensing_template": "2", "add_licensing_template": "2",
"extends": "0", "extends": "0",
"guid": "380bb7a3-cdcc-4336-a699-5070cbf521a5", "guid": "380bb7a3-cdcc-4336-a699-5070cbf521a5",
"implements": null, "implements": [
"95c02df3-fe0a-405b-b506-b7a5b8605b66"
],
"load_selection": null, "load_selection": null,
"name": "Insert", "name": "Insert",
"power_version": "1.0.0", "power_version": "1.0.0",
"system_name": "JCB.Power.Database.Insert", "system_name": "JCB.Power.Database.Insert",
"type": "final class", "type": "class",
"use_selection": { "use_selection": {
"use_selection0": { "use_selection0": {
"use": "7c1fb50f-8fb1-4627-8705-6fedf7182ca5", "use": "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff",
"as": "Model" "as": "Model"
}, },
"use_selection1": { "use_selection1": {

View File

@ -0,0 +1,77 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# class JoomlaPower (Details)
> namespace: **VDM\Joomla\Componentbuilder\JoomlaPower\Service**
```uml
@startuml
class JoomlaPower #Gold {
+ register(Container $container) : void
+ getConfig(Container $container) : Config
+ getTable(Container $container) : Table
+ getGrep(Container $container) : Grep
+ getSuperpower(Container $container) : Superpower
+ getParser(Container $container) : Parser
}
note right of JoomlaPower::register
Registers the service provider with a DI container.
since: 3.2.0
return: void
end note
note right of JoomlaPower::getConfig
Get The Config Class.
since: 3.2.0
return: Config
end note
note right of JoomlaPower::getTable
Get The Table Class.
since: 3.2.0
return: Table
end note
note right of JoomlaPower::getGrep
Get The Grep Class.
since: 3.2.0
return: Grep
end note
note right of JoomlaPower::getSuperpower
Get The Super Class.
since: 3.2.0
return: Superpower
end note
note right of JoomlaPower::getParser
Get The Parser Class.
since: 3.2.0
return: Parser
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -0,0 +1,130 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Componentbuilder\JoomlaPower\Service;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use VDM\Joomla\Componentbuilder\JoomlaPower\Config;
use VastDevelopmentMethod\Joomla\Componentbuilder\Table;
use VDM\Joomla\Componentbuilder\JoomlaPower\Grep;
use VDM\Joomla\Componentbuilder\JoomlaPower\Super as Superpower;
use VDM\Joomla\Componentbuilder\Compiler\Power\Parser;
/**
* Joomla Power Service Provider
*
* @since 3.2.1
*/
class JoomlaPower 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(Config::class, 'Config')
->share('Config', [$this, 'getConfig'], true);
$container->alias(Table::class, 'Table')
->share('Table', [$this, 'getTable'], true);
$container->alias(Grep::class, 'Joomla.Power.Grep')
->share('Joomla.Power.Grep', [$this, 'getGrep'], true);
$container->alias(Superpower::class, 'Joomlapower')
->share('Joomlapower', [$this, 'getSuperpower'], true);
$container->alias(Parser::class, 'Power.Parser')
->share('Power.Parser', [$this, 'getParser'], true);
}
/**
* Get The Config Class.
*
* @param Container $container The DI container.
*
* @return Config
* @since 3.2.0
*/
public function getConfig(Container $container): Config
{
return new Config();
}
/**
* Get The Table Class.
*
* @param Container $container The DI container.
*
* @return Table
* @since 3.2.0
*/
public function getTable(Container $container): Table
{
return new Table();
}
/**
* Get The Grep Class.
*
* @param Container $container The DI container.
*
* @return Grep
* @since 3.2.0
*/
public function getGrep(Container $container): Grep
{
return new Grep(
$container->get('Config')->local_joomla_powers_repository_path,
$container->get('Config')->approved_joomla_paths,
$container->get('Gitea.Repository.Contents')
);
}
/**
* Get The Super Class.
*
* @param Container $container The DI container.
*
* @return Superpower
* @since 3.2.0
*/
public function getSuperpower(Container $container): Superpower
{
return new Superpower(
$container->get('Joomla.Power.Grep'),
$container->get('Joomla.Power.Database.Insert'),
$container->get('Joomla.Power.Database.Update')
);
}
/**
* Get The Parser Class.
*
* @param Container $container The DI container.
*
* @return Parser
* @since 3.2.0
*/
public function getParser(Container $container): Parser
{
return new Parser();
}
}

View File

@ -0,0 +1,98 @@
/**
* 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(Config::class, 'Config')
->share('Config', [$this, 'getConfig'], true);
$container->alias(Table::class, 'Table')
->share('Table', [$this, 'getTable'], true);
$container->alias(Grep::class, 'Joomla.Power.Grep')
->share('Joomla.Power.Grep', [$this, 'getGrep'], true);
$container->alias(Superpower::class, 'Joomlapower')
->share('Joomlapower', [$this, 'getSuperpower'], true);
$container->alias(Parser::class, 'Power.Parser')
->share('Power.Parser', [$this, 'getParser'], true);
}
/**
* Get The Config Class.
*
* @param Container $container The DI container.
*
* @return Config
* @since 3.2.0
*/
public function getConfig(Container $container): Config
{
return new Config();
}
/**
* Get The Table Class.
*
* @param Container $container The DI container.
*
* @return Table
* @since 3.2.0
*/
public function getTable(Container $container): Table
{
return new Table();
}
/**
* Get The Grep Class.
*
* @param Container $container The DI container.
*
* @return Grep
* @since 3.2.0
*/
public function getGrep(Container $container): Grep
{
return new Grep(
$container->get('Config')->local_joomla_powers_repository_path,
$container->get('Config')->approved_joomla_paths,
$container->get('Gitea.Repository.Contents')
);
}
/**
* Get The Super Class.
*
* @param Container $container The DI container.
*
* @return Superpower
* @since 3.2.0
*/
public function getSuperpower(Container $container): Superpower
{
return new Superpower(
$container->get('Joomla.Power.Grep'),
$container->get('Joomla.Power.Database.Insert'),
$container->get('Joomla.Power.Database.Update')
);
}
/**
* Get The Parser Class.
*
* @param Container $container The DI container.
*
* @return Parser
* @since 3.2.0
*/
public function getParser(Container $container): Parser
{
return new Parser();
}

View File

@ -0,0 +1,42 @@
{
"add_head": "1",
"add_licensing_template": "2",
"extends": "0",
"guid": "38e1ca3e-1908-459a-be87-9f83b292058f",
"implements": [
"-1"
],
"load_selection": null,
"name": "JoomlaPower",
"power_version": "1.0.0",
"system_name": "JCB.JoomlaPower.Service.JoomlaPower",
"type": "class",
"use_selection": {
"use_selection0": {
"use": "0b821bba-7503-4448-90e7-f3c1bd51dfd6",
"as": "default"
},
"use_selection1": {
"use": "bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8",
"as": "default"
},
"use_selection2": {
"use": "355bf21a-f859-4528-9110-bcd2c6d05ea7",
"as": "default"
},
"use_selection3": {
"use": "39a75870-a7f7-45fd-937d-5ba97b85b8ad",
"as": "Superpower"
},
"use_selection4": {
"use": "95d0e03f-24fd-4412-bc2e-f0899fcc3205",
"as": "default"
}
},
"namespace": "VDM\\Joomla\\Componentbuilder.JoomlaPower.Service.JoomlaPower",
"description": "Joomla Power Service Provider\r\n\r\n@since 3.2.1",
"implements_custom": "ServiceProviderInterface",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
"head": "use Joomla\\DI\\Container;\r\nuse Joomla\\DI\\ServiceProviderInterface;",
"composer": ""
}

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