mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-22 19:02:12 +00:00
Added Multiple interfaces
This commit is contained in:
parent
e945325c63
commit
3fe397dacd
10
src/DeltaCMS/Module/Config/ConfigInterface.php
Normal file
10
src/DeltaCMS/Module/Config/ConfigInterface.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace DeltaCMS\Module\Config;
|
||||
|
||||
interface ConfigInterface
|
||||
{
|
||||
public function getRoutes(): array;
|
||||
|
||||
public function getTemplateFolder(): string;
|
||||
}
|
46
src/DeltaCMS/Module/ModuleInterface.php
Normal file
46
src/DeltaCMS/Module/ModuleInterface.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace DeltaCMS\Module;
|
||||
|
||||
use DeltaCMS\Module\Config\ConfigInterface;
|
||||
|
||||
interface ModuleInterface
|
||||
{
|
||||
/**
|
||||
* Load the module (ex: check requirements, etc)
|
||||
*
|
||||
* here you can check for requirement load the db items
|
||||
*
|
||||
* @return bool return if you want to finish loading the addon
|
||||
*/
|
||||
public function enable(): bool;
|
||||
|
||||
/**
|
||||
* update will be launch at each update statements from this
|
||||
* and other modules
|
||||
*
|
||||
* @param ConfigInterface|null $config
|
||||
*
|
||||
* @return ConfigInterface
|
||||
*/
|
||||
public function update(ConfigInterface $config = null): ConfigInterface;
|
||||
|
||||
/**
|
||||
* Launched when plugin get disabled
|
||||
*
|
||||
* here you can archive db
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disable();
|
||||
|
||||
/**
|
||||
* Launched when the plugin is deleted
|
||||
*
|
||||
* this method will be launched right before the deletion of all files
|
||||
* in the module folder
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function delete();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user