summaryrefslogtreecommitdiff
path: root/src/web/core/_model.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-12-23 11:13:27 -0500
committerFreya Murphy <freya@freyacat.org>2024-12-23 11:13:27 -0500
commit5a2ba9c2e7605bb788bc406184547d22c6436867 (patch)
treecbd988d534e8a8593a31d70571222443f80da0b3 /src/web/core/_model.php
parentfix about modal (diff)
downloadxssbook2-5a2ba9c2e7605bb788bc406184547d22c6436867.tar.gz
xssbook2-5a2ba9c2e7605bb788bc406184547d22c6436867.tar.bz2
xssbook2-5a2ba9c2e7605bb788bc406184547d22c6436867.zip
v2.1.0, refactor w/ crimson
Diffstat (limited to 'src/web/core/_model.php')
-rw-r--r--src/web/core/_model.php44
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;
- }
-}