summaryrefslogtreecommitdiff
path: root/web/core/_model.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-04-01 11:09:25 -0400
committerFreya Murphy <freya@freyacat.org>2024-04-01 11:09:25 -0400
commit3a82baec9d793edf81ac2b151b0f4d4159641375 (patch)
treef9d50c296b078ac48c2a2391c172c3ccf37edb3f /web/core/_model.php
parentrefactor asset dir, refactor oberver in lib (diff)
downloadxssbook2-3a82baec9d793edf81ac2b151b0f4d4159641375.tar.gz
xssbook2-3a82baec9d793edf81ac2b151b0f4d4159641375.tar.bz2
xssbook2-3a82baec9d793edf81ac2b151b0f4d4159641375.zip
login and register, liking on homepage
Diffstat (limited to 'web/core/_model.php')
-rw-r--r--web/core/_model.php44
1 files changed, 0 insertions, 44 deletions
diff --git a/web/core/_model.php b/web/core/_model.php
deleted file mode 100644
index 936fab4..0000000
--- a/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;
- }
-}