Core functions compartmentalized

This commit is contained in:
Victor Westerlund 2021-12-01 17:07:47 +01:00
parent b08169fe88
commit 9526e7bf52
4 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,5 @@
<?php
require_once dirname(__DIR__,1)."/src/Globals.php";
class APIRouter {
public function __construct($path) {
// List of implemented API services

View file

@ -1,11 +1,13 @@
<?php
class Import {
// Import assets from disk
public static function file($file) {
$content = file_get_contents($file);
return $content;
}
// Import JSON to PHP list
public static function json($file) {
$contents = Import::file($file);
$json = json_decode($contents);

View file

@ -1,6 +1,6 @@
<?php
include_once dirname(__DIR__,1)."/Globals.php";
include_once dirname(__DIR__,1)."/core/Import.php";
class Database extends mysqli {
public function __construct($table) {

View file

@ -1,6 +1,6 @@
<?php
require_once dirname(__DIR__,1)."/Globals.php";
require_once dirname(__DIR__,1)."/core/Import.php";
require_once dirname(__DIR__,1)."/database/Database.php";
class Search extends Database {