Reestruturacao da pasta app e mudancas nos templates
This commit is contained in:
+21
-2
@@ -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 {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user