super-powers/README.md

486 lines
21 KiB
Markdown
Raw Normal View History

2023-03-21 22:43:11 +00:00
```
███████╗██╗ ██╗██████╗ ███████╗██████╗
██╔════╝██║ ██║██╔══██╗██╔════╝██╔══██╗
███████╗██║ ██║██████╔╝█████╗ ██████╔╝
╚════██║██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗
███████║╚██████╔╝██║ ███████╗██║ ██║
╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
██████╗ ██████╗ ██╗ ██╗███████╗██████╗ ███████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗██╔════╝
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝███████╗
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗╚════██║
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║███████║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝╚══════╝
```
### What is JCB Super Powers?
The Joomla Component Builder (JCB) Super Power features are designed to enhance JCB's functionality and streamline the development process. These Super Powers enable developers to efficiently manage and share their custom powers across multiple JCB instances through repositories hosted on [https://git.vdm.dev/[username]/[repository-name]](https://git.vdm.dev). JCB Super Powers are managed using a combination of layers, events, tasks, methods, switches, and algorithms, which work together to provide powerful customization and extensibility options. More details on JCB Super Powers can be found in the [Super Powers Documentation](https://git.vdm.dev/joomla/super-powers/wiki).
In summary, JCB Super Powers offer a flexible and efficient way to manage and share functionalities between JCB instances. By utilizing a sophisticated system of layers, events, tasks, methods, switches, and algorithms, developers can seamlessly integrate JCB core powers and their custom powers. For more information on how to work with JCB Super Powers, refer to the [Super Powers User Guide](https://git.vdm.dev/joomla/super-powers/wiki).
### What can I find here?
This repository contains an index (see below) of all the approved powers within the JCB GUI. During the compilation of a component, these powers are automatically added to the repository, ensuring a well-organized and accessible collection of functionalities.
# Index of powers
- **Namespace**: [VDM\Joomla](#vdm-joomla)
2023-05-01 23:42:46 +00:00
- **trait Utilities** | [Details](src/79d765b3-7319-4988-9730-446c7f347020) | [Code](src/79d765b3-7319-4988-9730-446c7f347020/code.php) | [Settings](src/79d765b3-7319-4988-9730-446c7f347020/settings.json) | Utilities
2023-03-21 22:43:11 +00:00
- **Namespace**: [VDM\Joomla\Utilities](#vdm-joomla-utilities)
2023-05-01 23:42:46 +00:00
- **abstract class ArrayHelper** | [Details](src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a) | [Code](src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/code.php) | [Settings](src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a/settings.json) | ArrayHelper
- **abstract class FileHelper** | [Details](src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0) | [Code](src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.php) | [Settings](src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/settings.json) | FileHelper
- **abstract class GetHelper** | [Details](src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc) | [Code](src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/code.php) | [Settings](src/db87c339-5bb6-4291-a7ef-2c48ea1b06bc/settings.json) | GetHelper
- **abstract class GuidHelper** | [Details](src/9c513baf-b279-43fd-ae29-a585c8cbc4f0) | [Code](src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/code.php) | [Settings](src/9c513baf-b279-43fd-ae29-a585c8cbc4f0/settings.json) | GuidHelper
- **abstract class JsonHelper** | [Details](src/4b225c51-d293-48e4-b3f6-5136cf5c3f18) | [Code](src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/code.php) | [Settings](src/4b225c51-d293-48e4-b3f6-5136cf5c3f18/settings.json) | JsonHelper
- **abstract class MathHelper** | [Details](src/152c8793-8b75-4715-996a-257b9f65451c) | [Code](src/152c8793-8b75-4715-996a-257b9f65451c/code.php) | [Settings](src/152c8793-8b75-4715-996a-257b9f65451c/settings.json) | MathHelper
- **abstract class ObjectHelper** | [Details](src/91004529-94a9-4590-b842-e7c6b624ecf5) | [Code](src/91004529-94a9-4590-b842-e7c6b624ecf5/code.php) | [Settings](src/91004529-94a9-4590-b842-e7c6b624ecf5/settings.json) | ObjectHelper
- **abstract class StringHelper** | [Details](src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef) | [Code](src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/code.php) | [Settings](src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef/settings.json) | StringHelper
2023-04-15 14:49:41 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Abstraction](#vdm-joomla-componentbuilder-abstraction)
2023-05-01 23:42:46 +00:00
- **abstract class BaseConfig** | [Details](src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36) | [Code](src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/code.php) | [Settings](src/9769f3b2-17bf-4f20-b54b-3a4ebe572b36/settings.json) | BaseConfig
- **abstract class BaseRegistry** | [Details](src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c) | [Code](src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/code.php) | [Settings](src/b84e947d-2a13-44f7-ac0f-3902ae55ae0c/settings.json) | BaseRegistry
- **abstract class Database** | [Details](src/6cbef8f8-4813-48e3-b05a-65e1aea95171) | [Code](src/6cbef8f8-4813-48e3-b05a-65e1aea95171/code.php) | [Settings](src/6cbef8f8-4813-48e3-b05a-65e1aea95171/settings.json) | Database
- **abstract class Mapper** | [Details](src/44a3367c-f9e4-406b-b396-0f452bde0f03) | [Code](src/44a3367c-f9e4-406b-b396-0f452bde0f03/code.php) | [Settings](src/44a3367c-f9e4-406b-b396-0f452bde0f03/settings.json) | Mapper
- **abstract class MapperSingle** | [Details](src/c6bbc3ee-58e7-4463-adba-5c5ae839ee36) | [Code](src/c6bbc3ee-58e7-4463-adba-5c5ae839ee36/code.php) | [Settings](src/c6bbc3ee-58e7-4463-adba-5c5ae839ee36/settings.json) | MapperSingle
- **abstract class Model** | [Details](src/584747d1-3a86-453d-b7a3-a2219de8d777) | [Code](src/584747d1-3a86-453d-b7a3-a2219de8d777/code.php) | [Settings](src/584747d1-3a86-453d-b7a3-a2219de8d777/settings.json) | Model
2023-04-15 14:49:41 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Database](#vdm-joomla-componentbuilder-database)
2023-05-01 23:42:46 +00:00
- **final class Insert** | [Details](src/524eb8f6-38d4-47dc-92ad-98b94e099ac0) | [Code](src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/code.php) | [Settings](src/524eb8f6-38d4-47dc-92ad-98b94e099ac0/settings.json) | Insert
- **final class Load** | [Details](src/06f8eada-d59b-441c-b287-0aea1793da5a) | [Code](src/06f8eada-d59b-441c-b287-0aea1793da5a/code.php) | [Settings](src/06f8eada-d59b-441c-b287-0aea1793da5a/settings.json) | Load
- **final class Update** | [Details](src/cce56585-58b0-4f72-a92c-e2635ea52d83) | [Code](src/cce56585-58b0-4f72-a92c-e2635ea52d83/code.php) | [Settings](src/cce56585-58b0-4f72-a92c-e2635ea52d83/settings.json) | Update
2023-04-15 14:49:41 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Interfaces](#vdm-joomla-componentbuilder-interfaces)
2023-05-01 23:42:46 +00:00
- **interface InsertInterface** | [Details](src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48) | [Code](src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/code.php) | [Settings](src/ad12ca1c-d3ce-4e7f-88c5-c6c92bdedc48/settings.json) | Super___ad12ca1c_d3ce_4e7f_88c5_c6c92bdedc48___Power
- **interface ModelInterface** | [Details](src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff) | [Code](src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/code.php) | [Settings](src/8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff/settings.json) | Super___8aef58c1_3f70_4bd4_b9e4_3f29fcd41cff___Power
- **interface UpdateInterface** | [Details](src/7179fde6-1e51-4b51-8545-7ca18f74a0f4) | [Code](src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/code.php) | [Settings](src/7179fde6-1e51-4b51-8545-7ca18f74a0f4/settings.json) | Super___7179fde6_1e51_4b51_8545_7ca18f74a0f4___Power
2023-04-15 14:49:41 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Utilities](#vdm-joomla-componentbuilder-utilities)
2023-05-01 23:42:46 +00:00
- **abstract class FilterHelper** | [Details](src/cddcac51-9a46-47c4-ba59-105c70453bd6) | [Code](src/cddcac51-9a46-47c4-ba59-105c70453bd6/code.php) | [Settings](src/cddcac51-9a46-47c4-ba59-105c70453bd6/settings.json) | FilterHelper
- **abstract class FormHelper** | [Details](src/1198aecf-84c6-45d2-aea8-d531aa4afdfa) | [Code](src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/code.php) | [Settings](src/1198aecf-84c6-45d2-aea8-d531aa4afdfa/settings.json) | FormHelper
2023-03-21 22:43:11 +00:00
- **Namespace**: [VDM\Joomla\Utilities\Component](#vdm-joomla-utilities-component)
2023-05-01 23:42:46 +00:00
- **abstract class Helper** | [Details](src/640b5352-fb09-425f-a26e-cd44eda03f15) | [Code](src/640b5352-fb09-425f-a26e-cd44eda03f15/code.php) | [Settings](src/640b5352-fb09-425f-a26e-cd44eda03f15/settings.json) | Helper
2023-04-15 14:49:41 +00:00
- **Namespace**: [VDM\Joomla\Utilities\String](#vdm-joomla-utilities-string)
2023-05-01 23:42:46 +00:00
- **abstract class ClassfunctionHelper** | [Details](src/30c5b4c2-f75f-4d15-869a-f8bfedd87358) | [Code](src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/code.php) | [Settings](src/30c5b4c2-f75f-4d15-869a-f8bfedd87358/settings.json) | ClassfunctionHelper
- **abstract class FieldHelper** | [Details](src/9ef0eb24-aae4-4f5a-99af-d724db44808f) | [Code](src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.php) | [Settings](src/9ef0eb24-aae4-4f5a-99af-d724db44808f/settings.json) | FieldHelper
- **abstract class NamespaceHelper** | [Details](src/ce8cf834-6bac-44fb-941c-861f7e046cc0) | [Code](src/ce8cf834-6bac-44fb-941c-861f7e046cc0/code.php) | [Settings](src/ce8cf834-6bac-44fb-941c-861f7e046cc0/settings.json) | NamespaceHelper
- **abstract class PluginHelper** | [Details](src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6) | [Code](src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/code.php) | [Settings](src/3cf76fbf-fd95-4a33-878e-7aff6d36b7f6/settings.json) | PluginHelper
- **abstract class TypeHelper** | [Details](src/a8935cbe-7701-40dc-bfd5-675f2d600954) | [Code](src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php) | [Settings](src/a8935cbe-7701-40dc-bfd5-675f2d600954/settings.json) | TypeHelper
2023-03-21 22:43:11 +00:00
# Class Diagrams
## VDM Joomla
> namespace VDM\Joomla
```uml
@startuml
namespace VDM\Joomla #Azure {
class Utilities << (T,Orange) >> #Turquoise {
+ static $langTag
+ {static} checkString() : bool
+ {static} shorten()
+ {static} safeString()
+ {static} safeClassFunctionName()
+ {static} safeFieldName()
+ {static} safeTypeName()
+ {static} safeNamespace()
+ {static} transliterate()
+ {static} htmlEscape()
+ {static} replaceNumbers()
+ {static} numberToString()
+ {static} randomkey() : string
+ {static} checkJson() : bool
+ {static} jsonToString()
+ {static} checkArray() : int
+ {static} mergeArrays()
+ {static} checkObject() : bool
+ {static} getVar() : mix
+ {static} getVars() : array
+ {static} getAllBetween() : array
+ {static} getBetween() : string
+ {static} bcmath() : float|int
+ {static} bcsum() : float|int
+ {static} createPluginClassName() : string
+ {static} GUID() : string
+ {static} validGUID() : bool
+ {static} getGUID() : mix
# {static} validateGUID() : bool
+ {static} zip() : bool
+ {static} getFileContents() : string
+ {static} writeFile() : bool
+ {static} getAllFilePaths() : void
+ {static} getFilePath() : string
+ {static} urlExists() : bool
+ {static} setComponentOption()
}
}
@enduml
```
## VDM Joomla Utilities
> namespace VDM\Joomla\Utilities
```uml
@startuml
namespace VDM\Joomla\Utilities #DarkCyan {
abstract ArrayHelper #Orange {
+ {static} check()
+ {static} merge() : ?array
+ {static} intersect() : bool
}
abstract FileHelper #Orange {
# static $curlError
+ {static} zip() : bool
+ {static} getContent() : string
+ {static} write() : bool
+ {static} getPaths() : void
+ {static} getPath() : string
+ {static} exists() : bool
}
abstract GetHelper #Orange {
+ {static} var() : mixed
+ {static} vars() : ?array
+ {static} allBetween() : ?array
+ {static} between() : string
}
abstract GuidHelper #Orange {
+ {static} get() : string
+ {static} valid() : bool
+ {static} item() : mix
# {static} validate() : bool
}
abstract JsonHelper #Orange {
+ {static} check() : bool
+ {static} string()
}
abstract MathHelper #Orange {
+ {static} bc() : int
+ {static} sum() : float
}
abstract ObjectHelper #Orange {
+ {static} check()
+ {static} equal() : bool
}
abstract StringHelper #Orange {
+ static $langTag
+ {static} check() : bool
+ {static} shorten()
+ {static} safe()
+ {static} transliterate()
+ {static} html()
+ {static} numbers()
+ {static} number()
+ {static} random() : string
}
}
2023-04-15 14:49:41 +00:00
@enduml
```
## VDM Joomla Componentbuilder Abstraction
> namespace VDM\Joomla\Componentbuilder\Abstraction
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Abstraction #Olive {
abstract BaseConfig #Orange {
# Input $input
# JoomlaRegistry $params
+ __construct()
+ __set()
+ __get()
+ get() : mixed
+ appendArray() : mixed
}
abstract BaseRegistry #Orange {
+ _() : ?\ArrayIterator
+ appendArray() : mixed
+ isArray() : bool
+ isString() : bool
+ isNumeric() : bool
}
abstract Database #Orange {
# \JDatabaseDriver $db
# string $table
+ __construct()
# quote() : mixed
# getTable() : string
}
abstract Mapper #Orange {
+ array $active
+ isActive() : bool
+ set() : void
+ get() : mixed
+ exist() : bool
+ add() : void
+ remove() : void
# {abstract} key() : string
+ isActive_() : bool
+ set_() : void
+ get_() : mixed
+ exist_() : bool
+ add_() : void
+ remove_() : void
# {abstract} firstKey() : string
# {abstract} secondKey() : string
}
abstract MapperSingle #Orange {
+ array $active
+ isActive() : bool
+ set() : void
+ get() : mixed
+ exist() : bool
+ add() : void
+ remove() : void
# {abstract} key() : string
}
abstract Model #Orange {
# array $last
# Table $table
+ __construct()
+ {abstract} value() : mixed
+ item() : ?object
+ items() : ?array
+ row() : ?array
+ rows() : ?array
+ last() : ?int
# getTableFields() : ?array
# {abstract} validateBefore() : bool
# {abstract} validateAfter() : bool
# {abstract} getTable() : string
}
}
@enduml
```
## VDM Joomla Componentbuilder Database
> namespace VDM\Joomla\Componentbuilder\Database
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Database #Olive {
class Insert << (F,LightGreen) >> #Green {
# bool $defaults
+ defaults() : void
+ rows() : bool
+ items() : bool
+ row() : bool
+ item() : bool
# getArrayColumns() : array
# getObjectsColumns() : array
# insert() : bool
}
class Load << (F,LightGreen) >> #Green {
+ rows() : ?array
+ items() : ?array
+ row() : ?array
+ item() : ?object
+ value() : mixed
# many() : bool
# one() : bool
# query() : ?object
}
2023-04-29 23:34:32 +00:00
class Update << (F,LightGreen) >> #Green {
+ rows() : bool
+ items() : bool
+ row() : bool
+ item() : bool
}
2023-04-15 14:49:41 +00:00
}
@enduml
```
## VDM Joomla Componentbuilder Interfaces
> namespace VDM\Joomla\Componentbuilder\Interfaces
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Interfaces #Olive {
2023-05-01 12:01:01 +00:00
interface InsertInterface #Lavender {
+ defaults() : void
+ rows() : bool
+ items() : bool
+ row() : bool
+ item() : bool
}
2023-04-15 14:49:41 +00:00
interface ModelInterface #Lavender {
+ value() : mixed
+ item() : ?object
+ items() : ?array
+ row() : ?array
+ rows() : ?array
+ last() : ?int
}
2023-05-01 12:01:01 +00:00
interface UpdateInterface #Lavender {
+ rows() : bool
+ items() : bool
+ row() : bool
+ item() : bool
}
2023-04-15 14:49:41 +00:00
}
@enduml
```
## VDM Joomla Componentbuilder Utilities
> namespace VDM\Joomla\Componentbuilder\Utilities
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Utilities #Olive {
abstract FilterHelper #Orange {
+ {static} extensions() : string
+ {static} names() : ?array
+ {static} linked() : ?array
+ {static} namespaces() : ?array
+ {static} namegroup() : ?array
+ {static} translation() : ?array
+ {static} translations() : ?array
+ {static} languages() : ?array
+ {static} paths() : ?array
- {static} joomla_component_admin_views() : ?array
- {static} joomla_component_custom_admin_views() : ?array
- {static} joomla_component_site_views() : ?array
- {static} joomla_component() : ?array
- {static} joomla_module() : ?array
- {static} joomla_plugin() : ?array
- {static} admin_view() : ?array
}
abstract FormHelper #Orange {
+ {static} xml() : ?\SimpleXMLElement
+ {static} append() : void
+ {static} comment() : void
+ {static} attributes() : void
+ {static} options() : void
+ {static} field() : ?FormField
}
}
2023-03-21 22:43:11 +00:00
@enduml
```
## VDM Joomla Utilities Component
> namespace VDM\Joomla\Utilities\Component
```uml
@startuml
namespace VDM\Joomla\Utilities\Component #Olive {
abstract Helper #Orange {
+ {static} getParams() : Registry
+ {static} getOption() : ?string
+ {static} getCode() : ?string
+ {static} get() : ?string
+ {static} methodExists() : bool
+ {static} _() : mixed
}
}
2023-04-15 14:49:41 +00:00
@enduml
```
## VDM Joomla Utilities String
> namespace VDM\Joomla\Utilities\String
```uml
@startuml
namespace VDM\Joomla\Utilities\String #Olive {
abstract ClassfunctionHelper #Orange {
+ {static} safe() : string
}
abstract FieldHelper #Orange {
# static $builder
+ {static} safe()
}
abstract NamespaceHelper #Orange {
+ {static} safe() : string
}
abstract PluginHelper #Orange {
+ {static} safeFolderName() : string
+ {static} safeClassName() : string
+ {static} safeInstallClassName() : string
+ {static} safeLangPrefix() : string
}
abstract TypeHelper #Orange {
# static $builder
+ {static} safe()
}
}
2023-03-21 22:43:11 +00:00
@enduml
```
---
```
██╗ ██████╗ ██████╗ ███╗ ███╗██╗ █████╗
██║██╔═══██╗██╔═══██╗████╗ ████║██║ ██╔══██╗
██║██║ ██║██║ ██║██╔████╔██║██║ ███████║
██ ██║██║ ██║██║ ██║██║╚██╔╝██║██║ ██╔══██║
╚█████╔╝╚██████╔╝╚██████╔╝██║ ╚═╝ ██║███████╗██║ ██║
╚════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
██████╗ ██████╗ ███╗ ███╗██████╗ ██████╗ ███╗ ██╗███████╗███╗ ██╗████████╗
██╔════╝██╔═══██╗████╗ ████║██╔══██╗██╔═══██╗████╗ ██║██╔════╝████╗ ██║╚══██╔══╝
██║ ██║ ██║██╔████╔██║██████╔╝██║ ██║██╔██╗ ██║█████╗ ██╔██╗ ██║ ██║
██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║ ██║██║╚██╗██║██╔══╝ ██║╚██╗██║ ██║
╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ╚██████╔╝██║ ╚████║███████╗██║ ╚████║ ██║
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═══╝ ╚═╝
██████╗ ██╗ ██╗██╗██╗ ██████╗ ███████╗██████╗
██╔══██╗██║ ██║██║██║ ██╔══██╗██╔════╝██╔══██╗
██████╔╝██║ ██║██║██║ ██║ ██║█████╗ ██████╔╝
██╔══██╗██║ ██║██║██║ ██║ ██║██╔══╝ ██╔══██╗
██████╔╝╚██████╔╝██║███████╗██████╔╝███████╗██║ ██║
╚═════╝ ╚═════╝ ╚═╝╚══════╝╚═════╝ ╚══════╝╚═╝ ╚═╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)