From 00fc7f9fe6050c17c1842b57a4542d791860b2ae Mon Sep 17 00:00:00 2001 From: aB0t Date: Wed, 26 Jul 2023 11:22:58 +0200 Subject: [PATCH] update 2023-07-26 11:22:58 --- README.md | 1 + .../README.md | 18 ++-- .../code.php | 20 +++++ .../code.power | 19 +++++ .../settings.json | 4 + .../README.md | 47 +++++++++++ .../code.php | 83 +++++++++++++++++++ .../code.power | 55 ++++++++++++ .../settings.json | 27 ++++++ super-powers.json | 11 +++ 10 files changed, 280 insertions(+), 5 deletions(-) create mode 100644 src/fb5683e2-67ec-413d-96fa-8465fd2f511c/README.md create mode 100644 src/fb5683e2-67ec-413d-96fa-8465fd2f511c/code.php create mode 100644 src/fb5683e2-67ec-413d-96fa-8465fd2f511c/code.power create mode 100644 src/fb5683e2-67ec-413d-96fa-8465fd2f511c/settings.json diff --git a/README.md b/README.md index 8e0a09d..572fed0 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ This repository contains an index (see below) of all the approved powers within - **final class AI** | [Details](src/f3757646-bc63-4f11-98c1-a2663180ab5e) | [Code](src/f3757646-bc63-4f11-98c1-a2663180ab5e/code.php) | [Settings](src/f3757646-bc63-4f11-98c1-a2663180ab5e/settings.json) | Super__f3757646_bc63_4f11_98c1_a2663180ab5e__Power - **final class DailyScripture** | [Details](src/90f2ee7a-c041-4316-ad54-af4f97fa3003) | [Code](src/90f2ee7a-c041-4316-ad54-af4f97fa3003/code.php) | [Settings](src/90f2ee7a-c041-4316-ad54-af4f97fa3003/settings.json) | Super__90f2ee7a_c041_4316_ad54_af4f97fa3003__Power - **final class Linker** | [Details](src/36ab759f-7b42-4465-9c17-56ba1dd05f90) | [Code](src/36ab759f-7b42-4465-9c17-56ba1dd05f90/code.php) | [Settings](src/36ab759f-7b42-4465-9c17-56ba1dd05f90/settings.json) | Super__36ab759f_7b42_4465_9c17_56ba1dd05f90__Power + - **final class Loader** | [Details](src/fb5683e2-67ec-413d-96fa-8465fd2f511c) | [Code](src/fb5683e2-67ec-413d-96fa-8465fd2f511c/code.php) | [Settings](src/fb5683e2-67ec-413d-96fa-8465fd2f511c/settings.json) | Super__fb5683e2_67ec_413d_96fa_8465fd2f511c__Power - **final class Note** | [Details](src/ebda6bd8-95b9-468b-a521-974205146018) | [Code](src/ebda6bd8-95b9-468b-a521-974205146018/code.php) | [Settings](src/ebda6bd8-95b9-468b-a521-974205146018/settings.json) | Super__ebda6bd8_95b9_468b_a521_974205146018__Power - **final class Search** | [Details](src/8336e3c4-f11b-41bc-a2b1-976f99442a84) | [Code](src/8336e3c4-f11b-41bc-a2b1-976f99442a84/code.php) | [Settings](src/8336e3c4-f11b-41bc-a2b1-976f99442a84/settings.json) | Super__8336e3c4_f11b_41bc_a2b1_976f99442a84__Power - **final class Tag** | [Details](src/67f91b8b-7b48-4dbb-bbd5-7945c174622a) | [Code](src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/code.php) | [Settings](src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/settings.json) | Super__67f91b8b_7b48_4dbb_bbd5_7945c174622a__Power diff --git a/src/56465044-94ed-4e00-b6db-160c67163df8/README.md b/src/56465044-94ed-4e00-b6db-160c67163df8/README.md index faf71f4..195e4e9 100644 --- a/src/56465044-94ed-4e00-b6db-160c67163df8/README.md +++ b/src/56465044-94ed-4e00-b6db-160c67163df8/README.md @@ -17,6 +17,7 @@ class App #Gold { + getDailyScripture(Container $container) : DailyScripture + getSearch(Container $container) : Search + getWatcher(Container $container) : Watcher + + getLoader(Container $container) : Loader + getLinker(Container $container) : Linker + getNote(Container $container) : Note + getTag(Container $container) : Tag @@ -66,35 +67,42 @@ note left of App::getWatcher return: Watcher end note -note right of App::getLinker +note right of App::getLoader + Get the Loader class + + since: 2.0.1 + return: Loader +end note + +note left of App::getLinker Get the Linker class since: 2.0.1 return: Linker end note -note left of App::getNote +note right of App::getNote Get the Note class since: 2.0.1 return: Note end note -note right of App::getTag +note left of App::getTag Get the Tag class since: 2.0.1 return: Tag end note -note left of App::getTagged +note right of App::getTagged Get the Tagged class since: 2.0.1 return: Tagged end note -note right of App::getTaggedParagraphs +note left of App::getTaggedParagraphs Get the Paragraphs class since: 2.0.1 diff --git a/src/56465044-94ed-4e00-b6db-160c67163df8/code.php b/src/56465044-94ed-4e00-b6db-160c67163df8/code.php index 6d8ec7f..012f390 100644 --- a/src/56465044-94ed-4e00-b6db-160c67163df8/code.php +++ b/src/56465044-94ed-4e00-b6db-160c67163df8/code.php @@ -19,6 +19,7 @@ use VDM\Joomla\GetBible\Table; use VDM\Joomla\GetBible\DailyScripture; use VDM\Joomla\GetBible\Search; use VDM\Joomla\GetBible\Watcher; +use VDM\Joomla\GetBible\Loader; use VDM\Joomla\GetBible\Linker; use VDM\Joomla\GetBible\Note; use VDM\Joomla\GetBible\Tag; @@ -58,6 +59,9 @@ class App implements ServiceProviderInterface $container->alias(Watcher::class, 'GetBible.Watcher') ->share('GetBible.Watcher', [$this, 'getWatcher'], true); + $container->alias(Loader::class, 'GetBible.Loader') + ->share('GetBible.Loader', [$this, 'getLoader'], true); + $container->alias(Linker::class, 'GetBible.Linker') ->share('GetBible.Linker', [$this, 'getLinker'], true); @@ -151,6 +155,22 @@ class App implements ServiceProviderInterface ); } + /** + * Get the Loader class + * + * @param Container $container The DI container. + * + * @return Loader + * @since 2.0.1 + */ + public function getLoader(Container $container): Loader + { + return new Loader( + $container->get('GetBible.Load'), + $container->get('GetBible.Watcher') + ); + } + /** * Get the Linker class * diff --git a/src/56465044-94ed-4e00-b6db-160c67163df8/code.power b/src/56465044-94ed-4e00-b6db-160c67163df8/code.power index b8b7a3b..b67509f 100644 --- a/src/56465044-94ed-4e00-b6db-160c67163df8/code.power +++ b/src/56465044-94ed-4e00-b6db-160c67163df8/code.power @@ -23,6 +23,9 @@ $container->alias(Watcher::class, 'GetBible.Watcher') ->share('GetBible.Watcher', [$this, 'getWatcher'], true); + $container->alias(Loader::class, 'GetBible.Loader') + ->share('GetBible.Loader', [$this, 'getLoader'], true); + $container->alias(Linker::class, 'GetBible.Linker') ->share('GetBible.Linker', [$this, 'getLinker'], true); @@ -116,6 +119,22 @@ ); } + /** + * Get the Loader class + * + * @param Container $container The DI container. + * + * @return Loader + * @since 2.0.1 + */ + public function getLoader(Container $container): Loader + { + return new Loader( + $container->get('GetBible.Load'), + $container->get('GetBible.Watcher') + ); + } + /** * Get the Linker class * diff --git a/src/56465044-94ed-4e00-b6db-160c67163df8/settings.json b/src/56465044-94ed-4e00-b6db-160c67163df8/settings.json index 1de5401..fc9faad 100644 --- a/src/56465044-94ed-4e00-b6db-160c67163df8/settings.json +++ b/src/56465044-94ed-4e00-b6db-160c67163df8/settings.json @@ -32,6 +32,10 @@ "use": "f815fb33-f721-48a5-a84e-53f1986e8881", "as": "default" }, + "use_selection10": { + "use": "fb5683e2-67ec-413d-96fa-8465fd2f511c", + "as": "default" + }, "use_selection5": { "use": "36ab759f-7b42-4465-9c17-56ba1dd05f90", "as": "default" diff --git a/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/README.md b/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/README.md new file mode 100644 index 0000000..c3d476b --- /dev/null +++ b/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/README.md @@ -0,0 +1,47 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# final class Loader (Details) +> namespace: **VDM\Joomla\GetBible** +```uml +@startuml +class Loader << (F,LightGreen) >> #Green { + # Load $load + # Watcher $watcher + # Registry $plugin + + __construct(Load $load, Watcher $watcher) + + set($row, Registry $plugin) : bool +} + +note right of Loader::__construct + Constructor + + since: 2.0.1 +end note + +note right of Loader::set + The setting of Scripture into Content starts here + + since: 2.0.1 + return: bool +end note + +@enduml +``` + +--- +``` + ██╗ ██████╗██████╗ + ██║██╔════╝██╔══██╗ + ██║██║ ██████╔╝ +██ ██║██║ ██╔══██╗ +╚█████╔╝╚██████╗██████╔╝ + ╚════╝ ╚═════╝╚═════╝ +``` +> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) + diff --git a/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/code.php b/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/code.php new file mode 100644 index 0000000..1598913 --- /dev/null +++ b/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/code.php @@ -0,0 +1,83 @@ + + * @git GetBible + * @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\GetBible; + + +use Joomla\Registry\Registry; +use VDM\Joomla\GetBible\Database\Load; +use VDM\Joomla\GetBible\Watcher; + + +/** + * The GetBible Loader of Scripture in Content + * + * @since 2.0.1 + */ +final class Loader +{ + /** + * The Load class + * + * @var Load + * @since 2.0.1 + */ + protected Load $load; + + /** + * The Watcher class + * + * @var Watcher + * @since 2.0.1 + */ + protected Watcher $watcher; + + /** + * The Plugin Params class + * + * @var Registry + * @since 2.0.1 + */ + protected Registry $plugin; + + /** + * Constructor + * + * @param Load $load The load object. + * @param Watcher $watcher The watcher object. + * + * @since 2.0.1 + */ + public function __construct( + Load $load, + Watcher $watcher) + { + $this->load = $load; + $this->watcher = $watcher; + } + + /** + * The setting of Scripture into Content starts here + * + * @param object &$row The article object. Note $article->text is also available + * @param Registry $plugin The plugin params + * + * @return void + * @since 2.0.1 + */ + public function set(&$row, Registry $plugin): bool + { + $this->plugin = $plugin; + + return; + } +} + diff --git a/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/code.power b/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/code.power new file mode 100644 index 0000000..07b6f72 --- /dev/null +++ b/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/code.power @@ -0,0 +1,55 @@ + /** + * The Load class + * + * @var Load + * @since 2.0.1 + */ + protected Load $load; + + /** + * The Watcher class + * + * @var Watcher + * @since 2.0.1 + */ + protected Watcher $watcher; + + /** + * The Plugin Params class + * + * @var Registry + * @since 2.0.1 + */ + protected Registry $plugin; + + /** + * Constructor + * + * @param Load $load The load object. + * @param Watcher $watcher The watcher object. + * + * @since 2.0.1 + */ + public function __construct( + Load $load, + Watcher $watcher) + { + $this->load = $load; + $this->watcher = $watcher; + } + + /** + * The setting of Scripture into Content starts here + * + * @param object &$row The article object. Note $article->text is also available + * @param Registry $plugin The plugin params + * + * @return void + * @since 2.0.1 + */ + public function set(&$row, Registry $plugin): bool + { + $this->plugin = $plugin; + + return; + } \ No newline at end of file diff --git a/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/settings.json b/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/settings.json new file mode 100644 index 0000000..d8bfcb5 --- /dev/null +++ b/src/fb5683e2-67ec-413d-96fa-8465fd2f511c/settings.json @@ -0,0 +1,27 @@ +{ + "add_head": "1", + "add_licensing_template": "2", + "extends": "0", + "guid": "fb5683e2-67ec-413d-96fa-8465fd2f511c", + "implements": null, + "load_selection": null, + "name": "Loader", + "power_version": "1.0.0", + "system_name": "Joomla.GetBible.Loader", + "type": "final class", + "use_selection": { + "use_selection0": { + "use": "c03b9c61-17d3-4774-a335-783903719f83", + "as": "default" + }, + "use_selection1": { + "use": "f815fb33-f721-48a5-a84e-53f1986e8881", + "as": "default" + } + }, + "namespace": "VDM\\Joomla\\GetBible\\Loader", + "description": "The GetBible Loader of Scripture in Content\r\n\r\n@since 2.0.1", + "licensing_template": "\/**\r\n * @package GetBible\r\n *\r\n * @created 30th May, 2023\r\n * @author Llewellyn van der Merwe \r\n * @git GetBible \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;", + "composer": "" +} \ No newline at end of file diff --git a/super-powers.json b/super-powers.json index 103b583..c60f5ff 100644 --- a/super-powers.json +++ b/super-powers.json @@ -494,6 +494,17 @@ "spk": "Super__fa776320_65f8_4198_a517_58cd94b3b7b7__Power", "guid": "fa776320-65f8-4198-a517-58cd94b3b7b7" }, + "fb5683e2-67ec-413d-96fa-8465fd2f511c": { + "name": "Loader", + "type": "final class", + "namespace": "VDM\\Joomla\\GetBible", + "code": "src\/fb5683e2-67ec-413d-96fa-8465fd2f511c\/code.php", + "power": "src\/fb5683e2-67ec-413d-96fa-8465fd2f511c\/code.power", + "settings": "src\/fb5683e2-67ec-413d-96fa-8465fd2f511c\/settings.json", + "path": "src\/fb5683e2-67ec-413d-96fa-8465fd2f511c", + "spk": "Super__fb5683e2_67ec_413d_96fa_8465fd2f511c__Power", + "guid": "fb5683e2-67ec-413d-96fa-8465fd2f511c" + }, "fc9ab6f0-c31b-4077-bb1c-2dcddd36f6bb": { "name": "Uri", "type": "final class",