update 2023-07-04 06:26:00
This commit is contained in:
parent
8820489aca
commit
87814d74f2
@ -26,6 +26,7 @@ This repository contains an index (see below) of all the approved powers within
|
|||||||
- **Namespace**: [VDM\Joomla\GetBible](#vdm-joomla-getbible)
|
- **Namespace**: [VDM\Joomla\GetBible](#vdm-joomla-getbible)
|
||||||
|
|
||||||
- **abstract class Factory** | [Details](src/11892cfa-374e-4e3f-b0bc-531871c822d9) | [Code](src/11892cfa-374e-4e3f-b0bc-531871c822d9/code.php) | [Settings](src/11892cfa-374e-4e3f-b0bc-531871c822d9/settings.json) | Super__11892cfa_374e_4e3f_b0bc_531871c822d9__Power
|
- **abstract class Factory** | [Details](src/11892cfa-374e-4e3f-b0bc-531871c822d9) | [Code](src/11892cfa-374e-4e3f-b0bc-531871c822d9/code.php) | [Settings](src/11892cfa-374e-4e3f-b0bc-531871c822d9/settings.json) | Super__11892cfa_374e_4e3f_b0bc_531871c822d9__Power
|
||||||
|
- **abstract class Openai** | [Details](src/f722bb8b-d377-4425-b1e4-2fe1734a3664) | [Code](src/f722bb8b-d377-4425-b1e4-2fe1734a3664/code.php) | [Settings](src/f722bb8b-d377-4425-b1e4-2fe1734a3664/settings.json) | Super__f722bb8b_d377_4425_b1e4_2fe1734a3664__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 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 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 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 Watcher** | [Details](src/f815fb33-f721-48a5-a84e-53f1986e8881) | [Code](src/f815fb33-f721-48a5-a84e-53f1986e8881/code.php) | [Settings](src/f815fb33-f721-48a5-a84e-53f1986e8881/settings.json) | Super__f815fb33_f721_48a5_a84e_53f1986e8881__Power
|
- **final class Watcher** | [Details](src/f815fb33-f721-48a5-a84e-53f1986e8881) | [Code](src/f815fb33-f721-48a5-a84e-53f1986e8881/code.php) | [Settings](src/f815fb33-f721-48a5-a84e-53f1986e8881/settings.json) | Super__f815fb33_f721_48a5_a84e_53f1986e8881__Power
|
||||||
@ -55,6 +56,7 @@ This repository contains an index (see below) of all the approved powers within
|
|||||||
- **class App** | [Details](src/56465044-94ed-4e00-b6db-160c67163df8) | [Code](src/56465044-94ed-4e00-b6db-160c67163df8/code.php) | [Settings](src/56465044-94ed-4e00-b6db-160c67163df8/settings.json) | Super__56465044_94ed_4e00_b6db_160c67163df8__Power
|
- **class App** | [Details](src/56465044-94ed-4e00-b6db-160c67163df8) | [Code](src/56465044-94ed-4e00-b6db-160c67163df8/code.php) | [Settings](src/56465044-94ed-4e00-b6db-160c67163df8/settings.json) | Super__56465044_94ed_4e00_b6db_160c67163df8__Power
|
||||||
- **class Database** | [Details](src/51bb0397-fa7c-4f7a-a4c5-1f95fdacad38) | [Code](src/51bb0397-fa7c-4f7a-a4c5-1f95fdacad38/code.php) | [Settings](src/51bb0397-fa7c-4f7a-a4c5-1f95fdacad38/settings.json) | Super__51bb0397_fa7c_4f7a_a4c5_1f95fdacad38__Power
|
- **class Database** | [Details](src/51bb0397-fa7c-4f7a-a4c5-1f95fdacad38) | [Code](src/51bb0397-fa7c-4f7a-a4c5-1f95fdacad38/code.php) | [Settings](src/51bb0397-fa7c-4f7a-a4c5-1f95fdacad38/settings.json) | Super__51bb0397_fa7c_4f7a_a4c5_1f95fdacad38__Power
|
||||||
- **class Model** | [Details](src/116eb429-bc51-4d14-b9aa-7145c86a29d1) | [Code](src/116eb429-bc51-4d14-b9aa-7145c86a29d1/code.php) | [Settings](src/116eb429-bc51-4d14-b9aa-7145c86a29d1/settings.json) | Super__116eb429_bc51_4d14_b9aa_7145c86a29d1__Power
|
- **class Model** | [Details](src/116eb429-bc51-4d14-b9aa-7145c86a29d1) | [Code](src/116eb429-bc51-4d14-b9aa-7145c86a29d1/code.php) | [Settings](src/116eb429-bc51-4d14-b9aa-7145c86a29d1/settings.json) | Super__116eb429_bc51_4d14_b9aa_7145c86a29d1__Power
|
||||||
|
- **class Openai** | [Details](src/ac5c7679-dd6e-4817-8e48-489e521122f1) | [Code](src/ac5c7679-dd6e-4817-8e48-489e521122f1/code.php) | [Settings](src/ac5c7679-dd6e-4817-8e48-489e521122f1/settings.json) | Super__ac5c7679_dd6e_4817_8e48_489e521122f1__Power
|
||||||
- **class Utilities** | [Details](src/b89d74ef-c71c-4a58-8455-5dbdfe94027a) | [Code](src/b89d74ef-c71c-4a58-8455-5dbdfe94027a/code.php) | [Settings](src/b89d74ef-c71c-4a58-8455-5dbdfe94027a/settings.json) | Super__b89d74ef_c71c_4a58_8455_5dbdfe94027a__Power
|
- **class Utilities** | [Details](src/b89d74ef-c71c-4a58-8455-5dbdfe94027a) | [Code](src/b89d74ef-c71c-4a58-8455-5dbdfe94027a/code.php) | [Settings](src/b89d74ef-c71c-4a58-8455-5dbdfe94027a/settings.json) | Super__b89d74ef_c71c_4a58_8455_5dbdfe94027a__Power
|
||||||
- **Namespace**: [VDM\Joomla\GetBible\Utilities](#vdm-joomla-getbible-utilities)
|
- **Namespace**: [VDM\Joomla\GetBible\Utilities](#vdm-joomla-getbible-utilities)
|
||||||
|
|
||||||
|
69
src/ac5c7679-dd6e-4817-8e48-489e521122f1/README.md
Normal file
69
src/ac5c7679-dd6e-4817-8e48-489e521122f1/README.md
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
```
|
||||||
|
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||||
|
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||||
|
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||||
|
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||||
|
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||||
|
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||||
|
```
|
||||||
|
# class Openai (Details)
|
||||||
|
> namespace: **VDM\Joomla\GetBible\Service**
|
||||||
|
```uml
|
||||||
|
@startuml
|
||||||
|
class Openai #Gold {
|
||||||
|
+ register(Container $container) : void
|
||||||
|
+ getChat(Container $container) : Chat
|
||||||
|
+ getCompletions(Container $container) : Completions
|
||||||
|
+ getModels(Container $container) : Models
|
||||||
|
+ getModerate(Container $container) : Moderate
|
||||||
|
}
|
||||||
|
|
||||||
|
note right of Openai::register
|
||||||
|
Registers the service provider with a DI container.
|
||||||
|
|
||||||
|
since: 3.2.0
|
||||||
|
return: void
|
||||||
|
end note
|
||||||
|
|
||||||
|
note right of Openai::getChat
|
||||||
|
Get the Chat class
|
||||||
|
|
||||||
|
since: 3.2.0
|
||||||
|
return: Chat
|
||||||
|
end note
|
||||||
|
|
||||||
|
note right of Openai::getCompletions
|
||||||
|
Get the Completions class
|
||||||
|
|
||||||
|
since: 3.2.0
|
||||||
|
return: Completions
|
||||||
|
end note
|
||||||
|
|
||||||
|
note right of Openai::getModels
|
||||||
|
Get the Models class
|
||||||
|
|
||||||
|
since: 3.2.0
|
||||||
|
return: Models
|
||||||
|
end note
|
||||||
|
|
||||||
|
note right of Openai::getModerate
|
||||||
|
Get the Moderate class
|
||||||
|
|
||||||
|
since: 3.2.0
|
||||||
|
return: Moderate
|
||||||
|
end note
|
||||||
|
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
```
|
||||||
|
██╗ ██████╗██████╗
|
||||||
|
██║██╔════╝██╔══██╗
|
||||||
|
██║██║ ██████╔╝
|
||||||
|
██ ██║██║ ██╔══██╗
|
||||||
|
╚█████╔╝╚██████╗██████╔╝
|
||||||
|
╚════╝ ╚═════╝╚═════╝
|
||||||
|
```
|
||||||
|
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||||
|
|
122
src/ac5c7679-dd6e-4817-8e48-489e521122f1/code.php
Normal file
122
src/ac5c7679-dd6e-4817-8e48-489e521122f1/code.php
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package GetBible
|
||||||
|
*
|
||||||
|
* @created 30th May, 2023
|
||||||
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||||
|
* @git GetBible <https://git.vdm.dev/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\Service;
|
||||||
|
|
||||||
|
|
||||||
|
use Joomla\DI\Container;
|
||||||
|
use Joomla\DI\ServiceProviderInterface;
|
||||||
|
use VDM\Joomla\Openai\Chat;
|
||||||
|
use VDM\Joomla\Openai\Completions;
|
||||||
|
use VDM\Joomla\Openai\Models;
|
||||||
|
use VDM\Joomla\Openai\Moderate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Openai Api Service
|
||||||
|
*
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
class Openai 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(Chat::class, 'Openai.Chat')
|
||||||
|
->share('Openai.Chat', [$this, 'getChat'], true);
|
||||||
|
|
||||||
|
$container->alias(Completions::class, 'Openai.Completions')
|
||||||
|
->share('Openai.Completions', [$this, 'getCompletions'], true);
|
||||||
|
|
||||||
|
$container->alias(Models::class, 'Openai.Models')
|
||||||
|
->share('Openai.Models', [$this, 'getModels'], true);
|
||||||
|
|
||||||
|
$container->alias(Moderate::class, 'Openai.Moderate')
|
||||||
|
->share('Openai.Moderate', [$this, 'getModerate'], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Chat class
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Chat
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function getChat(Container $container): Chat
|
||||||
|
{
|
||||||
|
return new Chat(
|
||||||
|
$container->get('Openai.Utilities.Http'),
|
||||||
|
$container->get('Openai.Utilities.Uri'),
|
||||||
|
$container->get('Openai.Utilities.Response')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Completions class
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Completions
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function getCompletions(Container $container): Completions
|
||||||
|
{
|
||||||
|
return new Completions(
|
||||||
|
$container->get('Openai.Utilities.Http'),
|
||||||
|
$container->get('Openai.Utilities.Uri'),
|
||||||
|
$container->get('Openai.Utilities.Response')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Models class
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Models
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function getModels(Container $container): Models
|
||||||
|
{
|
||||||
|
return new Models(
|
||||||
|
$container->get('Openai.Utilities.Http'),
|
||||||
|
$container->get('Openai.Utilities.Uri'),
|
||||||
|
$container->get('Openai.Utilities.Response')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Moderate class
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Moderate
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function getModerate(Container $container): Moderate
|
||||||
|
{
|
||||||
|
return new Moderate(
|
||||||
|
$container->get('Openai.Utilities.Http'),
|
||||||
|
$container->get('Openai.Utilities.Uri'),
|
||||||
|
$container->get('Openai.Utilities.Response')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
91
src/ac5c7679-dd6e-4817-8e48-489e521122f1/code.power
Normal file
91
src/ac5c7679-dd6e-4817-8e48-489e521122f1/code.power
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
/**
|
||||||
|
* 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(Chat::class, 'Openai.Chat')
|
||||||
|
->share('Openai.Chat', [$this, 'getChat'], true);
|
||||||
|
|
||||||
|
$container->alias(Completions::class, 'Openai.Completions')
|
||||||
|
->share('Openai.Completions', [$this, 'getCompletions'], true);
|
||||||
|
|
||||||
|
$container->alias(Models::class, 'Openai.Models')
|
||||||
|
->share('Openai.Models', [$this, 'getModels'], true);
|
||||||
|
|
||||||
|
$container->alias(Moderate::class, 'Openai.Moderate')
|
||||||
|
->share('Openai.Moderate', [$this, 'getModerate'], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Chat class
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Chat
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function getChat(Container $container): Chat
|
||||||
|
{
|
||||||
|
return new Chat(
|
||||||
|
$container->get('Openai.Utilities.Http'),
|
||||||
|
$container->get('Openai.Utilities.Uri'),
|
||||||
|
$container->get('Openai.Utilities.Response')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Completions class
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Completions
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function getCompletions(Container $container): Completions
|
||||||
|
{
|
||||||
|
return new Completions(
|
||||||
|
$container->get('Openai.Utilities.Http'),
|
||||||
|
$container->get('Openai.Utilities.Uri'),
|
||||||
|
$container->get('Openai.Utilities.Response')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Models class
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Models
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function getModels(Container $container): Models
|
||||||
|
{
|
||||||
|
return new Models(
|
||||||
|
$container->get('Openai.Utilities.Http'),
|
||||||
|
$container->get('Openai.Utilities.Uri'),
|
||||||
|
$container->get('Openai.Utilities.Response')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Moderate class
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Moderate
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function getModerate(Container $container): Moderate
|
||||||
|
{
|
||||||
|
return new Moderate(
|
||||||
|
$container->get('Openai.Utilities.Http'),
|
||||||
|
$container->get('Openai.Utilities.Uri'),
|
||||||
|
$container->get('Openai.Utilities.Response')
|
||||||
|
);
|
||||||
|
}
|
38
src/ac5c7679-dd6e-4817-8e48-489e521122f1/settings.json
Normal file
38
src/ac5c7679-dd6e-4817-8e48-489e521122f1/settings.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"add_head": "1",
|
||||||
|
"add_licensing_template": "2",
|
||||||
|
"extends": "0",
|
||||||
|
"guid": "ac5c7679-dd6e-4817-8e48-489e521122f1",
|
||||||
|
"implements": [
|
||||||
|
"-1"
|
||||||
|
],
|
||||||
|
"load_selection": null,
|
||||||
|
"name": "Openai",
|
||||||
|
"power_version": "1.0.0",
|
||||||
|
"system_name": "Joomla.GetBible.Service.Openai",
|
||||||
|
"type": "class",
|
||||||
|
"use_selection": {
|
||||||
|
"use_selection0": {
|
||||||
|
"use": "c54c92da-2dd7-4136-81c9-1785f2fa0af5",
|
||||||
|
"as": "default"
|
||||||
|
},
|
||||||
|
"use_selection1": {
|
||||||
|
"use": "796cca70-2577-4f8f-9a05-ac37db1f2f02",
|
||||||
|
"as": "default"
|
||||||
|
},
|
||||||
|
"use_selection2": {
|
||||||
|
"use": "08abd2df-1406-4939-a1a6-94d2fce3f043",
|
||||||
|
"as": "default"
|
||||||
|
},
|
||||||
|
"use_selection3": {
|
||||||
|
"use": "34f2c249-64a7-4229-9592-77e58f6e994f",
|
||||||
|
"as": "default"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"namespace": "VDM\\Joomla\\GetBible\\Service.Openai",
|
||||||
|
"description": "The Openai Api Service\r\n\r\n@since 3.2.0",
|
||||||
|
"implements_custom": "ServiceProviderInterface",
|
||||||
|
"licensing_template": "\/**\r\n * @package GetBible\r\n *\r\n * @created 30th May, 2023\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git GetBible <https:\/\/git.vdm.dev\/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\\DI\\Container;\r\nuse Joomla\\DI\\ServiceProviderInterface;",
|
||||||
|
"composer": ""
|
||||||
|
}
|
54
src/f722bb8b-d377-4425-b1e4-2fe1734a3664/README.md
Normal file
54
src/f722bb8b-d377-4425-b1e4-2fe1734a3664/README.md
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
```
|
||||||
|
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||||
|
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||||
|
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||||
|
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||||
|
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||||
|
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||||
|
```
|
||||||
|
# abstract class Openai (Details)
|
||||||
|
> namespace: **VDM\Joomla\GetBible**
|
||||||
|
```uml
|
||||||
|
@startuml
|
||||||
|
abstract Openai #Orange {
|
||||||
|
# static $container
|
||||||
|
+ {static} _(string $key) : Mixed
|
||||||
|
+ {static} getContainer() : Container
|
||||||
|
# {static} createContainer() : Container
|
||||||
|
}
|
||||||
|
|
||||||
|
note right of Openai::_
|
||||||
|
Get any class from the package container
|
||||||
|
|
||||||
|
since: 3.2.0
|
||||||
|
return: Mixed
|
||||||
|
end note
|
||||||
|
|
||||||
|
note right of Openai::getContainer
|
||||||
|
Get the global package container
|
||||||
|
|
||||||
|
since: 3.2.0
|
||||||
|
return: Container
|
||||||
|
end note
|
||||||
|
|
||||||
|
note right of Openai::createContainer
|
||||||
|
Create a container object
|
||||||
|
|
||||||
|
since: 3.2.0
|
||||||
|
return: Container
|
||||||
|
end note
|
||||||
|
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
```
|
||||||
|
██╗ ██████╗██████╗
|
||||||
|
██║██╔════╝██╔══██╗
|
||||||
|
██║██║ ██████╔╝
|
||||||
|
██ ██║██║ ██╔══██╗
|
||||||
|
╚█████╔╝╚██████╗██████╔╝
|
||||||
|
╚════╝ ╚═════╝╚═════╝
|
||||||
|
```
|
||||||
|
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||||
|
|
78
src/f722bb8b-d377-4425-b1e4-2fe1734a3664/code.php
Normal file
78
src/f722bb8b-d377-4425-b1e4-2fe1734a3664/code.php
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package GetBible
|
||||||
|
*
|
||||||
|
* @created 30th May, 2023
|
||||||
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||||
|
* @git GetBible <https://git.vdm.dev/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\DI\Container;
|
||||||
|
use VDM\Joomla\GetBible\Service\Openai as Api;
|
||||||
|
use VDM\Joomla\Openai\Service\Utilities;
|
||||||
|
use VDM\Joomla\Interfaces\FactoryInterface;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Openai Factory
|
||||||
|
*
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
abstract class Openai implements FactoryInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Global Package Container
|
||||||
|
*
|
||||||
|
* @var Container
|
||||||
|
* @since 3.2.0
|
||||||
|
**/
|
||||||
|
protected static $container = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get any class from the package container
|
||||||
|
*
|
||||||
|
* @param string $key The container class key
|
||||||
|
*
|
||||||
|
* @return Mixed
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public static function _($key)
|
||||||
|
{
|
||||||
|
return self::getContainer()->get($key);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the global package container
|
||||||
|
*
|
||||||
|
* @return Container
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public static function getContainer(): Container
|
||||||
|
{
|
||||||
|
if (!self::$container)
|
||||||
|
{
|
||||||
|
self::$container = self::createContainer();
|
||||||
|
}
|
||||||
|
|
||||||
|
return self::$container;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a container object
|
||||||
|
*
|
||||||
|
* @return Container
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
protected static function createContainer(): Container
|
||||||
|
{
|
||||||
|
return (new Container())
|
||||||
|
->registerServiceProvider(new Utilities())
|
||||||
|
->registerServiceProvider(new Api());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
49
src/f722bb8b-d377-4425-b1e4-2fe1734a3664/code.power
Normal file
49
src/f722bb8b-d377-4425-b1e4-2fe1734a3664/code.power
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/**
|
||||||
|
* Global Package Container
|
||||||
|
*
|
||||||
|
* @var Container
|
||||||
|
* @since 3.2.0
|
||||||
|
**/
|
||||||
|
protected static $container = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get any class from the package container
|
||||||
|
*
|
||||||
|
* @param string $key The container class key
|
||||||
|
*
|
||||||
|
* @return Mixed
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public static function _($key)
|
||||||
|
{
|
||||||
|
return self::getContainer()->get($key);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the global package container
|
||||||
|
*
|
||||||
|
* @return Container
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public static function getContainer(): Container
|
||||||
|
{
|
||||||
|
if (!self::$container)
|
||||||
|
{
|
||||||
|
self::$container = self::createContainer();
|
||||||
|
}
|
||||||
|
|
||||||
|
return self::$container;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a container object
|
||||||
|
*
|
||||||
|
* @return Container
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
protected static function createContainer(): Container
|
||||||
|
{
|
||||||
|
return (new Container())
|
||||||
|
->registerServiceProvider(new Utilities())
|
||||||
|
->registerServiceProvider(new Api());
|
||||||
|
}
|
29
src/f722bb8b-d377-4425-b1e4-2fe1734a3664/settings.json
Normal file
29
src/f722bb8b-d377-4425-b1e4-2fe1734a3664/settings.json
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"add_head": "1",
|
||||||
|
"add_licensing_template": "2",
|
||||||
|
"extends": "0",
|
||||||
|
"guid": "f722bb8b-d377-4425-b1e4-2fe1734a3664",
|
||||||
|
"implements": [
|
||||||
|
"caf33c5d-858c-4f9a-894f-ab302ec5445a"
|
||||||
|
],
|
||||||
|
"load_selection": null,
|
||||||
|
"name": "Openai",
|
||||||
|
"power_version": "1.0.0",
|
||||||
|
"system_name": "GetBible.Openai",
|
||||||
|
"type": "abstract class",
|
||||||
|
"use_selection": {
|
||||||
|
"use_selection0": {
|
||||||
|
"use": "ac5c7679-dd6e-4817-8e48-489e521122f1",
|
||||||
|
"as": "Api"
|
||||||
|
},
|
||||||
|
"use_selection1": {
|
||||||
|
"use": "07858e1f-5698-4227-8941-03dc93557938",
|
||||||
|
"as": "default"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"namespace": "VDM\\Joomla\\GetBible\\Openai",
|
||||||
|
"description": "Openai Factory\r\n\r\n@since 3.2.0",
|
||||||
|
"licensing_template": "\/**\r\n * @package GetBible\r\n *\r\n * @created 30th May, 2023\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git GetBible <https:\/\/git.vdm.dev\/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\\DI\\Container;",
|
||||||
|
"composer": ""
|
||||||
|
}
|
@ -131,6 +131,17 @@
|
|||||||
"spk": "Super__a752e4b2_9b5e_4188_8d33_3799c46d5119__Power",
|
"spk": "Super__a752e4b2_9b5e_4188_8d33_3799c46d5119__Power",
|
||||||
"guid": "a752e4b2-9b5e-4188-8d33-3799c46d5119"
|
"guid": "a752e4b2-9b5e-4188-8d33-3799c46d5119"
|
||||||
},
|
},
|
||||||
|
"ac5c7679-dd6e-4817-8e48-489e521122f1": {
|
||||||
|
"name": "Openai",
|
||||||
|
"type": "class",
|
||||||
|
"namespace": "VDM\\Joomla\\GetBible\\Service",
|
||||||
|
"code": "src\/ac5c7679-dd6e-4817-8e48-489e521122f1\/code.php",
|
||||||
|
"power": "src\/ac5c7679-dd6e-4817-8e48-489e521122f1\/code.power",
|
||||||
|
"settings": "src\/ac5c7679-dd6e-4817-8e48-489e521122f1\/settings.json",
|
||||||
|
"path": "src\/ac5c7679-dd6e-4817-8e48-489e521122f1",
|
||||||
|
"spk": "Super__ac5c7679_dd6e_4817_8e48_489e521122f1__Power",
|
||||||
|
"guid": "ac5c7679-dd6e-4817-8e48-489e521122f1"
|
||||||
|
},
|
||||||
"afa508bf-78f8-4616-97cc-f2809584c086": {
|
"afa508bf-78f8-4616-97cc-f2809584c086": {
|
||||||
"name": "Verses",
|
"name": "Verses",
|
||||||
"type": "final class",
|
"type": "final class",
|
||||||
@ -230,6 +241,17 @@
|
|||||||
"spk": "Super__d7a5f0c6_de60_4d31_b3e4_5d668a8f7d2e__Power",
|
"spk": "Super__d7a5f0c6_de60_4d31_b3e4_5d668a8f7d2e__Power",
|
||||||
"guid": "d7a5f0c6-de60-4d31-b3e4-5d668a8f7d2e"
|
"guid": "d7a5f0c6-de60-4d31-b3e4-5d668a8f7d2e"
|
||||||
},
|
},
|
||||||
|
"f722bb8b-d377-4425-b1e4-2fe1734a3664": {
|
||||||
|
"name": "Openai",
|
||||||
|
"type": "abstract class",
|
||||||
|
"namespace": "VDM\\Joomla\\GetBible",
|
||||||
|
"code": "src\/f722bb8b-d377-4425-b1e4-2fe1734a3664\/code.php",
|
||||||
|
"power": "src\/f722bb8b-d377-4425-b1e4-2fe1734a3664\/code.power",
|
||||||
|
"settings": "src\/f722bb8b-d377-4425-b1e4-2fe1734a3664\/settings.json",
|
||||||
|
"path": "src\/f722bb8b-d377-4425-b1e4-2fe1734a3664",
|
||||||
|
"spk": "Super__f722bb8b_d377_4425_b1e4_2fe1734a3664__Power",
|
||||||
|
"guid": "f722bb8b-d377-4425-b1e4-2fe1734a3664"
|
||||||
|
},
|
||||||
"f815fb33-f721-48a5-a84e-53f1986e8881": {
|
"f815fb33-f721-48a5-a84e-53f1986e8881": {
|
||||||
"name": "Watcher",
|
"name": "Watcher",
|
||||||
"type": "final class",
|
"type": "final class",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user