Merging autoload changes
This commit is contained in:
commit
c2b3b234fa
3 changed files with 14 additions and 5 deletions
10
brain/_loader.php
Normal file
10
brain/_loader.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
spl_autoload_register(function ($className) {
|
||||||
|
$file = dirname(__DIR__) . '\\' . $className . '.php';
|
||||||
|
$file = str_replace('\\', DIRECTORY_SEPARATOR, $file);
|
||||||
|
//echo $file;
|
||||||
|
if (file_exists($file)) {
|
||||||
|
include $file;
|
||||||
|
}
|
||||||
|
});
|
|
@ -9,11 +9,6 @@
|
||||||
"homepage": "https://roiskinda.cool"
|
"homepage": "https://roiskinda.cool"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"brain\\": "brain"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://code.playvicio.us/Are0h/Fipamo",
|
"source": "https://code.playvicio.us/Are0h/Fipamo",
|
||||||
"wiki": "https://code.playvicio.us/Are0h/Fipamo/wiki/_pages",
|
"wiki": "https://code.playvicio.us/Are0h/Fipamo/wiki/_pages",
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
//load Composer Classes
|
||||||
require '../vendor/autoload.php';
|
require '../vendor/autoload.php';
|
||||||
|
//load Fipamo Classes
|
||||||
|
require '../brain/_loader.php';
|
||||||
|
|
||||||
use brain\init\App;
|
use brain\init\App;
|
||||||
|
|
||||||
|
//start app
|
||||||
new App();
|
new App();
|
||||||
|
|
Loading…
Reference in a new issue