mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
init config model
This commit is contained in:
parent
cba3676d73
commit
789db97319
6 changed files with 247 additions and 230 deletions
|
|
@ -6,6 +6,7 @@ namespace Yggverse\Yoda\Entity;
|
|||
|
||||
class App
|
||||
{
|
||||
public \Yggverse\Yoda\Model\Config $config;
|
||||
public \Yggverse\Yoda\Model\Database $database;
|
||||
|
||||
public \Yggverse\Yoda\Entity\Tab\History $history;
|
||||
|
|
@ -14,12 +15,10 @@ class App
|
|||
public \GtkHeaderBar $header;
|
||||
public \GtkNotebook $tabs;
|
||||
|
||||
public object $config;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// Init config
|
||||
$this->config = \Yggverse\Yoda\Model\File::getConfig()->app; // @TODO
|
||||
$this->config = new \Yggverse\Yoda\Model\Config;
|
||||
|
||||
// Init database
|
||||
$this->database = new \Yggverse\Yoda\Model\Database(
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ class History
|
|||
// Init app
|
||||
$this->app = $app;
|
||||
|
||||
// Init config
|
||||
$this->config = \Yggverse\Yoda\Model\File::getConfig()->app->tab->history;
|
||||
// Init config namespace
|
||||
$this->config = $app->config->tab->history;
|
||||
|
||||
// Cleanup expired history
|
||||
if ($this->config->clean->timeout)
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ class Page
|
|||
// Init app
|
||||
$this->app = $app;
|
||||
|
||||
// Init config
|
||||
$this->config = \Yggverse\Yoda\Model\File::getConfig()->app->tab->page;
|
||||
// Init config namespace
|
||||
$this->config = $app->config->tab->page;
|
||||
|
||||
// Init DNS memory
|
||||
$this->dns = new \Yggverse\Yoda\Model\Memory;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue