Completed
Push — master ( 3b65fe...bc9a61 )
by Bai
8s
created

autoload.php ➔ classLoader()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 2
eloc 5
c 1
b 1
f 0
nc 2
nop 1
dl 0
loc 9
rs 9.6666
1
<?php
2
3
function classLoader($class)
4
{
5
    $path = str_replace('\\', DIRECTORY_SEPARATOR, $class);
6
    $file = __DIR__ . '/src/' . $path . '.php';
7
8
    if (file_exists($file)) {
9
        require_once $file;
10
    }
11
}
12
spl_autoload_register('classLoader');
13
14
require_once  __DIR__ . '/src/Qiniu/functions.php';
15