search/README.md

436 lines
18 KiB
Markdown
Raw Normal View History

2023-04-15 15:01:55 +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\Componentbuilder\Search](#vdm-joomla-componentbuilder-search)
2023-05-01 23:42:42 +00:00
- **abstract class Factory** | [Details](src/01a89ba8-f8bb-435c-93de-0a8f3fa9432a) | [Code](src/01a89ba8-f8bb-435c-93de-0a8f3fa9432a/code.php) | [Settings](src/01a89ba8-f8bb-435c-93de-0a8f3fa9432a/settings.json) | Factory
- **class Agent** | [Details](src/0b658434-3767-401e-addc-eabfd1d0e94a) | [Code](src/0b658434-3767-401e-addc-eabfd1d0e94a/code.php) | [Settings](src/0b658434-3767-401e-addc-eabfd1d0e94a/settings.json) | Agent
- **class Config** | [Details](src/6e2ca779-f70e-4871-a138-0ee5eaec6a97) | [Code](src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/code.php) | [Settings](src/6e2ca779-f70e-4871-a138-0ee5eaec6a97/settings.json) | Config
2023-04-15 15:01:55 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Search\Abstraction](#vdm-joomla-componentbuilder-search-abstraction)
2023-05-01 23:42:42 +00:00
- **abstract class Engine** | [Details](src/8f9449fc-bfbc-49a5-b146-d58c8c17dfdf) | [Code](src/8f9449fc-bfbc-49a5-b146-d58c8c17dfdf/code.php) | [Settings](src/8f9449fc-bfbc-49a5-b146-d58c8c17dfdf/settings.json) | Engine
2023-04-15 15:01:55 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Search\Agent](#vdm-joomla-componentbuilder-search-agent)
2023-05-01 23:42:42 +00:00
- **class Find** | [Details](src/15d9e1a9-3364-4d69-9d9f-9b87db820e5c) | [Code](src/15d9e1a9-3364-4d69-9d9f-9b87db820e5c/code.php) | [Settings](src/15d9e1a9-3364-4d69-9d9f-9b87db820e5c/settings.json) | Find
- **class Replace** | [Details](src/abc37ddd-1ff5-4204-9e5b-015ab4f3d4c7) | [Code](src/abc37ddd-1ff5-4204-9e5b-015ab4f3d4c7/code.php) | [Settings](src/abc37ddd-1ff5-4204-9e5b-015ab4f3d4c7/settings.json) | Replace
- **class Search** | [Details](src/e544a248-4b6a-46cb-9926-a3ac9937807c) | [Code](src/e544a248-4b6a-46cb-9926-a3ac9937807c/code.php) | [Settings](src/e544a248-4b6a-46cb-9926-a3ac9937807c/settings.json) | Search
- **class Update** | [Details](src/3ac29912-0681-4ca9-8197-d5a8f6a49ac7) | [Code](src/3ac29912-0681-4ca9-8197-d5a8f6a49ac7/code.php) | [Settings](src/3ac29912-0681-4ca9-8197-d5a8f6a49ac7/settings.json) | Update
2023-04-15 15:01:55 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Search\Database](#vdm-joomla-componentbuilder-search-database)
2023-05-01 23:42:42 +00:00
- **class Insert** | [Details](src/6caf9473-133c-49a9-afa0-9f84151b5155) | [Code](src/6caf9473-133c-49a9-afa0-9f84151b5155/code.php) | [Settings](src/6caf9473-133c-49a9-afa0-9f84151b5155/settings.json) | Insert
- **class Load** | [Details](src/2dabfb4a-64cd-4c04-9772-4a75f9f3b710) | [Code](src/2dabfb4a-64cd-4c04-9772-4a75f9f3b710/code.php) | [Settings](src/2dabfb4a-64cd-4c04-9772-4a75f9f3b710/settings.json) | Load
2023-04-15 15:01:55 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Search\Engine](#vdm-joomla-componentbuilder-search-engine)
2023-05-01 23:42:42 +00:00
- **class Basic** | [Details](src/db093eca-63b3-4d6c-9232-3ceb058121c0) | [Code](src/db093eca-63b3-4d6c-9232-3ceb058121c0/code.php) | [Settings](src/db093eca-63b3-4d6c-9232-3ceb058121c0/settings.json) | Basic
- **class Regex** | [Details](src/83efa9a0-4aec-41f8-9c05-b1ac9617746e) | [Code](src/83efa9a0-4aec-41f8-9c05-b1ac9617746e/code.php) | [Settings](src/83efa9a0-4aec-41f8-9c05-b1ac9617746e/settings.json) | Regex
2023-04-15 15:01:55 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Search\Interfaces](#vdm-joomla-componentbuilder-search-interfaces)
2023-05-01 23:42:42 +00:00
- **interface FindInterface** | [Details](src/55280ec7-e48d-431b-af25-10308dd30636) | [Code](src/55280ec7-e48d-431b-af25-10308dd30636/code.php) | [Settings](src/55280ec7-e48d-431b-af25-10308dd30636/settings.json) | Super___55280ec7_e48d_431b_af25_10308dd30636___Power
- **interface InsertInterface** | [Details](src/4c44e5d3-750c-4609-88c8-aa441838b8fe) | [Code](src/4c44e5d3-750c-4609-88c8-aa441838b8fe/code.php) | [Settings](src/4c44e5d3-750c-4609-88c8-aa441838b8fe/settings.json) | Super___4c44e5d3_750c_4609_88c8_aa441838b8fe___Power
- **interface LoadInterface** | [Details](src/2bd1a32c-3d90-4646-9314-28d44d164f76) | [Code](src/2bd1a32c-3d90-4646-9314-28d44d164f76/code.php) | [Settings](src/2bd1a32c-3d90-4646-9314-28d44d164f76/settings.json) | Super___2bd1a32c_3d90_4646_9314_28d44d164f76___Power
- **interface ReplaceInterface** | [Details](src/afdae35d-fe7f-4055-99ea-afd8ff8349b6) | [Code](src/afdae35d-fe7f-4055-99ea-afd8ff8349b6/code.php) | [Settings](src/afdae35d-fe7f-4055-99ea-afd8ff8349b6/settings.json) | Super___afdae35d_fe7f_4055_99ea_afd8ff8349b6___Power
- **interface SearchInterface** | [Details](src/0d9442ab-54d9-4947-a219-244cfaea3084) | [Code](src/0d9442ab-54d9-4947-a219-244cfaea3084/code.php) | [Settings](src/0d9442ab-54d9-4947-a219-244cfaea3084/settings.json) | Super___0d9442ab_54d9_4947_a219_244cfaea3084___Power
- **interface SearchTypeInterface** | [Details](src/117d8c9e-3f8d-40ae-b375-1efa2fe5538a) | [Code](src/117d8c9e-3f8d-40ae-b375-1efa2fe5538a/code.php) | [Settings](src/117d8c9e-3f8d-40ae-b375-1efa2fe5538a/settings.json) | Super___117d8c9e_3f8d_40ae_b375_1efa2fe5538a___Power
2023-04-15 15:01:55 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Search\Model](#vdm-joomla-componentbuilder-search-model)
2023-05-01 23:42:42 +00:00
- **class Insert** | [Details](src/02efe40a-7792-4c82-9444-7d0377243483) | [Code](src/02efe40a-7792-4c82-9444-7d0377243483/code.php) | [Settings](src/02efe40a-7792-4c82-9444-7d0377243483/settings.json) | Insert
- **class Load** | [Details](src/f523ab49-907a-4356-b064-51c85a187fbd) | [Code](src/f523ab49-907a-4356-b064-51c85a187fbd/code.php) | [Settings](src/f523ab49-907a-4356-b064-51c85a187fbd/settings.json) | Load
2023-04-15 15:01:55 +00:00
- **Namespace**: [VDM\Joomla\Componentbuilder\Search\Service](#vdm-joomla-componentbuilder-search-service)
2023-05-01 23:42:42 +00:00
- **class Agent** | [Details](src/cc6972a7-1574-4ae0-92a8-7f1012aac6f7) | [Code](src/cc6972a7-1574-4ae0-92a8-7f1012aac6f7/code.php) | [Settings](src/cc6972a7-1574-4ae0-92a8-7f1012aac6f7/settings.json) | Agent
- **class Database** | [Details](src/d5de47ce-9a9e-4e76-a5c6-61ed74842ea3) | [Code](src/d5de47ce-9a9e-4e76-a5c6-61ed74842ea3/code.php) | [Settings](src/d5de47ce-9a9e-4e76-a5c6-61ed74842ea3/settings.json) | Database
- **class Model** | [Details](src/7f40cc7d-9ab8-4601-8a2b-4eb3d712a40a) | [Code](src/7f40cc7d-9ab8-4601-8a2b-4eb3d712a40a/code.php) | [Settings](src/7f40cc7d-9ab8-4601-8a2b-4eb3d712a40a/settings.json) | Model
- **class Search** | [Details](src/da714ea5-96bb-4eb1-959b-39b457be9cd1) | [Code](src/da714ea5-96bb-4eb1-959b-39b457be9cd1/code.php) | [Settings](src/da714ea5-96bb-4eb1-959b-39b457be9cd1/settings.json) | Search
2023-04-15 15:01:55 +00:00
# Class Diagrams
## VDM Joomla Componentbuilder Search
> namespace VDM\Joomla\Componentbuilder\Search
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Search #Olive {
abstract Factory #Orange {
# static $container
+ {static} _() : Mixed
+ {static} getContainer() : Container
# {static} createContainer() : Container
}
class Agent #Gold {
# Config $config
# Load $load
# Insert $insert
# Find $find
# Replace $replace
# Search $search
# Update $update
# Table $table
# string $return
# array $marker
# array $markerHtml
+ __construct()
+ getValue() : ?string
+ setValue() : bool
+ table() : ?array
+ find() : ?array
+ replace() : int
# getRow() : array
# getRowCode() : string
# getRowEditButton() : string
# setReturnValue() : void
# setMarkers() : void
}
class Config #Gold {
# getTypesearch() : ?int
# getSearchvalue() : ?string
# getReplacevalue() : string
# getMatchcase() : int
# getWholeword() : int
# getRegexsearch() : int
# getComponentid() : int
# getTablename() : ?string
# getFieldname() : ?string
# getItemid() : int
# getFieldcounter() : int
# getLinecounter() : int
# getMarkerstart() : string
# getMarkerend() : string
}
}
@enduml
```
## VDM Joomla Componentbuilder Search Abstraction
> namespace VDM\Joomla\Componentbuilder\Search\Abstraction
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Search\Abstraction #LightGreen {
abstract Engine #Orange {
# Config $config
# ?string $searchValue
# string $replaceValue
# int $matchCase
# int $wholeWord
# string $start
# string $end
+ __construct()
# lineCounter()
}
}
@enduml
```
## VDM Joomla Componentbuilder Search Agent
> namespace VDM\Joomla\Componentbuilder\Search\Agent
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Search\Agent #LightGreen {
class Find #Gold {
# array $found
# Config $config
# Search $search
+ __construct()
+ get() : ?array
+ item() : void
+ items() : void
+ reset() : void
}
class Replace #Gold {
# array $updated
# Config $config
# Update $update
+ __construct()
+ get() : ?array
+ item() : void
+ items() : void
+ reset() : void
}
class Search #Gold {
# array $found
# Config $config
# SearchEngine $search
+ __construct()
+ get() : ?array
+ value() : bool
+ reset() : void
# searchValue() : ?array
# string() : ?array
# prep() : void
# fieldCounter()
}
class Update #Gold {
# SearchEngine $search
+ __construct()
+ value() : mixed
# updateValue() : mixed
# validateUpdateKey() : bool
# string() : string
}
}
@enduml
```
## VDM Joomla Componentbuilder Search Database
> namespace VDM\Joomla\Componentbuilder\Search\Database
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Search\Database #LightGreen {
class Insert #Gold {
# Config $config
# Table $table
# Model $model
# \JDatabaseDriver $db
+ __construct()
+ value() : bool
+ item() : bool
+ items() : bool
}
class Load #Gold {
# int $bundle
# Config $config
# Table $table
# Model $model
# Database $load
+ __construct()
+ value() : mixed
+ item() : ?object
+ items() : ?array
# next() : int
# incremental() : int
# setDatabaseFields() : ?array
}
}
@enduml
```
## VDM Joomla Componentbuilder Search Engine
> namespace VDM\Joomla\Componentbuilder\Search\Engine
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Search\Engine #LightGreen {
class Basic #Gold {
# string $regexValue
+ __construct()
+ string() : ?string
+ replace() : string
# replaceWhole() : string
# searchWhole() : ?string
+ match() : bool
# searchAll() : ?string
# replaceAll() : string
}
class Regex #Gold {
# string $regexValue
+ __construct()
+ string() : ?string
+ replace() : string
+ match() : bool
}
}
@enduml
```
## VDM Joomla Componentbuilder Search Interfaces
> namespace VDM\Joomla\Componentbuilder\Search\Interfaces
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Search\Interfaces #LightGreen {
interface FindInterface #Lavender {
+ get() : ?array
+ item() : void
+ items() : void
+ reset() : void
}
interface InsertInterface #Lavender {
+ value() : bool
+ item() : bool
+ items() : bool
}
interface LoadInterface #Lavender {
+ value() : mixed
+ item() : ?object
+ items() : ?array
}
interface ReplaceInterface #Lavender {
+ get() : ?array
+ item() : void
+ items() : void
+ reset() : void
}
interface SearchInterface #Lavender {
+ get() : ?array
+ value() : bool
+ reset() : void
}
interface SearchTypeInterface #Lavender {
+ string() : ?string
+ replace() : string
}
}
@enduml
```
## VDM Joomla Componentbuilder Search Model
> namespace VDM\Joomla\Componentbuilder\Search\Model
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Search\Model #LightGreen {
class Insert #Gold {
# Config $config
+ __construct()
+ value() : mixed
# validateBefore() : bool
# validateAfter() : bool
# getTable() : string
}
class Load #Gold {
# Config $config
+ __construct()
+ value() : mixed
# validateBefore() : bool
# validateAfter() : bool
# getTable() : string
}
}
@enduml
```
## VDM Joomla Componentbuilder Search Service
> namespace VDM\Joomla\Componentbuilder\Search\Service
```uml
@startuml
namespace VDM\Joomla\Componentbuilder\Search\Service #LightGreen {
class Agent #Gold {
+ register() : void
+ getAgent() : SearchAgent
+ getFind() : Find
+ getReplace() : Replace
+ getSearch() : Search
+ getUpdate() : Update
}
class Database #Gold {
+ register() : void
+ getLoad() : Load
+ getDatabaseLoad() : LoadDatabase
+ getDatabaseInsert() : InsertDatabase
}
class Model #Gold {
+ register() : void
+ getModelLoad() : Load
+ getModelInsert() : Insert
}
class Search #Gold {
# $searchEngine
+ register() : void
+ getConfig() : Config
+ getTable() : Table
+ getRegex() : Regex
+ getBasic() : Basic
+ getSearch() : SearchEngine
}
}
@enduml
```
---
```
██╗ ██████╗ ██████╗ ███╗ ███╗██╗ █████╗
██║██╔═══██╗██╔═══██╗████╗ ████║██║ ██╔══██╗
██║██║ ██║██║ ██║██╔████╔██║██║ ███████║
██ ██║██║ ██║██║ ██║██║╚██╔╝██║██║ ██╔══██║
╚█████╔╝╚██████╔╝╚██████╔╝██║ ╚═╝ ██║███████╗██║ ██║
╚════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
██████╗ ██████╗ ███╗ ███╗██████╗ ██████╗ ███╗ ██╗███████╗███╗ ██╗████████╗
██╔════╝██╔═══██╗████╗ ████║██╔══██╗██╔═══██╗████╗ ██║██╔════╝████╗ ██║╚══██╔══╝
██║ ██║ ██║██╔████╔██║██████╔╝██║ ██║██╔██╗ ██║█████╗ ██╔██╗ ██║ ██║
██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║ ██║██║╚██╗██║██╔══╝ ██║╚██╗██║ ██║
╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ╚██████╔╝██║ ╚████║███████╗██║ ╚████║ ██║
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═══╝ ╚═╝
██████╗ ██╗ ██╗██╗██╗ ██████╗ ███████╗██████╗
██╔══██╗██║ ██║██║██║ ██╔══██╗██╔════╝██╔══██╗
██████╔╝██║ ██║██║██║ ██║ ██║█████╗ ██████╔╝
██╔══██╗██║ ██║██║██║ ██║ ██║██╔══╝ ██╔══██╗
██████╔╝╚██████╔╝██║███████╗██████╔╝███████╗██║ ██║
╚═════╝ ╚═════╝ ╚═╝╚══════╝╚═════╝ ╚══════╝╚═╝ ╚═╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)