mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-02-02 18:14:26 +00:00
implement website model #14
This commit is contained in:
parent
982f532841
commit
f1fedfbbcb
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…
x
Reference in New Issue
Block a user