-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.php
23 lines (23 loc) · 853 Bytes
/
app.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
* Studio application loader
*
* This is the only resource that needs to be called.
*
* PHP version 7.3+
*
* @package capile/tecnodesign
* @author Tecnodesign <[email protected]>
* @license GNU General Public License v3.0
* @link https://tecnodz.com
* @version 2.7
*/
if(file_exists($a=__DIR__.'/vendor/autoload.php') || file_exists($a=__DIR__.'/../../autoload.php')) require $a;
unset($a);
require_once __DIR__.'/src/Studio.php';
$appMemoryNamespace = file_exists(S_APP_ROOT.'/.appkey') ? Studio::slug(file_get_contents(S_APP_ROOT.'/.appkey')) : 'app';
if(!file_exists($configFile=S_PROJECT_ROOT.'/'.basename(S_PROJECT_ROOT).'.yml') &&
!file_exists($configFile=S_APP_ROOT.'/'.basename(S_APP_ROOT).'.yml')) {
$configFile = __DIR__.'/app.yml';
}
Studio::app($configFile, $appMemoryNamespace, Studio::env())->run();