mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-13 19:13:42 +02:00
Core functions compartmentalized
This commit is contained in:
parent
b08169fe88
commit
9526e7bf52
4 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
require_once dirname(__DIR__,1)."/src/Globals.php";
|
||||
|
||||
class APIRouter {
|
||||
public function __construct($path) {
|
||||
// List of implemented API services
|
||||
|
|
|
@ -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);
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue