function redis_autoload in Redis 7.2
Same name and namespace in other branches
- 7.3 redis.autoload.inc \redis_autoload()
Redis module specific autoloader, compatible with spl_register_autoload().
1 string reference to 'redis_autoload'
- redis.autoload.inc in ./
redis.autoload.inc - Redis module autoloader.
File
- ./
redis.autoload.inc, line 16 - Redis module autoloader.
Code
function redis_autoload($class_name) {
$parts = explode('_', $class_name);
if ('Redis' === $parts[0]) {
$filename = REDIS_ROOT . '/' . implode('/', $parts) . '.php';
if (file_exists($filename)) {
require_once $filename;
return TRUE;
}
}
return FALSE;
}