mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-23 11:22:11 +00:00
Added Module Config Handler
This commit is contained in:
parent
0d36c51ad2
commit
4abe7447bd
51
src/DeltaCMS/Module/Config/Config.php
Normal file
51
src/DeltaCMS/Module/Config/Config.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace DeltaCMS\Module\Config;
|
||||
|
||||
use DeltaCMS\Module\Config\ConfigInterface;
|
||||
|
||||
class Config implements ConfigInterface
|
||||
{
|
||||
public function __construct(?ConfigInterface $config = null)
|
||||
{
|
||||
if (isset($config)) {
|
||||
$this->routes = $config->getRoutes();
|
||||
$this->templateFolder = $config->getTemplateFolder();
|
||||
}
|
||||
}
|
||||
|
||||
private $routes = array();
|
||||
private $templateFolder = "";
|
||||
private $forms = array();
|
||||
|
||||
public function getRoutes(): array
|
||||
{
|
||||
return $this->routes;
|
||||
}
|
||||
|
||||
public function setRoutes(array $routes)
|
||||
{
|
||||
$this->routes = $routes;
|
||||
}
|
||||
|
||||
public function getTemplateFolder(): string
|
||||
{
|
||||
return $this->templateFolder;
|
||||
}
|
||||
|
||||
|
||||
public function setTemplateFolder(string $folder)
|
||||
{
|
||||
$this->templateFolder = $folder;
|
||||
}
|
||||
|
||||
public function getForms(): array
|
||||
{
|
||||
return $this->forms;
|
||||
}
|
||||
|
||||
public function setForms(array $forms)
|
||||
{
|
||||
$this->forms = $forms;
|
||||
}
|
||||
}
|
@ -7,4 +7,6 @@ interface ConfigInterface
|
||||
public function getRoutes(): array;
|
||||
|
||||
public function getTemplateFolder(): string;
|
||||
|
||||
public function getForms(): array;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user