Completed
Push — master ( c3f4e5...495a30 )
by Marko
02:36
created

bootstrap.php ➔ aframe_autoloder()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 11
nc 2
nop 1
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
1
<?php 
2
define("AFRAME_ROOT", dirname(__FILE__));
3
/* Paths */
4
define("AFRAME_TMP", AFRAME_ROOT.DIRECTORY_SEPARATOR.'tmp');
5
6
function aframe_autoloder($class = false)
7
{
8
    $library = preg_replace(array(
9
        '/Aframe/',
10
        '/\\\\/'
11
    ), array(
12
        '',
13
        DIRECTORY_SEPARATOR
14
    ), $class);
15
16
    $class_file = AFRAME_ROOT . $library . '.php';
17
    if (file_exists($class_file))
18
        require_once ($class_file);
19
}
20
spl_autoload_register('aframe_autoloder');
21