too manu changes (will list by files)

.gitignore
ignores some launch files

changelog.md, readme.md
added end file line

public.php
moved
started the work on it

router.php
added require to functions & moved the function in the file
set an ini value to show errors
defied some constants
moved the public page management to public/public.php

exampleModule -> headGenerator.php
started working on module management

*.json
reworked files

function.php
added this file to manages cores functions

website.php
the Website Object for theme & modules

page.php
created a test theme
This commit is contained in:
2019-02-17 00:12:50 +01:00
parent 0399e5043b
commit bc8fba19d4
15 changed files with 208 additions and 100 deletions

40
admin/system/website.php Normal file
View File

@ -0,0 +1,40 @@
<?php
class Website {
private $root;
private const TEMPLATEJSON = "templates.json";
public function __construct(String $root) {
$this->root = $root;
}
private function getTemplateFileURI() {
return $this->root . "/admin/settings/" . self::TEMPLATEJSON;
}
public function addTemplate(String $name, String $path, String $func, $bool) {
var_dump($_SERVER);
$val = array(
$name => array(
"URI" => $path,
"function" => $func,
"static" => $bool
)
);
if(! file_exists($this->getTemplateFileURI())) {
file_put_contents($this->getTemplateFileURI(), json_encode($val));
} else {
$json = json_decode(file_get_contents($this->getTemplateFileURI()), true);
$json = array_merge($json, $val);
file_put_contents($this->getTemplateFileURI(), json_encode($json));
}
}
public function addJS() {
}
}