super-powers/src/43134867-5cb8-4280-9be8-309.../README.md

104 lines
3.0 KiB
Markdown
Raw Normal View History

2023-10-04 18:23:30 +00:00
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
2023-10-10 09:39:09 +00:00
# abstract class ActiveRegistry (Details)
2023-10-04 18:23:30 +00:00
> namespace: **VDM\Joomla\Abstraction**
```uml
@startuml
2023-10-10 09:39:09 +00:00
abstract ActiveRegistry #Orange {
2023-10-04 18:23:30 +00:00
# array $active
2024-01-27 07:08:12 +00:00
# bool $addAsArray
2023-10-04 18:23:30 +00:00
+ isActive() : bool
+ allActive() : array
+ setActive(mixed $value, $keys) : void
2024-01-27 07:08:12 +00:00
+ addActive(mixed $value, ?bool $asArray, ...) : void
2023-10-04 18:23:30 +00:00
+ getActive(mixed $default, $keys) : mixed
+ removeActive($keys) : void
+ existsActive($keys) : bool
# validActiveKeys(array $keys) : bool
}
2023-10-10 09:39:09 +00:00
note right of ActiveRegistry::isActive
Check if the registry has any content.
2023-10-04 18:23:30 +00:00
since: 3.2.0
return: bool
end note
2023-10-10 09:39:09 +00:00
note left of ActiveRegistry::allActive
Get all value from the active registry.
2023-10-04 18:23:30 +00:00
since: 3.2.0
return: array
end note
2023-10-10 09:39:09 +00:00
note right of ActiveRegistry::setActive
Sets a value into the registry using multiple keys.
2023-10-04 18:23:30 +00:00
since: 3.2.0
return: void
end note
2023-10-10 09:39:09 +00:00
note left of ActiveRegistry::addActive
Adds content into the registry. If a key exists,
2023-10-04 18:23:30 +00:00
it either appends or concatenates based on the value's type.
2024-01-27 07:08:12 +00:00
Default is $addAsArray = false (if null) in base class.
Override in child class allowed set class property $addAsArray = true.
2023-10-04 18:23:30 +00:00
since: 3.2.0
return: void
arguments:
mixed $value
2024-01-27 07:08:12 +00:00
?bool $asArray
2023-10-04 18:23:30 +00:00
$keys
end note
2023-10-10 09:39:09 +00:00
note right of ActiveRegistry::getActive
Retrieves a value (or sub-array) from the registry using multiple keys.
2023-10-04 18:23:30 +00:00
since: 3.2.0
return: mixed
end note
2023-10-10 09:39:09 +00:00
note left of ActiveRegistry::removeActive
Removes a value (or sub-array) from the registry using multiple keys.
2023-10-04 18:23:30 +00:00
since: 3.2.0
return: void
end note
2023-10-10 09:39:09 +00:00
note right of ActiveRegistry::existsActive
Checks the existence of a particular location in the registry using multiple keys.
2023-10-04 18:23:30 +00:00
since: 3.2.0
return: bool
end note
2023-10-10 09:39:09 +00:00
note left of ActiveRegistry::validActiveKeys
2023-10-04 18:23:30 +00:00
Checks that the keys are valid
since: 3.2.0
return: bool
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)