update 2023-04-15 17:42:03

This commit is contained in:
Llewellyn van der Merwe 2023-04-15 17:42:03 +02:00
parent 7d969e9a52
commit 7e95825bee
Signed by: Llewellyn
GPG Key ID: A9201372263741E7
6 changed files with 0 additions and 318 deletions

View File

@ -1,70 +0,0 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# interface ModelInterface (Details)
> namespace: **VDM\Joomla\Componentbuilder\Interfaces**
```uml
@startuml
interface ModelInterface #Lavender {
+ value(mixed $value, string $field, ...) : mixed
+ item(object $item, ?string $table = null) : ?object
+ items(?array $items = null, ?string $table = null) : ?array
+ last(?string $table = null) : ?int
}
note right of ModelInterface::value
Model the value
Example: $this->value(value, 'value_key', 'table_name');
since: 3.2.0
return: mixed
arguments:
mixed $value
string $field
?string $table = null
end note
note right of ModelInterface::item
Model the values of an item
Example: $this->item(Object, 'table_name');
since: 3.2.0
return: ?object
end note
note right of ModelInterface::items
Model the values of multiple items
Example: $this->items(Array, 'table_name');
since: 3.2.0
return: ?array
end note
note right of ModelInterface::last
Get last modeled ID
Example: $this->last('table_name');
since: 3.2.0
return: ?int
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -1,71 +0,0 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @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\Componentbuilder\Interfaces;
/**
* Model Interface
*
* @since 3.2.0
*/
interface ModelInterface
{
/**
* Model the value
* Example: $this->value(value, 'value_key', 'table_name');
*
* @param mixed $value The value to model
* @param string $field The field key
* @param string|null $table The table
*
* @return mixed
* @since 3.2.0
*/
public function value($value, string $field, ?string $table = null);
/**
* Model the values of an item
* Example: $this->item(Object, 'table_name');
*
* @param object $item The item object
* @param string|null $table The table
*
* @return object|null
* @since 3.2.0
*/
public function item(object $item, ?string $table = null): ?object;
/**
* Model the values of multiple items
* Example: $this->items(Array, 'table_name');
*
* @param array|null $items The array of item objects
* @param string|null $table The table
*
* @return array|null
* @since 3.2.0
*/
public function items(?array $items = null, ?string $table = null): ?array;
/**
* Get last modeled ID
* Example: $this->last('table_name');
*
* @param string|null $table The table
*
* @return int|null
* @since 3.2.0
*/
public function last(?string $table = null): ?int;
}

View File

@ -1,16 +0,0 @@
{
"add_head": "0",
"extends": "0",
"extends_custom": "",
"guid": "8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff",
"implements": null,
"implements_custom": "",
"load_selection": null,
"name": "ModelInterface",
"power_version": "1.0.0",
"system_name": "JCB.Interfaces.ModelInterface",
"type": "interface",
"use_selection": null,
"namespace": "VDM\\Joomla\\Componentbuilder.Interfaces.ModelInterface",
"description": "Model Interface\r\n\r\n@since 3.2.0"
}

View File

@ -1,45 +0,0 @@
```
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
```
# abstract class Minify (Details)
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Utilities**
```uml
@startuml
abstract Minify #Orange {
+ {static} js(string $data) : string
+ {static} css(string $data) : string
}
note right of Minify::js
Minify JavaScript
since: 3.2.0
return: string
end note
note right of Minify::css
Minify Css
since: 3.2.0
return: string
end note
@enduml
```
---
```
██╗ ██████╗██████╗
██║██╔════╝██╔══██╗
██║██║ ██████╔╝
██ ██║██║ ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
╚════╝ ╚═════╝╚═════╝
```
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)

View File

@ -1,91 +0,0 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @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\Componentbuilder\Compiler\Utilities;
use VDM\Minify\Css;
use VDM\Minify\JavaScript;
/**
* Compiler Minifier
*
* @since 3.2.0
*/
abstract class Minify
{
/**
* Minify JavaScript Class
*
* @var JavaScript
* @since 3.2.0
*/
public static JavaScript $js;
/**
* Minify Css Class
*
* @var Css
* @since 3.2.0
*/
public static Css $css;
/**
* Minify JavaScript
*
* @param string $data
*
* @return string
* @since 3.2.0
*/
public static function js(string $data): string
{
// check if instance already set
if (empty(self::$js))
{
// set instanceof on JavaScript
self::$js = new JavaScript;
}
// add the data
self::$js->add($data);
// return minified
return self::$js->minify();
}
/**
* Minify Css
*
* @param string $data
*
* @return string
* @since 3.2.0
*/
public static function css(string $data): string
{
// check if instance already set
if (empty(self::$css))
{
// set instanceof on Css
self::$css = new Css;
}
// add the data
self::$css->add($data);
// return minified
return self::$css->minify();
}
}

View File

@ -1,25 +0,0 @@
{
"add_head": "0",
"extends": "0",
"extends_custom": "",
"guid": "b591855d-d106-4fe5-90ad-8e706f6267cf",
"implements": null,
"implements_custom": "",
"load_selection": null,
"name": "Minify",
"power_version": "1.0.0",
"system_name": "JCB.Compiler.Utilities.Minify",
"type": "abstract class",
"use_selection": {
"use_selection0": {
"use": "70530246-2903-4c02-af9a-61182e4d97b8",
"as": "default"
},
"use_selection1": {
"use": "ef6438c4-76db-4aa1-bb15-bc97583bcd2e",
"as": "default"
}
},
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Utilities.Minify",
"description": "Compiler Minifier\r\n\r\n@since 3.2.0"
}