forked from apiton/aerospike-client-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautoload.php
24 lines (23 loc) · 927 Bytes
/
autoload.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
/* If you are getting this package through Composer the Aerospike\LDT autoloader
* and Aerospike\Bytes autoloader are already registered.
* Otherwise, you can include this file and it will handle registering the
* autoloaders.
*/
$autoloaders = spl_autoload_functions();
if (!is_array($autoloaders) || !array_key_exists('Aerospike\\LDT\\Autoloader', $autoloaders)) {
require __DIR__. '/src/LDT/Autoloader.php';
\Aerospike\LDT\Autoloader::register();
}
if (!is_array($autoloaders) || !array_key_exists('Aerospike\\GeoJSON\\Autoloader', $autoloaders)) {
require __DIR__. '/src/GeoJSON/Autoloader.php';
\Aerospike\GeoJSON\Autoloader::register();
}
if (!is_array($autoloaders) || !array_key_exists('Aerospike\\Bytes', $autoloaders)) {
spl_autoload_register(function ($class_name) {
if ($class_name == 'Aerospike\Bytes') {
require __DIR__. '/src/Bytes.php';
}
});
}
?>