You are here

function redis_autoload in Redis 7.3

Same name and namespace in other branches
  1. 7.2 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) {
  if ('Redis' === substr($class_name, 0, 5)) {
    $filename = REDIS_ROOT . '/' . str_replace('_', '/', $class_name) . '.php';
    return @(include_once $filename);
  }
  return FALSE;
}