2023-09-26 06:24:03 +00:00
|
|
|
```
|
|
|
|
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
|
|
|
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
|
|
|
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
|
|
|
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
|
|
|
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
|
|
|
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
|
|
|
```
|
|
|
|
# final class Insert (Details)
|
2024-04-06 13:05:35 +00:00
|
|
|
> namespace: **TrueChristianChurch\Joomla\GetBible\Database**
|
2023-09-26 06:24:03 +00:00
|
|
|
```uml
|
|
|
|
@startuml
|
2023-10-07 12:23:18 +00:00
|
|
|
class Insert << (F,LightGreen) >> #RoyalBlue {
|
2023-09-26 06:24:03 +00:00
|
|
|
# Model $model
|
|
|
|
# Database $database
|
|
|
|
+ __construct(Model $model, Database $database)
|
|
|
|
+ value(mixed $value, string $field, ...) : bool
|
|
|
|
+ row(array $item, string $table) : bool
|
|
|
|
+ rows(?array $items, string $table) : bool
|
|
|
|
+ item(object $item, string $table) : bool
|
|
|
|
+ items(?array $items, string $table) : bool
|
|
|
|
}
|
|
|
|
|
|
|
|
note right of Insert::__construct
|
|
|
|
Constructor
|
|
|
|
|
|
|
|
since: 2.0.1
|
|
|
|
end note
|
|
|
|
|
|
|
|
note right of Insert::value
|
|
|
|
Insert a value to a given table
|
|
|
|
Example: $this->value(Value, 'value_key', 'table_name');
|
|
|
|
|
|
|
|
since: 2.0.1
|
|
|
|
return: bool
|
|
|
|
|
|
|
|
arguments:
|
|
|
|
mixed $value
|
|
|
|
string $field
|
|
|
|
string $table
|
|
|
|
end note
|
|
|
|
|
|
|
|
note right of Insert::row
|
|
|
|
Insert single row with multiple values to a given table
|
|
|
|
Example: $this->item(Array, 'table_name');
|
|
|
|
|
|
|
|
since: 2.0.1
|
|
|
|
return: bool
|
|
|
|
end note
|
|
|
|
|
|
|
|
note right of Insert::rows
|
|
|
|
Insert multiple rows to a given table
|
|
|
|
Example: $this->items(Array, 'table_name');
|
|
|
|
|
|
|
|
since: 2.0.1
|
|
|
|
return: bool
|
|
|
|
end note
|
|
|
|
|
|
|
|
note right of Insert::item
|
|
|
|
Insert single item with multiple values to a given table
|
|
|
|
Example: $this->item(Object, 'table_name');
|
|
|
|
|
|
|
|
since: 2.0.1
|
|
|
|
return: bool
|
|
|
|
end note
|
|
|
|
|
|
|
|
note right of Insert::items
|
|
|
|
Insert multiple items to a given table
|
|
|
|
Example: $this->items(Array, 'table_name');
|
|
|
|
|
|
|
|
since: 2.0.1
|
|
|
|
return: bool
|
|
|
|
end note
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
```
|
|
|
|
██╗ ██████╗██████╗
|
|
|
|
██║██╔════╝██╔══██╗
|
|
|
|
██║██║ ██████╔╝
|
|
|
|
██ ██║██║ ██╔══██╗
|
|
|
|
╚█████╔╝╚██████╗██████╔╝
|
|
|
|
╚════╝ ╚═════╝╚═════╝
|
|
|
|
```
|
|
|
|
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
|
|
|
|