diff options
Diffstat (limited to '')
-rw-r--r-- | src/web/core/_model.php | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/web/core/_model.php b/src/web/core/_model.php deleted file mode 100644 index dfc7163..0000000 --- a/src/web/core/_model.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php /* Copyright (c) 2024 Freya Murphy */ -abstract class Model { - // the main model - // shared by all controllers and models - public $main; - public $load; - - // the database - public $db; - - private $config; - - /** - * Creates a model - * @param Loader $load - the main loader object - */ - function __construct($load) { - $this->load = $load; - $this->main = $this->load->model('main'); - $this->db = $this->main->db; - $this->config = new Aesthetic(); - } - - /** - * @returns the base model data - */ - public function get_data(): ?array { - $data = array(); - $data['self'] = $this->main->user(); - - $info = $this->main->info; - $app = $info['app']; - - if ($app) { - $files = $this->config->get_files($app); - $data = array_merge($data, $files); - } else { - $files = $this->config->get_files(); - $data = array_merge($data, $files); - } - - return $data; - } -} |