diff options
Diffstat (limited to 'src/web/core/_model.php')
-rw-r--r-- | src/web/core/_model.php | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/web/core/_model.php b/src/web/core/_model.php deleted file mode 100644 index 57127de..0000000 --- a/src/web/core/_model.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php /* Copyright (c) 2024 Freya Murphy */ -abstract class Model { - // the main model - // shared by all controllers and models - public Main_model $main; - public Loader $load; - - // the database - public DatabaseHelper $db; - - private mixed $config; - - /** - * Creates a model - * @param Loader $load - the main loader object - * @param ?Main_model $main - */ - function __construct(Loader $load, bool $main = FALSE) { - $this->load = $load; - if ($main) { - $this->main = $this; - } else { - $this->main = $this->load->model('main'); - } - $this->db = $this->load->db(); - } - - /** - * @returns the base model data - */ - public function get_data(): ?array { - $data = array(); - - $info = $this->main->info; - $app = $info['app']; - - $data['title'] = lang('first_name'); - $data['desc'] = lang('default_short_desc'); - $data['css'] = array(); - - $style = $GLOBALS['style']; - if (isset($style[$app])) { - $css = $style[$app]; - if (!is_array($css)) - $css = array($css); - $data['css'] = $css; - } - - return $data; - } -} |