App src code

This commit is contained in:
2023-02-14 17:27:01 -03:00
parent ab6c7fa9dd
commit 5eec0d93b0
26 changed files with 525 additions and 0 deletions

View File

@ -0,0 +1,4 @@
<?php
return [
'logs_folder' => $_ENV['LOGS_PATH'] ?? '/logs'
];

View File

@ -0,0 +1,22 @@
<?php
return [
'folders' => function() {
return new DI\Container([
'base' => dirname(__FILE__, 3),
'resources' => DI\String('{base}/resources'),
'routes' => DI\String('{resources}/routes'),
'cache' => DI\String('{base}/cache'),
'templates' => DI\String('{resources}/views')
]);
/*$arr = ['base' => dirname(__FILE__, 3)];
$arr['resources'] = implode(DIRECTORY_SEPARATOR, [
$arr['base'],
'resources'
]);
$arr['routes'] = implode(DIRECTORY_SEPARATOR, [
$arr['resources'],
'routes'
]);
return (object) $arr;*/
}
];

View File

@ -0,0 +1,11 @@
<?php
return [
'urls' => function() {
$arr = ['base' => $_ENV['WEB_URL'] ?? 'http://localhost:' . ($_ENV['WEB_PORT'] ?? 8030)];
$arr['assets'] = implode('/', [
$arr['base'],
'assets'
]);
return (object) $arr;
}
];