implement website model #14

This commit is contained in:
ghost 2023-09-26 03:03:32 +03:00
parent 982f532841
commit f1fedfbbcb
2 changed files with 40 additions and 1 deletions

36
src/app/model/website.php Normal file
View File

@ -0,0 +1,36 @@
<?php
class AppModelWebsite
{
private $_config;
public function __construct(object $config)
{
$this->_config = $config;
}
public function getConfig() : object
{
return $this->_config->name;
}
public function getName() : string
{
return $this->_config->name;
}
public function getUrl() : string
{
return $this->_config->url;
}
public function getDefaultUserApproved() : bool
{
return $this->_config->default->user->approved;
}
public function getApiExportEnabled() : bool
{
return $this->_config->api->export->enabled;
}
}

View File

@ -10,6 +10,9 @@
},
"api":
{
"export": true
"export":
{
"enabled" : true
}
}
}