Bootstrap::go()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 9.4285
1
<?php
2
/**
3
 * Rioxygen
4
 * @copyright Copyright (c) 2018 Rioxygen. (http://www.Rioxygen.com/)
5
 * @license  BSD 3-clause "New" or "Revised" License 
6
 */
7
8
/**
9
 * Clase para el cargado de clases
10
 * @package \
11
 * @author Ricardo Ruiz <[email protected]>
12
 */
13
class Bootstrap
14
{
15
    /**
16
     * <p>Comando para levantar el autoloader</p>
17
     */
18
    static public function go()
19
    {
20
        // Make everything relative to the root
21
        chdir(dirname(__DIR__));
22
        // Setup autoloading
23
        require_once( __DIR__ . '/vendor/autoload.php' );
24
    }
25
    /**
26
     * Carga Archivo de Configuración
27
     * en la seccion de Pruebas.
28
     */
29
    static public function getConfig()
30
    {
31
        if(file_exists(__DIR__.'/config/local.php')){
32
            return include __DIR__.'/config/local.php';
33
        }
34
        return include __DIR__.'/config/production.php';
35
    }
36
}
37
Bootstrap::go();