Browse Source

implement website model #14

main
ghost 1 year ago
parent
commit
f1fedfbbcb
  1. 36
      src/app/model/website.php
  2. 5
      src/config/website.json

36
src/app/model/website.php

@ -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;
}
}

5
src/config/website.json

@ -10,6 +10,9 @@
}, },
"api": "api":
{ {
"export": true "export":
{
"enabled" : true
}
} }
} }
Loading…
Cancel
Save