summaryrefslogtreecommitdiff
path: root/src/web/core/_model.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-09-18 14:14:53 -0400
committerFreya Murphy <freya@freyacat.org>2024-09-18 14:48:54 -0400
commit1f9024763d9224c4cd9a181bac27e6b9f12ad672 (patch)
tree00f827470dad9aa2692483acbdef9502c1a464d3 /src/web/core/_model.php
parentfix rss (diff)
downloadwebsite-1f9024763d9224c4cd9a181bac27e6b9f12ad672.tar.gz
website-1f9024763d9224c4cd9a181bac27e6b9f12ad672.tar.bz2
website-1f9024763d9224c4cd9a181bac27e6b9f12ad672.zip
refactor
Diffstat (limited to 'src/web/core/_model.php')
-rw-r--r--src/web/core/_model.php51
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;
- }
-}