Initial Version

This commit is contained in:
root
2025-12-21 10:09:54 -05:00
commit 2fbddd7dbc
366 changed files with 41999 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
<?php
namespace KTXF\Module;
abstract class ModuleInstanceAbstract implements ModuleInstanceInterface
{
// mandatory methods that must be implemented by each concrete module
abstract public function handle(): string;
abstract public function version(): string;
abstract public function label(): string;
abstract public function description(): string;
abstract public function author(): string;
// optional methods that can be overridden by specific modules
public function install(): void
{
// Override in specific modules if needed
}
public function uninstall(): void
{
// Override in specific modules if needed
}
public function enable(): void
{
// Override in specific modules if needed
}
public function disable(): void
{
// Override in specific modules if needed
}
public function upgrade(): void
{
// Override in specific modules if needed
}
public function boot(): void
{
// Override in specific modules if needed
}
}

View File

@@ -0,0 +1,61 @@
<?php
namespace KTXF\Module;
interface ModuleInstanceInterface
{
/**
* Get module version
*/
public function handle(): string;
/**
* Get module version
*/
public function version(): string;
/**
* Get module label
*/
public function label(): string;
/**
* Get module description
*/
public function description(): string;
/**
* Get module author
*/
public function author(): string;
/**
* Install the module
*/
public function install(): void;
/**
* Uninstall the module
*/
public function uninstall(): void;
/**
* Upgrade the module
*/
public function upgrade(): void;
/**
* Enable the module
*/
public function enable(): void;
/**
* Disable the module
*/
public function disable(): void;
/**
* Bootstrap the module when enabled
*/
public function boot(): void;
}