forked from vipsoft/code-coverage-extension
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathautoload.php
More file actions
35 lines (30 loc) · 680 Bytes
/
autoload.php
File metadata and controls
35 lines (30 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* @copyright 2013 Anthon Pang
* @license BSD-2-Clause
*/
namespace VIPSoft;
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/tests/VIPSoft/TestCase.php';
/**
* Generic autoloader
*
* @author Anthon Pang <apang@softwaredevelopment.ca>
*/
class Bootstrap
{
/**
* Load class
*
* @param string $class Class name
*/
public static function autoload($class)
{
$file = str_replace(array('\\', '_'), '/', $class);
$path = __DIR__ . '/src/' . $file . '.php';
if (file_exists($path)) {
include_once $path;
}
}
}
spl_autoload_register('VIPSoft\Bootstrap::autoload');