blob: 59ecaf927a74b932a761f393abe597305c1bad3e (
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
32
33
34
35
36
37
38
|
<?php
/*! \mainpage Cinisis Database Reader
*
* Cinisis is a <a href="https://secure.wikimedia.org/wikipedia/en/wiki/CDS/ISIS">CDS/ISIS</a>
* database reading library written in PHP. It's intended for integrating or migrating
* existing ISIS databases into other applications.
*
* Usage:
*
* \verbinclude README.txt
*/
// 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");
?>
|