Reestruturacao da pasta app e mudancas nos templates

This commit is contained in:
ahwelp
2020-04-14 22:41:02 -03:00
parent b66dcff003
commit 9548157f02
24 changed files with 85 additions and 62 deletions
+21 -2
View File
@@ -1,5 +1,24 @@
<?php
spl_autoload_register(function ($class_name) {
$path = explode('\\', $class_name);
$fileName = $path[sizeof($path)-1];
$path[sizeof($path)-1] = '';
$path = strtolower(implode(DIRECTORY_SEPARATOR, $path));
if(is_file($path . $fileName . '.php')){
return include $path . $fileName . '.php';
}
if(is_file(strtolower($path . $fileName . '.php'))){
return include strtolower($path . $fileName . '.php');
}
include $path . $fileName . '.php';
});
class Connection {
private function __construct() {
@@ -96,7 +115,7 @@ class Lang {
return;
}
$rdi = new RecursiveDirectoryIterator(DIR_APPLICATION);
$rdi = new RecursiveDirectoryIterator(DIR_APP);
foreach (new RecursiveIteratorIterator($rdi) as $file) {
if (preg_match("/lang\/.*\.php$/", $file)) {
$included_lang = explode('/', $file);
@@ -113,4 +132,4 @@ class Lang {
abstract class Controller {
}
}