bootstrap()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 12
nc 1
nop 2
dl 0
loc 20
rs 9.8666
c 0
b 0
f 0
1
<?php
2
/**
3
 * Kore : Simple And Minimal Framework
4
 *
5
 */
6
7
namespace Kore;
8
9
/**
10
 * Initialize the application
11
 *
12
 * @param string $app_dir Application Directory
13
 * @param string $app_ns Application NameSpace
14
 * @return void
15
 */
16
function bootstrap($app_dir, $app_ns)
17
{
18
    define('APP_DIR', $app_dir);
19
    define('APP_NS', $app_ns);
20
    
21
    // define directory
22
    define('CONFIG_DIR', APP_DIR.'/config');
23
    define('CONTROLLERS_DIR', APP_DIR.'/controllers');
24
    define('COMMANDS_DIR', APP_DIR.'/commands');
25
    define('VIEWS_DIR', APP_DIR.'/views');
26
    define('LIBS_DIR', APP_DIR.'/libs');
27
    define('TMP_DIR', dirname(APP_DIR) .'/tmp');
28
    define('LOGS_DIR', TMP_DIR.'/logs');
29
30
    // define namespace
31
    define('CONTROLLERS_NS', APP_NS.'\\controllers');
32
    define('COMMANDS_NS', APP_NS.'\\commands');
33
34
    // include helper
35
    require_once(__DIR__.'/helpers.php');
36
}
37