From f1fedfbbcb45959b16f6272981066247ffd9114e Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 26 Sep 2023 03:03:32 +0300 Subject: [PATCH] implement website model #14 --- src/app/model/website.php | 36 ++++++++++++++++++++++++++++++++++++ src/config/website.json | 5 ++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 src/app/model/website.php diff --git a/src/app/model/website.php b/src/app/model/website.php new file mode 100644 index 0000000..8221cc5 --- /dev/null +++ b/src/app/model/website.php @@ -0,0 +1,36 @@ +_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; + } +} \ No newline at end of file diff --git a/src/config/website.json b/src/config/website.json index ab30b6e..165794c 100644 --- a/src/config/website.json +++ b/src/config/website.json @@ -10,6 +10,9 @@ }, "api": { - "export": true + "export": + { + "enabled" : true + } } } \ No newline at end of file