mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
implement website model #14
This commit is contained in:
parent
982f532841
commit
f1fedfbbcb
2 changed files with 40 additions and 1 deletions
36
src/app/model/website.php
Normal file
36
src/app/model/website.php
Normal 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -10,6 +10,9 @@
|
|||
},
|
||||
"api":
|
||||
{
|
||||
"export": true
|
||||
"export":
|
||||
{
|
||||
"enabled" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue