blob: 357d918c4a9262e39dc2efe9a55a2aa24ea954a0 (
plain)
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
|
<?php
/**
* Cinisis - Isis db reading tool.
*/
// Autoloader.
function cinisis_autoload($class) {
$base = dirname(__FILE__) .'/';
if (strstr($class, 'Db')) {
$file = 'classes/backends/'. $class .'.php';
}
elseif (strstr($class, 'Iterator')) {
$file = 'classes/iterators/'. $class .'.php';
}
elseif (strstr($class, 'Helper')) {
$file = 'classes/helpers/'. $class .'.php';
}
else {
$file = 'classes/'. $class .'.php';
}
if (file_exists($base . $file)) {
require_once $base . $file;
}
}
// Register autoloader.
spl_autoload_register("cinisis_autoload");
?>
|